PageSourceSearch

https://thinkproedge.com/_next/static/chunks/pages/admin/faculty/timetable-a474d654cb047441.js

js thinkproedge.com collected 2026-10-02 01:48:01 UTC 7,780 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8329],{99492:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/faculty/timetable",function(){return s(18879)}])},7194:function(e,t,s){"use strict";var n=s(85893),a=s(48764),i=s(25543),l=s(3689),o=(0,a.B)({colors:{brand:{primary:"#f15a2d",secondary:"#372d63"}},styles:{global:{}},components:{Button:{variants:{theme:{bg:"#f15a2d",color:"white",border:"2px solid #f15a2d",_hover:{bg:"white",color:"#f15a2d"},_active:{bg:"white",color:"#f15a2d"}}}},Menu:{parts:["menu","item"],baseStyle:{menu:{},item:{fontWeight:"medium",lineHeight:"normal",color:"gray.600",fontSize:"0.95rem",pl:5,py:3}}}}});t.Z=function(e){var t=e.children;return(0,n.jsxs)(i.x,{theme:o,children:[(0,n.jsx)(l.m,{}),t]})}},18879:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return A}});var n=s(4111),a=s(47568),i=s(51438),l=s(52951),o=s(14924),c=s(88029),r=s(60460),d=s(10092),h=s(85893),u=s(67294),m=s(70978),f=s(11163),x=s.n(f),g=s(53850),j=s(48017),p=s(64115),_=s(24003),b=s(38104),v=s(44448),y=s(87341),C=s(45754),w=s(9345),T=s(7194),M=s(64790),D=s(17289),Z=s(30381),S=s.n(Z),F=s(96827),Y=s(51641),E=s(38448),O=s(83346),k=function(e){var t=e.from,s=e.id,n=e.closeModal,a=(0,u.useState)(!0),i=a[0],l=a[1],o=(0,u.useState)({}),c=o[0],r=o[1];return(0,u.useEffect)((function(){"class_schedule"==t?(0,D.jLy)(s).then((function(e){var t,s=e.data;r({date:S()(s.class_date).format("Do MMM YYYY"),timing:S()(s.class_date+" "+s.time_from).format("hh:mm A")+" - "+S()(s.class_date+" "+s.time_to).format("hh:mm A"),mode:"0"==s.class_type?"Online":"Offline",admissionCodes:s.admission_id.map((function(e){return e.admission.admission_code})).join(", "),colleges:s.admission_id.map((function(e){return e.admission.college.college_name})).join(", "),topics:null===(t=s.class_progresses)||void 0===t?void 0:t.map((function(e){return e.topic.name})).join(", ")}),l(!1)})).catch((function(e){console.log("Error: ",e)})):"timetable"==t&&(0,D.F$H)(s).then((function(e){var t=e.data;r({date:S()(t.class_date).format("Do MMM YYYY"),timing:S()(t.class_date+" "+t.timetable.time_from).format("hh:mm A")+" - "+S()(t.class_date+" "+t.timetable.time_to).format("hh:mm A"),mode:"0"==t.timetable.class_type?"Online":"Offline",admissionCodes:t.admission_id.map((function(e){return e.admission_code})).join(", "),colleges:t.admission_id.map((function(e){return e.college.college_name})).join(", ")}),l(!1)})).catch((function(e){console.log("Error: ",e)}))}),[]),(0,h.jsx)(h.Fragment,{children:(0,h.jsxs)(Y.u_,{isCentered:!0,onClose:n,isOpen:!0,children:[(0,h.jsx)(Y.ZA,{}),(0,h.jsxs)(Y.hz,{children:[(0,h.jsx)(Y.ol,{}),(0,h.jsx)(Y.fe,{children:(0,h.jsxs)(j.xu,{children:[(0,h.jsx)(E.M,{my:5,children:(0,h.jsx)(p.x,{fontSize:"2xl",children:"Class Details"})}),i?(0,h.jsx)(E.M,{my:5,children:(0,h.jsx)(C.$,{})}):(0,h.jsx)(O.iA,{variant:"simple",my:5,children:(0,h.jsxs)(O.p3,{children:[(0,h.jsxs)(O.Tr,{children:[(0,h.jsx)(O.Td,{children:"Date"}),(0,h.jsx)(O.Td,{children:c.date})]}),(0,h.jsxs)(O.Tr,{children:[(0,h.jsx)(O.Td,{children:"Timing"}),(0,h.jsx)(O.Td,{children:c.timing})]}),(0,h.jsxs)(O.Tr,{children:[(0,h.jsx)(O.Td,{children:"Mode"}),(0,h.jsx)(O.Td,{children:c.mode})]}),(0,h.jsxs)(O.Tr,{children:[(0,h.jsx)(O.Td,{children:"Admission Codes"}),(0,h.jsx)(O.Td,{children:c.admissionCodes})]}),(0,h.jsxs)(O.Tr,{children:[(0,h.jsx)(O.Td,{children:"Colleges"}),(0,h.jsx)(O.Td,{children:c.colleges})]}),(0,h.jsxs)(O.Tr,{children:[(0,h.jsx)(O.Td,{children:"Topics covered"}),(0,h.jsx)(O.Td,{children:c.topics})]})]})})]})})]})]})})},I=(0,F.Zt)(S()),z=function(e){(0,c.Z)(s,e);var t=(0,r.Z)(s);function s(){var e;(0,i.Z)(this,s),e=t.apply(this,arguments),(0,o.Z)((0,n.Z)(e),"state",{loggedIn:!1,loading:!1,viewData:!1,faculties:[],timetable:[{id:1,start:new Date("2022-06-06 11:00:00"),end:new Date("2022-06-06 12:00:00")}],selectedFaculty:"0",selectedMonth:S()().format("YYYY-MM"),showClassDetails:!1,selectedClassId:null,classFrom:null});var l=(0,n.Z)(e);return(0,o.Z)((0,n.Z)(e),"handleFacultyChange",function(){var e=(0,a.Z)((function(e){return(0,d.__generator)(this,(function(t){return console.log("handleFacultyChange",e),l.setState({selectedFaculty:e}),l.getData(e,l.state.selectedMonth),[2]}))}
1));return function(t){return e.apply(this,arguments)}}()),(0,o.Z)((0,n.Z)(e),"handleMonthChange",(function(t,s){if(console.log("handleMonthChange",t,s),"month"==s){var n=S()(t).format("YYYY-MM");e.setState({selectedMonth:n}),e.getData(e.state.selectedFaculty,n)}})),(0,o.Z)((0,n.Z)(e),"getData",(function(t,s){e.setState({loading:!0}),(0,D.jRX)(t,s).then((function(t){var s=t.data,n=[];s.publishedTimetable.map((function(e){n.push({title:e.subject.name,start:new Date(e.class_date+" "+e.time_from),end:new Date(e.class_date+" "+e.time_to),class_type:0==e.class_type?"Online":"Offline",color:0==e.class_status?"grey":1==e.class_status?"green":"red",class_status:e.class_status,classId:e.id,classFrom:"class_schedule"})})),s.unpublishedTimetable.map((function(e){n.push({title:e.subject.name,start:new Date(e.class_date+" "+e.timetable.time_from),end:new Date(e.class_date+" "+e.timetable.time_to),class_type:0==e.timetable.class_type?"Online":"Offline",color:e.timetable.is_published?"orange":"red",classId:e.id,classFrom:"timetable"})})),e.setState({timetable:n,viewData:!0,loading:!1})})).catch((function(e){console.log(e,e.response)}))})),(0,o.Z)((0,n.Z)(e),"handleEventClick",(function(t){console.log("handleEventClick"),console.log(t),e.setState({selectedClassId:t.classId,classFrom:t.classFrom,showClassDetails:!0})})),e}return(0,l.Z)(s,[{key:"componentDidMount",value:function(){var e=this;if(!(0,m.jl)("admin"))return x().push("/login");this.setState({loggedIn:!0}),(0,D.ufO)().then((function(t){var s=t.data;e.setState({faculties:s})})).catch((function(e){console.log(e,e.response)}))}},{key:"render",value:function(){var e=this;return this.state.loggedIn&&(0,h.jsxs)(T.Z,{children:[(0,h.jsx)(M.Z,{children:(0,h.jsx)(g.W,{bg:"gray.100",minWidth:"full",minHeight:"full",p:[2,10,10],children:(0,h.jsxs)(j.xu,{bg:"white",p:"7",border:"1px",borderColor:"gray.200",borderRadius:"5",children:[(0,h.jsx)(p.x,{fontSize:"2xl",children:"View Faculty Timetable"}),(0,h.jsx)(_.i,{my:"4"}),(0,h.jsx)(j.xu,{p:"5",children:(0,h.jsxs)(w.r,{templateColumns:"repeat(6, 1fr)",gap:"6",children:[(0,h.jsxs)(w.P,{colSpan:[6,3,1],children:[(0,h.jsx)(p.x,{mb:3,children:"Faculty: "}),(0,h.jsxs)(b.Ph,{defaultValue:"0",onChange:function(t){return e.handleFacultyChange(t.target.value)},children:[(0,h.jsx)("option",{value:"0",hidden:!0,children:"Select"}),this.state.faculties.map((function(e){return(0,h.jsx)("option",{value:e.id,children:e.name},e.id)}))]})]}),(0,h.jsx)(w.P,{mx:"auto",mt:"auto",colSpan:[6,3,1],children:this.state.loading&&(0,h.jsx)(C.$,{})})]})}),this.state.viewData&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(_.i,{my:"4"}),(0,h.jsxs)(v.Ug,{children:[(0,h.jsx)(y.L,{}),(0,h.jsx)(j.bK,{size:"20px",bg:"green"}),(0,h.jsx)(p.x,{children:"Scheduled"}),(0,h.jsx)(j.bK,{size:"20px",bg:"orange"}),(0,h.jsx)(p.x,{children:"Published but not scheduled "}),(0,h.jsx)(j.bK,{size:"20px",bg:"red"}),(0,h.jsx)(p.x,{children:"Cancelled"})]}),(0,h.jsx)(F.f,{localizer:I,events:this.state.timetable,views:["month"],style:{height:800},onNavigate:this.handleMonthChange,onSelectEvent:this.handleEventClick,eventPropGetter:function(e){return{style:{backgroundColor:e.color}}}})]})]})})}),this.state.showClassDetails&&(0,h.jsx)(k,{from:this.state.classFrom,id:this.state.selectedClassId,closeModal:function(){return e.setState({showClassDetails:!1})}})]})}}]),s}(u.Component),A=z}},function(e){e.O(0,[4885,2770,5844,9676,7612,5543,9667,9697,2328,4005,9015,1641,298,4997,2482,4790,9774,2888,179],(function(){return t=99492,e(e.s=t);var t}));var t=e.O();_N_E=t}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.