1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[74963],{72827:function(e,s,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/cms/CPA/curriculum",function(){return t(67860)}])},67860:function(e,s,t){"use strict";t.r(s);var n=t(85893),a=t(67294),i=t(9008),l=t.n(i);t(25675);var r=t(87536),c=t(57543),o=t(47516),d=t(8193),u=t(87066),m=t(6578),h=t(23123),x=t(89214);t(86501),s.default=(0,m.default)(()=>{let e=(0,a.useRef)(null),s=h.Z.getItem("CMSTk"),{register:t,handleSubmit:i,formState:{errors:m},reset:j}=(0,r.cI)(),[p,b]=(0,a.useState)(!1),[w,N]=(0,a.useState)({name:"",time:"Duration",hour:"",questions:[{question:"",answers:""}]}),f=async e=>{e.preventDefault(),v()},v=async()=>{await u.Z.post(x.V1.addCPACurriculum,w,{headers:{"Content-Type":"application/json",Authorization:"JWT ".concat(s)}}),y(),N({name:"",time:"Duration",hour:"",questions:[{question:"",answers:""}]})},[q,C]=(0,a.useState)([]);(0,a.useEffect)(()=>{y()},[]);let y=async()=>{let e=await fetch(x.pm.curriculumSection);C([...(await e.json()).cpaPage.tab_button])},g=async(s,t)=>{var n;null===(n=e.current)||void 0===n||n.focus(),b(!0);let a=await fetch(x.pm.curriculumSection),i=(await a.json()).cpaPage.description.filter((e,t)=>s.id===e.id);N({id:t,name:s.name,time:"Duration",hour:i[0].hour,questions:i[0].quesans.map((e,s)=>({question:e.question,answers:e.answers.map((e,s)=>e)}))}),window.scrollTo(0,0)},P=async e=>{e.preventDefault(),await u.Z.post(x.V1.editCPACurriculum,w,{headers:{"Content-Type":"application/json",Authorization:"JWT ".concat(s)}}),b(!1),N({name:"",time:"Duration",hour:"",questions:[{question:"",answers:""}]}),y()},S=()=>{var s;null===(s=e.current)||void 0===s||s.focus(),b(!1),N({name:"",time:"Duration",hour:"",questions:[{question:"",answers:""}]}),window.scrollTo(0,0)},T=async e=>{confirm("Data Will Be Deleted Permanently.!")&&(await u.Z.post(x.V1.deleteCPACurriculum,{id:e},{headers:{"Content-Type":"application/json",Authorization:"JWT ".concat(s)}}),b(!1),N({name:"",time:"Duration",hour:"",questions:[{question:"",answers:""}]}),y())},A=e=>{let s=w.questions.filter((s,t)=>t!==e);N(()=>({...w,questions:[...s]}))},_=e=>{N({...w,[e.target.name]:e.target.value})},k=(e,s)=>{let{name:t,value:n}=e.target,a=[...w.questions];a[s][t]=n,N(()=>({...w,questions:[...a]}))},D=(e,s)=>{let{name:t,value:n}=e.target,a=[...w.questions];a[s][t]=n.split(","),N(()=>({...w,questions:[...a]}))};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(l(),{children:[(0,n.jsx)("meta",{name:"robots",content:"noindex, nofollow"}),(0,n.jsx)("title",{children:"Posts - Simandhar Education"})]}),(0,n.jsx)(c.default,{}),(0,n.jsx)("section",{className:"section fixedPadd",children:(0,n.jsxs)("div",{className:"container",children:[(0,n.jsx)("h2",{className:"heading03",children:"CPA Curriculum section"}),(0,n.jsxs)("form",{action:"",method:"POST",className:"mt-4",children:[(0,n.jsx)("div",{children:(0,n.jsx)("div",{children:(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"inputFileds bb wdt-full",children:[(0,n.jsx)("label",{htmlFor:"",className:"title01",children:"LHS Title"}),(0,n.jsx)("input",{ref:e,className:"wdt-full bordernone title01",name:"name",type:"text",onChange:e=>_(e),value:w.name})]}),(0,n.jsxs)("div",{className:"inputFileds bb wdt-full mt-4",children:[(0,n.jsx)("label",{htmlFor:"",className:"title01",children:"Duration"}),(0,n.jsx)("input",{className:"wdt-full bordernone title01",name:"hour",onChange:e=>_(e),type:"text",value:w.hour})]}),(0,n.jsx)("br",{}),(0,n.jsx)("br",{}),w.questions.map((e,s)=>(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"inputFileds bb wdt-full",children:[(0,n.jsxs)("label",{htmlFor:"",className:"title01",children:[s+1," RHS Title"]}),(0,n.jsx)("input",{className:"wdt-full bordernone title01",name:"question",type:"text",onChange:e=>k(e,s),value:e.question})]}),(0,n.jsxs)("div",{className:"inputFileds bb wdt-full mt-4",children:[(0,n.jsxs)("label",{htmlFor:"",className:"title01",children:[s+1," Bullets (separate each point with comma,)"]}),(0,n.jsx)("input",{className:"wdt-full bordernone title01",name:"answers",onChange:e=>D(e,s),type:"text",value:e.answers})]}),(0,n.jsx)("div",{className:"two-col",children:(0,n.jsx)("div",{className:"addwrap",children:1!==w.questions.length&&(0,n.jsx)("a",{className:"btn maroon-border-btn mt-4 text-center",onClick:()=>A(s),children:"Remove Q/A"})})}),(0,n.jsx)("br",{})]},s)),(0,n.jsx)("div",{className:"two-col",children:(0,n.jsx)("div",{className:"addwrap",children:(0,n.jsx)("a",{className:"btn maroon-border-btn mt-4 text-center",onClick:()=>{N(()=>({...w,questions:[...w.questions,{question:"",answers:""}]}))},children:"Add More Q/A"})})})]})})}),(0,n.jsx)("div",{className:"two-col",children:(0,n.jsx)("div",{className:"two-col",children:(0,n.jsx)("div",{className:"addwrap",children:p?(0,n.jsx)("input",{type:"submit",className:"btn maroon-border-btn mt-4 text-center",value:"Save",onClick:P}):(0,n.jsx)("input",{type:"submit",className:"btn maroon-border-btn mt-4 text-center",onClick:f,value:"Submit"})})})})]})]})}),(0,n.jsx)("section",{className:"section fixedPadd testimonial-cms-section",children:(0,n.jsxs)("div",{className:"container",children:[(0,n.jsx)("button",{className:"cms-btn edit-box add-btn",onClick:()=>S(),children:"Add New"}),(0,n.jsxs)("table",{cellPadding:"0",cellSpacing:"0",className:"cms-table",children:[(0,n.jsx)("thead",{children:(0,n.jsxs)("tr",{children:[(0,n.jsx)("th",{children:(0,n.jsx)("p",{children:"Sr. No."})}),(0,n.jsx)("th",{children:(0,n.jsx)("p",{children:"Test Name"})}),(0,n.jsx)("th",{style:{width:"100px"},children:(0,n.jsx)("p",{children:"Action"})})]})}),(0,n.jsx)("tbody",{children:q&&q.map((e,s)=>(0,n.jsxs)("tr",{children:[(0,n.jsx)("td",{children:(0,n.jsxs)("p",{children:[s+1,"."]})}),(0,n.jsx)("td",{children:(0,n.jsx)("p",{children:e.name?e.name:"no
1Name Available"})}),(0,n.jsxs)("td",{children:[(0,n.jsx)("button",{className:"cms-btn edit-box",onClick:()=>g(e,e.id),children:(0,n.jsx)(o.vpV,{})}),(0,n.jsx)("button",{className:"cms-btn edit-box",onClick:()=>T(e.id),children:(0,n.jsx)(d.VPh,{})})]})]},s))})]})]})})]})})}},function(e){e.O(0,[7184,79351,49774,49685,65672,94670,92888,14642,40179],function(){return e(e.s=72827)}),_N_E=e.O()}]);
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.