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 : 18.117.91.170
(window.webpackJsonp=window.webpackJsonp||[]).push([[117],{1040:function(e,t,a){"use strict";a.r(t);var n=a(3),r=a(99),o=a(100),c=a(102),l=a(101),s=a(103),i=a(1),u=a.n(i),d=a(858),p=a(1139),h=a(1106),f=a(272),m=a(1098),g=a(1100),E=a(1002),v=a(104),b=a(266),y=a(321),w=a(270),O=a(271),S=function(e){function t(){var e,a;Object(r.a)(this,t);for(var o=arguments.length,s=new Array(o),i=0;i<o;i++)s[i]=arguments[i];return(a=Object(c.a)(this,(e=Object(l.a)(t)).call.apply(e,[this].concat(s)))).handleChange=function(e,t){a.setState(Object(n.a)({},t.name,t.value)),a.props.changesms(t.name,t.value),"fevttype"===t.name&&"EVT"===t.value&&a.props.getEvents(),"fevent"===t.name&&""!==t.value&&a.props.fliterMsg(t.name,t.value)},a.pushSms=function(){if(""!=a.props.smsstate.fmsg)a.props.pushSms();else{a.props.showError({header:"Error",content:"Message cannot be empty"})}},a.sendsms=function(){if(""!=a.props.smsstate.fresevent){var e="";e="SMS"==a.props.smsstate.fmsgtype?O.a+"/sendsms.php?funivcode="+a.props.univ.funivcode+"&fevent="+a.props.smsstate.fresevent:O.a+"/sendnotification.php?funivcode="+a.props.univ.funivcode+"&fevent="+a.props.smsstate.fresevent,window.open(e,"_blank").focus()}else{a.props.showError({header:"Error",content:"Push Data to send."})}},a}return Object(s.a)(t,e),Object(o.a)(t,[{key:"componentDidMount",value:function(){}},{key:"render",value:function(){var e=Object(w.i)(),t=this.props.smsstate;return u.a.createElement("div",null,u.a.createElement(p.a,{fluid:!0},u.a.createElement(p.a.Content,null,u.a.createElement(p.a.Header,{style:{display:"flex"}},u.a.createElement("h4",null,"Send SMS / Notification"),u.a.createElement("div",{className:"ml-auto"},u.a.createElement(h.a,{basic:!0,color:"green",content:"Send",onClick:this.sendsms,icon:"send"}),u.a.createElement(h.a,{basic:!0,color:"blue",content:"pushdata",onClick:this.pushSms,icon:"save"}),u.a.createElement(h.a,{basic:!0,onClick:this.handleCancel,color:"black",icon:"times circle",content:"Cancel"}),u.a.createElement(d.a,{to:"/dashboard"},u.a.createElement(h.a,{basic:!0,color:"red",content:"Exit",icon:"home"})))),u.a.createElement(f.a,null),u.a.createElement(p.a.Description,{style:{overflowY:"auto",height:"".concat(e,"px")}},u.a.createElement(m.a,null,u.a.createElement("div",{className:"row clearfix",style:{marginRight:"0px",marginLeft:"-5px"}},u.a.createElement("div",{className:"col-md-8"},u.a.createElement(m.a.Group,{inline:!0},u.a.createElement("label",null,"Degree Group"),u.a.createElement(m.a.Radio,{label:"All",value:"A",name:"deggrp",checked:"A"==t.deggrp,onChange:this.handleChange}),u.a.createElement(m.a.Radio,{label:"Current",value:"C",name:"deggrp",checked:"C"==t.deggrp,onChange:this.handleChange})),u.a.createElement(m.a.Group,{inline:!0},u.a.createElement("label",null,"Send"),u.a.createElement(m.a.Radio,{label:"SMS",value:"SMS",name:"fmsgtype",checked:"SMS"==t.fmsgtype,onChange:this.handleChange}),u.a.createElement(m.a.Radio,{label:"Notification",value:"NOTIF",name:"fmsgtype",checked:"NOTIF"==t.fmsgtype,onChange:this.handleChange})),u.a.createElement(m.a.Group,null,u.a.createElement(m.a.Field,{width:16},u.a.createElement("label",null,"To"),u.a.createElement(g.a,{placeholder:"Send To",search:!0,selection:!0,name:"fsendto",value:t.fsendto,options:[{code:"CL",label:"College"},{code:"CT",label:"Centre"},{code:"ST",label:"Student"},{code:"TH",label:"Teacher"}].map(function(e,t){return{key:t,value:e.code,text:e.label}}),onChange:this.handleChange}))),u.a.createElement(m.a.Group,{inline:!0},u.a.createElement(m.a.Radio,{label:"General",value:"GEN",name:"fevttype",checked:"GEN"==t.fevttype,onChange:this.handleChange}),u.a.createElement(m.a.Radio,{label:"Event Based",value:"EVT",name:"fevttype",checked:"EVT"==t.fevttype,onChange:this.handleChange})),"EVT"==t.fevttype?u.a.createElement(m.a.Group,null,u.a.createElement(m.a.Field,{width:16},u.a.createElement("label",null,"Select Event"),u.a.createElement(g.a,{placeholder:"Select Event",search:!0,selection:!0,name:"fevent",value:t.fevent,options:t.fevents.map(function(e,t){return{key:t,value:e.fevent,text:e.ftitle}}),onChange:this.handleChange}))):null,u.a.createElement(m.a.Group,null,u.a.createElement(m.a.Field,{width:8},u.a.createElement(m.a.Input,{placeholder:"From",name:"fcollfrom",value:t.fcollfrom,onChange:this.handleChange,maxLength:"4",label:"College Range"})),u.a.createElement(m.a.Field,{width:8},u.a.createElement(m.a.Input,{placeholder:"To",name:"fcollto",value:t.fcollto,onChange:this.handleChange,maxLength:"4",style:{marginTop:"1.6em"}}))),"ST"==t.fsendto?u.a.createElement("div",null,u.a.createElement(m.a.Group,null,u.a.createElement(m.a.Field,{width:8},u.a.createElement(m.a.Input,{placeholder:"From",name:"fdegfrom",value:t.fdegfrom,onChange:this.handleChange,maxLength:"10",label:"Degree Range"})),u.a.createElement(m.a.Field,{width:8},u.a.createElement(m.a.Input,{placeholder:"To",name:"fdegto",value:t.fdegto,onChange:this.handleChange,maxLength:"10",style:{marginTop:"1.6em"}}))),u.a.createElement(m.a.Group,null,u.a.createElement(m.a.Field,{width:8},u.a.createElement(m.a.Input,{placeholder:"From",name:"fregfrom",value:t.fregfrom,onChange:this.handleChange,maxLength:"10",label:"Register No. Range"})),u.a.createElement(m.a.Field,{width:8},u.a.createElement(m.a.Input,{placeholder:"To",name:"fregto",value:t.fregto,onChange:this.handleChange,maxLength:"10",style:{marginTop:"1.6em"}})))):null,"TH"==t.fsendto?u.a.createElement(m.a.Group,null,u.a.createElement(m.a.Field,{width:8},u.a.createElement(m.a.Input,{placeholder:"From",name:"fboardfrom",value:t.fboardfrom,onChange:this.handleChange,maxLength:"10",label:"Board Range"})),u.a.createElement(m.a.Field,{width:8},u.a.createElement(m.a.Input,{placeholder:"To",name:"fboardto",value:t.fboardto,onChange:this.handleChange,maxLength:"10",style:{marginTop:"1.6em"}}))):null,u.a.createElement(m.a.Group,null,u.a.createElement(m.a.Field,{width:16},u.a.createElement(m.a.Input,{name:"fmsg",control:E.a,value:t.fmsg,onChange:this.handleChange,label:"Message",placeholder:"Message",rows:"6"}),t.fmsg.length,"/160 Characters ",u.a.createElement("br",null),"0",t.fmsg.length>0?t.fmsg.length>160?Math.ceil(t.fmsg.length/153):1:0," ","Message")))))))))}}]),t}(i.Component);t.default=Object(v.b)(function(e){return{smsstate:e.smsNotif,univ:e.univ}},{showError:b.w,changesms:y.a,getEvents:y.g,fliterMsg:y.c,pushSms:y.k})(S)},272:function(e,t,a){"use strict";var n=a(268),r=a.n(n),o=a(265),c=a.n(o),l=a(1),s=a.n(l),i=a(333),u=a(551),d=a(549),p=a(267);function h(e){var t=e.children,a=e.className,n=e.clearing,o=e.content,l=e.fitted,f=e.hidden,m=e.horizontal,g=e.inverted,E=e.section,v=e.vertical,b=c()("ui",Object(i.a)(n,"clearing"),Object(i.a)(l,"fitted"),Object(i.a)(f,"hidden"),Object(i.a)(m,"horizontal"),Object(i.a)(g,"inverted"),Object(i.a)(E,"section"),Object(i.a)(v,"vertical"),"divider",a),y=Object(u.a)(h,e),w=Object(d.a)(h,e);return s.a.createElement(w,r()({},y,{className:b}),p.a.isNil(t)?o:t)}h.handledProps=["as","children","className","clearing","content","fitted","hidden","horizontal","inverted","section","vertical"],h.propTypes={},t.a=h},321:function(e,t,a){"use strict";a.d(t,"g",function(){return s}),a.d(t,"h",function(){return i}),a.d(t,"i",function(){return u}),a.d(t,"j",function(){return d}),a.d(t,"k",function(){return p}),a.d(t,"b",function(){return h}),a.d(t,"d",function(){return f}),a.d(t,"f",function(){return m}),a.d(t,"e",function(){return g}),a.d(t,"a",function(){return E}),a.d(t,"c",function(){return v});var n=a(41),r=a.n(n),o=a(68),c=a(269),l=a(266),s=function(e,t){return function(){var a=Object(o.a)(r.a.mark(function a(n,o){var s,i,u,d;return r.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return s=o(),n({type:"SET_LOADER"}),a.next=4,c.a.get("/app.php",{params:{a:"getEvents_new",univcode:s.univ.funivcode,fsendto:t,fevttype:e}});case 4:i=a.sent,n({type:"UNSET_LOADER"}),console.log(i),"object"!==typeof i.data?(u={header:"Error",content:"Something went wrong"},n(Object(l.w)(u))):-1===i.data.error_code?(d={header:"Error",content:i.data.data.msg},n(Object(l.w)(d))):n({type:"GET_EVENTS",payload:i.data});case 8:case"end":return a.stop()}},a)}));return function(e,t){return a.apply(this,arguments)}}()},i=function(){return function(){var e=Object(o.a)(r.a.mark(function e(t,a){var n,o,s,i;return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=a(),t({type:"SET_LOADER"}),e.next=4,c.a.get("/app.php",{params:{a:"getSMSDet",univcode:n.univ.funivcode}});case 4:o=e.sent,t({type:"UNSET_LOADER"}),console.log(o),"object"!==typeof o.data?(s={header:"Error",content:"Something went wrong"},t(Object(l.w)(s))):-1===o.data.error_code?(i={header:"Error",content:o.data.data.msg},t(Object(l.w)(i))):t({type:"GET_MESSAGES",payload:o.data});case 8:case"end":return e.stop()}},e)}));return function(t,a){return e.apply(this,arguments)}}()},u=function(){return function(){var e=Object(o.a)(r.a.mark(function e(t,a){var n,o,s,i;return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=a(),t({type:"SET_LOADER"}),e.next=4,c.a.get("/app.php",{params:{a:"getNotificationDet",univcode:n.univ.funivcode}});case 4:o=e.sent,t({type:"UNSET_LOADER"}),"object"!==typeof o.data?(s={header:"Error",content:"Something went wrong"},t(Object(l.w)(s))):-1===o.data.error_code?(i={header:"Error",content:o.data.data.msg},t(Object(l.w)(i))):t({type:"GET_NOTIFICATIONS",payload:o.data});case 7:case"end":return e.stop()}},e)}));return function(t,a){return e.apply(this,arguments)}}()},d=function(e){return function(){var t=Object(o.a)(r.a.mark(function t(a,n){var o,s,i,u,d;return r.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o=n(),a({type:"SET_LOADER"}),t.next=4,c.a.post("app.php?a=pushNotificationData&univcode="+o.univ.funivcode,{data:e});case 4:s=t.sent,a({type:"UNSET_LOADER"}),"object"!==typeof s.data?(i={header:"Error",content:"Something went wrong"},a(Object(l.w)(i))):-1===s.data.error_code?(u={header:"Error",content:s.data.data.msg},a(Object(l.w)(u))):(d={header:"Success",content:s.data.data.msg},a(E("fresevent",s.data.data.event)),a(Object(l.w)(d)));case 7:case"end":return t.stop()}},t)}));return function(e,a){return t.apply(this,arguments)}}()},p=function(e){return function(){var t=Object(o.a)(r.a.mark(function t(a,n){var o,s,i,u,d;return r.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o=n(),a({type:"SET_LOADER"}),t.next=4,c.a.post("app.php?a=pushSmsnew&univcode="+o.univ.funivcode,{data:o.smsNotif,fdeggrp:e.fdeggrp,fstudtype:e.fstudtype,fmodule:e.fmodule});case 4:s=t.sent,a({type:"UNSET_LOADER"}),"object"!==typeof s.data?(i={header:"Error",content:"Something went wrong"},a(Object(l.w)(i))):-1===s.data.error_code?(u={header:"Error",content:s.data.data.msg},a(Object(l.w)(u))):(d={header:"Success",content:s.data.data.msg},a(E("fresevent",s.data.data.event)),a(Object(l.w)(d)));case 7:case"end":return t.stop()}},t)}));return function(e,a){return t.apply(this,arguments)}}()},h=function(e,t,a){return function(){var e=Object(o.a)(r.a.mark(function e(n,o){var s,i,u,d,p;return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s=o(),n({type:"SET_LOADER"}),e.next=4,c.a.post("app.php?a=deleteSms&univcode="+s.univ.funivcode+"&fdeggrp="+s.user.fdeggrp,{fenttype:t,fusertype:a});case 4:i=e.sent,n({type:"UNSET_LOADER"}),"object"!==typeof i.data?(u={header:"Error",content:"Something went wrong"},n(Object(l.w)(u))):-1===i.data.error_code?(d={header:"Error",content:i.data.data.msg},n(Object(l.w)(d))):(p={header:"Success",content:i.data.data.msg},n(Object(l.w)(p)));case 7:case"end":return e.stop()}},e)}));return function(t,a){return e.apply(this,arguments)}}()},f=function(e){return function(){var t=Object(o.a)(r.a.mark(function t(a,n){var o,s,i,u;return r.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o=n(),a({type:"SET_LOADER"}),t.next=4,c.a.post("/app.php?a=getColleges&univcode="+o.univ.funivcode,{data:e});case 4:s=t.sent,a({type:"UNSET_LOADER"}),"object"!==typeof s.data?(i={header:"Error",content:"Something went wrong"},a(Object(l.w)(i))):-1===s.data.error_code?(u={header:"Error",content:s.data.data.msg},a(Object(l.w)(u))):a({type:"GET_COLLEGES",payload:s.data});case 7:case"end":return t.stop()}},t)}));return function(e,a){return t.apply(this,arguments)}}()},m=function(e){return function(){var t=Object(o.a)(r.a.mark(function t(a,n){var o,l;return r.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o=n(),a({type:"SET_LOADER"}),t.next=4,c.a.post("/app.php?a=getDegreesdetails&univcode="+o.univ.funivcode,{data:e});case 4:l=t.sent,a({type:"UNSET_LOADER"}),"object"!==typeof l.data||-1===l.data.error_code||a({type:"GET_DEGREES",payload:l.data});case 7:case"end":return t.stop()}},t)}));return function(e,a){return t.apply(this,arguments)}}()},g=function(e){return function(){var t=Object(o.a)(r.a.mark(function t(a,n){var o,l;return r.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o=n(),a({type:"SET_LOADER"}),t.next=4,c.a.post("/app.php?a=getDegfromDeggrp&univcode="+o.univ.funivcode,{data:e});case 4:l=t.sent,a({type:"UNSET_LOADER"}),"object"!==typeof l.data||-1===l.data.error_code||a({type:"GET_DEGREE_FROM_DEGGRP",payload:l.data});case 7:case"end":return t.stop()}},t)}));return function(e,a){return t.apply(this,arguments)}}()},E=function(e,t){return{type:"CHANGE_SMS",payload:{name:e,value:t}}},v=function(e,t){return{type:"FILTER_MSG",payload:{name:e,value:t}}}}}]);
//# sourceMappingURL=117.7c52499b.chunk.js.map
|