PageSourceSearch

https://ireadify.com/_next/static/chunks/pages/admin/schools/edit/[id]-d5b03bf3965cd672.js

js ireadify.com collected 2026-09-28 12:27:15 UTC 8,352 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8290],{64805:function(e,r,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/schools/edit/[id]",function(){return t(97707)}])},13155:function(e){"use strict";e.exports={userRole:{admin:"owner",school:"school",teacher:"teacher"},isDeleted:{yes:1,no:0},bookType:{AUDIO:"AUDIO",EPUB:"EPUB",READALOUD:"READALOUD"},assignmentProgress:{notStarted:"NOT_STARTED",started:"STARTED",inProgress:"IN_PROGRESS",completed:"COMPLETED",pastDue:"PAST_DUE"},assignmentCompletedMinutes:15,subscriptionType:{paypal:"PAYPAL",authorizeNet:"AUTHORIZENET"},region:{region1:"Asia",region2:"Africa",region3:"North America",region4:"Caribbean",region5:"Europe",region6:"Other"},genre:{genre1:"Fiction",genre2:"Non-Fiction"},topic:{account:"How to Log-in to your iReadify account?",payments:"Subscription & payment",general:"General questions"},ireader:{url:"https://read.ireadify.com/ltigateway.htm",consumerKey:"bd2e37cdc25c42a0cc8397951afc8cf1",secretKey:"770a8908cbd043bdcb4a4e6aff6c75de",lisPersonContactEmailPrimary:"[email protected]"}}},97707:function(e,r,t){"use strict";t.r(r);var s=t(47568),n=t(14924),a=t(51351),i=t(70655),l=t(85893),d=t(67294),o=t(42283),c=t(10552),u=t(44541),m=t(11163),f=t(43133),x=t(51531),b=t(28723),h=t(80958),p=t(78230),g=t.n(p),w=t(9198),y=t.n(w),j=(t(18698),t(30381)),N=t.n(j);r.default=function(){var e=N()().format("YYYY-MM-DD"),r=(0,d.useState)(!1),t=r[0],p=r[1],w=(0,d.useState)(!1),j=w[0],v=w[1];(e=new Date(e)).setHours(0,0,0,0);var S=(0,d.useState)(e),O=S[0],D=S[1],E=(0,m.useRouter)().query.id;(0,d.useEffect)((function(){E&&_(E)}),[E]);var _=function(){var e=(0,s.Z)((function(e){var r,t;return(0,i.__generator)(this,(function(s){switch(s.label){case 0:return[4,c.b.graphql((0,u.wT)(b._B,{id:e},{}))];case 1:return r=s.sent(),t=N()(r.data.getSchoolRequest.expiryDate).format("YYYY-MM-DD"),(t=new Date(t)).setHours(0,0,0,0),D(t),r.data.getSchoolRequest.usedLicences=r.data.getSchoolRequest.noOfStudents-r.data.getSchoolRequest.availableLicences,v(r.data.getSchoolRequest),[2]}}))}));return function(r){return e.apply(this,arguments)}}(),A=(0,o.cI)(),T=A.register,R=A.control,L=A.errors,P=A.handleSubmit,k=function(){var e=(0,s.Z)((function(e){var r,t,s,n;return(0,i.__generator)(this,(function(a){switch(a.label){case 0:return a.trys.push([0,4,,5]),p(!0),e.noOfStudents<j.usedLicences?(alert("Error: no of students must be equal or greater than no of licences used."),[3,3]):[3,1];case 1:return(r=new Date(O)).setHours(23,59,59,59),t={id:j.id,expiryDate:r,noOfStudents:e.noOfStudents,availableLicences:e.noOfStudents-j.usedLicences},(s=j).availableLicences=t.availableLicences,v(s),[4,c.b.graphql((0,u.wT)(x.RW,{input:t}))];case 2:a.sent(),alert("Success: details are updated."),a.label=3;case 3:return p(!1),[3,5];case 4:return n=a.sent(),console.log(n),p(!1),alert("Error: "+n.message),[3,5];case 5:return[2]}}
1))}));return function(r){return e.apply(this,arguments)}}();return(0,l.jsx)(f.Z,{children:(0,l.jsx)("div",{className:"flex flex-1 flex-col md:flex-row lg:flex-row mx-2",children:(0,l.jsxs)("div",{className:"mb-2 border-solid border-gray-300 rounded border shadow-sm w-full",children:[(0,l.jsx)("div",{className:"bg-purple-bright text-white text-bold px-2 py-3 border-solid border-gray-200 border-b",children:"Update School"}),j?(0,l.jsx)("div",{children:(0,l.jsx)("div",{className:"p-3",children:(0,l.jsxs)("form",{className:"w-full",onSubmit:P(k),children:[(0,l.jsxs)("div",{className:"flex flex-wrap -mx-3 mb-6",children:[(0,l.jsxs)("div",{className:"w-full md:w-1/3 px-3 mb-6 md:mb-0",children:[(0,l.jsx)("b",{children:"Organization Name: "}),j.organizationName]}),(0,l.jsxs)("div",{className:"w-full md:w-1/3 px-3 mb-6 md:mb-0",children:[(0,l.jsx)("b",{children:"Organization Type: "}),j.organazationType]}),(0,l.jsxs)("div",{className:"w-full md:w-1/3 px-3 mb-6 md:mb-0",children:[(0,l.jsx)("b",{children:"Email: "}),j.email]})]}),(0,l.jsxs)("div",{className:"flex flex-wrap -mx-3 mb-6",children:[(0,l.jsxs)("div",{className:"w-full md:w-1/3 px-3 mb-6 md:mb-0",children:[(0,l.jsx)("b",{children:"First Name: "}),j.firstName]}),(0,l.jsxs)("div",{className:"w-full md:w-1/3 px-3 mb-6 md:mb-0",children:[(0,l.jsx)("b",{children:"Last Name: "}),j.lastName]}),(0,l.jsxs)("div",{className:"w-full md:w-1/3 px-3 mb-6 md:mb-0",children:[(0,l.jsx)("b",{children:"Role: "}),j.role]})]}),(0,l.jsxs)("div",{className:"flex flex-wrap -mx-3 mb-6",children:[(0,l.jsxs)("div",{className:"w-full md:w-1/3 px-3 mb-6 md:mb-0",children:[(0,l.jsx)("b",{children:"Address: "}),j.address]}),(0,l.jsxs)("div",{className:"w-full md:w-1/3 px-3 mb-6 md:mb-0",children:[(0,l.jsx)("b",{children:"Telephone: "}),j.telephone]}),(0,l.jsxs)("div",{className:"w-full md:w-1/3 px-3 mb-6 md:mb-0",children:[(0,l.jsx)("b",{children:"Requested At: "}),N()(j.createdAt).format("MMMM Do YYYY")]})]}),(0,l.jsxs)("div",{className:"flex flex-wrap -mx-3 mb-6",children:[(0,l.jsxs)("div",{className:"w-full md:w-1/3 px-3 mb-6 md:mb-0",children:[(0,l.jsx)("b",{children:"Code: "}),j.code]}),(0,l.jsxs)("div",{className:"w-full md:w-1/3 px-3 mb-6 md:mb-0",children:[(0,l.jsx)("b",{children:"Available Licenses: "}),j.availableLicences]}),(0,l.jsxs)("div",{className:"w-full md:w-1/3 px-3 mb-6 md:mb-0",children:[(0,l.jsx)("b",{children:"Used Licenses: "}),j.usedLicences]})]}),(0,l.jsxs)("div",{className:"flex flex-wrap -mx-3 mb-6",children:[(0,l.jsxs)("div",{className:"w-full md:w-1/3 px-3 mb-6 md:mb-0",children:[(0,l.jsx)("label",{className:"block uppercase tracking-wide text-grey-darker text-xs font-light mb-1",children:"No of students"}),(0,l.jsx)("input",(0,n.Z)({defaultValue:j.noOfStudents,ref:T({required:!0,pattern:/^[0-9]+$/,validate:function(e){return!!e.trim()}}),name:"noOfStudents",placeholder:"Number of students",className:"appearance-none block w-full bg-grey-200 text-grey-darker border border-grey-200 rounded py-3 px-4 leading-tight focus:outline-none focus:bg-white focus:border-grey",type:"text"},"placeholder","Duration")),"required"===g().get("noOfStudents.type",L)&&(0,l.jsx)("p",{className:"text-red-500 text-xs italic",children:"Please fill out this field."}),"pattern"===g().get("noOfStudents.type",L)&&(0,l.jsx)("p",{className:"text-red-500 text-xs italic",children:"Invalid Number. "})]}),(0,l.jsxs)("div",{className:"w-full md:w-1/3 px-3 mb-6 md:mb-0",children:[(0,l.jsx)("label",{className:"block uppercase tracking-wide text-grey-darker text-xs font-light mb-1",children:"End date"}),(0,l.jsx)(o.Qr,{control:R,name:"expiryDate",defaultValue:O,render:function(e){e=null!==e?e:(0,a.Z)(new TypeError("Cannot destructure undefined"));return(0,l.jsx)(y(),{className:"w-full inline-flex justify-center text-left rounded-md border border-gray-300 shadow-sm px-2 py-2 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-blue-800",selected:O,onChange:function(e){return D(e)},minDate:new Date})}})]})]}),(0,l.jsx)("div",{className:"px-4 py-3 bg-gray-50 text-right mt-4 sm:px-6",children:t?(0,l.jsx)("button",{disabled:!0,type:"submit",className:"inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-gray-400 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",children:"Saving..."}):(0,l.jsx)("button",{type:"submit",className:"inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",children:"Update Date"})})]})})}):(0,l.jsx)(h.Z,{})]})})})}},99534:function(e,r,t){"use strict";function s(e,r){if(null==e)return{};var t,s,n=function(e,r){if(null==e)return{};var t,s,n={},a=Object.keys(e);for(s=0;s<a.length;s++)t=a[s],r.indexOf(t)>=0||(n[t]=e[t]);return n}(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(s=0;s<a.length;s++)t=a[s],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}t.d(r,{Z:function(){return s}})},51351:function(e,r,t){"use strict";function s(e){throw e}t.d(r,{Z:function(){return s}})}},function(e){e.O(0,[1664,3654,3456,1644,4544,3133,1531,9774,2888,179],(function(){return r=64805,e(e.s=r);var r}));var r=e.O();_N_E=r}]);

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.