1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[578],{81816:function(e,a,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dashboard/injestdata",function(){return s(60743)}])},82608:function(e,a,s){"use strict";s.d(a,{Z:function(){return H}});var n=s(24246),t=s(27378),l=s(14678),i=s(82099),r=s(83341),d=s(64968),c=s(73860),o=s(41827),p=s(96459),m=s(49451),h=s.n(m);let u=e=>{let{user:a}=(0,o.aF)();return(0,n.jsx)("div",{children:(0,n.jsx)(h(),{email:(null==a?void 0:a.email)||"[email protected]",size:e.size||50,rating:"pg",className:e.className})})};u.propTypes={};var g=s(5152),x=s.n(g),v=s(38944),j=s(41664),f=s.n(j),b=s(32699),N=s(49829),y=s(34412),D=s(44332);let C=x()(()=>s.e(428).then(s.bind(s,45428)),{loadableGenerated:{webpack:()=>[45428]},ssr:!1}),w=[{name:"Dashboard",href:"/dashboard"},{name:"Stats",href:"/stats/raw"},{name:"Team",href:"/team"},{name:"New Data",href:"/dashboard/data"}],S=[{name:"Sign out",href:"/api/auth/logout"}];function H(e){let{children:a,currentPage:s,secondaryNav:m}=e,{user:h}=(0,o.aF)();null==h||h.email;let{data:g,error:x}=(0,b.Z)("/api/v1/get-user-details",N.pv),j=(0,y.I0)();return(0,t.useEffect)(()=>{j((0,D.X)(g))},[g]),(0,y.v9)(e=>e.userDetails.user),(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("div",{className:"min-h-full",children:[(0,n.jsx)(l.p,{as:"nav",className:"border-b border-gray-200 bg-white ",children:e=>{let{open:a}=e;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"mx-auto max-w-7xl px-4 sm:px-6 lg:px-8",children:[(0,n.jsxs)("div",{className:"flex h-12 justify-between",children:[(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)("div",{className:"flex flex-shrink-0 items-center",children:(0,n.jsx)(f(),{href:"/",children:(0,n.jsx)("h1",{className:"text-3xl tracking-wider font-bold",children:(0,n.jsx)("span",{className:"text-gradient ",children:p.Z.projectName})})})}),(0,n.jsx)("div",{className:"hidden sm:-my-px sm:ml-6 sm:flex sm:space-x-8",children:w.map(e=>(0,n.jsx)("a",{href:e.href,className:(0,v.Z)(e.name===s?"border-indigo-500 text-zinc-800 dark:text-zinc-100":"border-transparent text-zinc-500 dark:text-zinc-400 hover:border-gray-300 hover:text-zinc-700","inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium"),"aria-current":e.name===s?"page":void 0,children:e.name},e.name))})]}),(0,n.jsxs)("div",{className:"hidden sm:ml-6 sm:flex sm:items-center",children:[(0,n.jsx)(C,{}),(0,n.jsxs)(i.v,{as:"div",className:"relative ml-3",children:[(0,n.jsx)("div",{children:(0,n.jsxs)(i.v.Button,{className:"flex max-w-xs items-center rounded-full bg-white text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",children:[(0,n.jsx)("span",{className:"sr-only",children:"Open user menu"}),(0,n.jsx)(u,{size:40,className:"rounded-full"})]})}),(0,n.jsx)(r.u,{as:t.Fragment,enter:"transition ease-out duration-200",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:(0,n.jsx)(i.v.Items,{className:"absolute right-0 z-10 mt-2 w-48 origin-top-right rounded-md bg-white py-1 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",children:S.map(e=>(0,n.jsx)(i.v.Item,{children:a=>{let{active:s}=a;return(0,n.jsx)("a",{href:e.href,className:(0,v.Z)(s?"bg-gray-100":"","block px-4 py-2 text-sm text-zinc-700"),children:e.name})}},e.name))})})]})]}),(0,n.jsx)("div",{className:"-mr-2 flex items-center sm:hidden",children:(0,n.jsxs)(l.p.Button,{className:"inline-flex items-center justify-center rounded-md bg-white p-2 text-zinc-400 hover:bg-gray-100 hover:text-zinc-500 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",children:[(0,n.jsx)("span",{className:"sr-only",children:"Open main menu"}),a?(0,n.jsx)(d.Z,{className:"block h-6 w-6","aria-hidden":"true"}):(0,n.jsx)(c.Z,{className:"block h-6 w-6","aria-hidden":"true"})]})})]}),(0,n.jsx)("div",{children:m})]}),(0,n.jsxs)(l.p.Panel,{className:"sm:hidden",children:[(0,n.jsx)("div",{className:"space-y-1 pt-2 pb-3",children:w.map(e=>(0,n.jsx)(l.p.Button,{as:"a",href:e.href,className:(0,v.Z)(e.current?"bg-indigo-50 border-indigo-500 text-indigo-700":"border-transparent text-zinc-600 hover:bg-gray-50 hover:border-gray-300 hover:text-zinc-800","block pl-3 pr-4 py-2 border-l-4 text-base font-medium"),"aria-current":e.current?"page":void 0,children:e.name},e.name))}),(0,n.jsx)("div",{className:"border-t border-gray-200 pt-4 pb-3",children:(0,n.jsx)("div",{className:"mt-3 space-y-1",children:S.map(e=>(0,n.jsx)(l.p.Button,{as:"a",href:e.href,className:"block px-4 py-2 text-base font-medium text-zinc-500 hover:bg-gray-100 hover:text-zinc-800",children:e.name},e.name))})})]})]})}}),(0,n.jsx)("div",{className:"py-4",children:(0,n.jsx)("main",{children:(0,n.jsx)("div",{className:"mx-auto max-w-7xl",children:a})})})]})})}},60743:function(e,a,s){"use strict";s.r(a),s.d(a,{__N_SSP:function(){return d},default:function(){return c}});var n=s(24246),t=s(82608),l=s(27378),i=function(e){let{name:a,placeholder:s,unit:t,heading:l,value:i,onChange:r,inputProps:d}=e;return(0,n.jsxs)("div",{className:"flex p-1 mt-2",children:[(0,n.jsx)("span",{className:"".concat(null===l?"hidden":"mr-2"),children:l}),(0,n.jsx)("input",{...d,value:i,name:a,placeholder:s,className:"input input-bordered input-sm w-full max-w-xs mr-2 text-black",onChange:r}),(0,n.jsx)("p",{children:t})]})},r=s(70594),d=!0;
1function c(e){var a,s,d,c,o,p,m,h,u,g,x,v,j,f;let{data:b}=e,[N,y]=(0,l.useState)({speechDatacollected:{magdap:b.dataFunnel.speechDatacollected.magdap,shaip:b.dataFunnel.speechDatacollected.shaip},speechDataDelivered:{magdap:b.dataFunnel.speechDataDelivered.magdap,shaip:b.dataFunnel.speechDataDelivered.shaip},speechDataPassedQC:{magdap:b.dataFunnel.speechDataPassedQC.magdap,shaip:b.dataFunnel.speechDataPassedQC.shaip},dataUploaded:{magdap:b.dataFunnel.dataUploaded.magdap,shaip:b.dataFunnel.dataUploaded.shaip}}),[D,C]=(0,l.useState)({dataCollection:{magdap:b.geographicalPresenceData.dataCollection.magdap,shaip:b.geographicalPresenceData.dataCollection.shaip},totalQC:b.geographicalPresenceData.totalQC,totalFreelancers:b.geographicalPresenceData.totalFreelancers}),[w,S]=(0,l.useState)({transcriptionHoursReceived:{magdap:b.transcriptionData.transcriptionHoursReceived.magdap,shaip:b.transcriptionData.transcriptionHoursReceived.shaip},qcApprovedTranscription:{magdap:b.transcriptionData.qcApprovedTranscription.magdap,shaip:b.transcriptionData.qcApprovedTranscription.shaip}}),[H,F]=(0,l.useState)(b.imagesCollected);return console.log(N,D,H),(0,n.jsx)(t.Z,{currentPage:"None",children:(0,n.jsx)("div",{className:"items-center mt-12",children:(0,n.jsxs)("form",{onSubmit:function(e){e.preventDefault();try{r.Z.put("/api/v1/injest-data",{dataFunnel:N,geographicalPresenceData:D,transcriptionData:w,imagesCollected:H})}catch(e){console.log(e)}},children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"border-b-4",children:(0,n.jsx)("h1",{className:"text-2xl font-semibold py-2",children:"Data Funnel"})}),(0,n.jsxs)("div",{className:"mt-4 grid grid-cols-4 gap-8",children:[(0,n.jsxs)("div",{className:"mt-2",children:[(0,n.jsx)("label",{className:"flex",children:"Speech data collected:"}),(0,n.jsx)(i,{type:"number",heading:"Magdap",value:null===(a=N.speechDatacollected)||void 0===a?void 0:a.magdap,name:"name",placeholder:"Magdap",unit:"Hrs",onChange:e=>{y({...N,speechDatacollected:{...N.speechDatacollected,magdap:e.target.value}})}}),(0,n.jsx)(i,{type:"number",heading:"Shaip",value:null===(s=N.speechDatacollected)||void 0===s?void 0:s.shaip,name:"name",placeholder:"Shaip",unit:"Hrs",onChange:e=>{y({...N,speechDatacollected:{...N.speechDatacollected,shaip:e.target.value}})}})]}),(0,n.jsxs)("div",{className:"mt-2",children:[(0,n.jsx)("label",{className:"flex",children:"Speech data delivered:"}),(0,n.jsx)(i,{type:"number",heading:"Magdap",value:null===(d=N.speechDataDelivered)||void 0===d?void 0:d.magdap,name:"name",placeholder:"Magdap",unit:"Hrs",onChange:e=>{y({...N,speechDataDelivered:{...N.speechDataDelivered,magdap:e.target.value}})}}),(0,n.jsx)(i,{type:"number",heading:"Shaip",value:null===(c=N.speechDataDelivered)||void 0===c?void 0:c.shaip,name:"name",placeholder:"Shaip",unit:"Hrs",onChange:e=>{y({...N,speechDataDelivered:{...N.speechDataDelivered,shaip:e.target.value}})}})]}),(0,n.jsxs)("div",{className:"mt-2",children:[(0,n.jsx)("label",{className:"flex",children:"Speech data passed QC:"}),(0,n.jsx)(i,{type:"number",heading:"Magdap",value:null===(o=N.speechDataPassedQC)||void 0===o?void 0:o.magdap,name:"name",placeholder:"Magdap",unit:"Hrs",onChange:e=>{y({...N,speechDataPassedQC:{...N.speechDataPassedQC,magdap:e.target.value}})}}),(0,n.jsx)(i,{type:"number",heading:"Shaip",value:null===(p=N.speechDataPassedQC)||void 0===p?void 0:p.shaip,name:"name",placeholder:"Shaip",unit:"Hrs",onChange:e=>{y({...N,speechDataPassedQC:{...N.speechDataPassedQC,shaip:e.target.value}})}})]}),(0,n.jsxs)("div",{className:"mt-2",children:[(0,n.jsx)("label",{className:"flex",children:"Data uploaded:"}),(0,n.jsx)(i,{type:"number",heading:"Magdap",value:null===(m=N.dataUploaded)||void 0===m?void 0:m.magdap,name:"name",placeholder:"Magdap",unit:"Hrs",onChange:e=>{y({...N,dataUploaded:{...N.dataUploaded,magdap:e.target.value}})}}),(0,n.jsx)(i,{type:"number",heading:"Shaip",value:null===(h=N.dataUploaded)||void 0===h?void 0:h.shaip,name:"name",placeholder:"Shaip",unit:"Hrs",onChange:e=>{y({...N,dataUploaded:{...N.dataUploaded,shaip:e.target.value}})}})]})]})]}),(0,n.jsxs)("div",{className:"mt-4 grid grid-cols-2 gap-8",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h1",{className:"text-2xl font-semibold py-2 border-b-2",children:"Geographical Presence"}),(0,n.jsxs)("div",{className:"mt-4 grid grid-cols-2 gap-8",children:[(0,n.jsxs)("div",{className:"mt-2",children:[(0,n.jsx)("label",{className:"flex",children:"Data collection:"}),(0,n.jsx)(i,{type:"number",heading:"Magdap",value:null===(u=D.dataCollection)||void 0===u?void 0:u.magdap,name:"name",placeholder:"Magdap",unit:"Hrs",onChange:e=>{C({...D,dataCollection:{...D.dataCollection,magdap:e.target.value}})}}),(0,n.jsx)(i,{type:"number",heading:"Shaip",value:null===(g=D.dataCollection)||void 0===g?void 0:g.shaip,name:"name",placeholder:"shaip",unit:"Hrs",onChange:e=>{C({...D,dataCollection:{...D.dataCollection,shaip:e.target.value}})}})]}),(0,n.jsxs)("div",{className:"mt-2",children:[(0,n.jsx)("label",{className:"flex",children:"QC:"}),(0,n.jsx)(i,{type:"number",value:D.totalQC,name:"name",placeholder:"shaip",unit:"Districts",heading:"OC of",onCh
1ange:e=>{C({...D,totalQC:e.target.value})}}),(0,n.jsx)(i,{type:"number",value:D.totalFreelancers,name:"name",placeholder:"",unit:"Freelancers",heading:"Total",onChange:e=>{C({...D,totalFreelancers:e.target.value})}})]})]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"border-b-2 flex",children:(0,n.jsx)("h1",{className:"text-2xl font-semibold py-2",children:"Transcription Data"})}),(0,n.jsxs)("div",{className:"mt-4 grid grid-cols-2 gap-4",children:[(0,n.jsxs)("div",{className:"mt-2",children:[(0,n.jsx)("label",{className:"flex",children:"Transcription Hours Received:"}),(0,n.jsx)(i,{type:"number",heading:"Magdap",value:null===(x=w.transcriptionHoursReceived)||void 0===x?void 0:x.magdap,name:"name",placeholder:"Magdap",unit:"Hrs",onChange:e=>{S({...w,transcriptionHoursReceived:{...w.transcriptionHoursReceived,magdap:e.target.value}})}}),(0,n.jsx)(i,{type:"number",heading:"Shaip",value:null===(v=w.transcriptionHoursReceived)||void 0===v?void 0:v.shaip,name:"name",placeholder:"Shaip",unit:"Hrs",onChange:e=>{S({...w,transcriptionHoursReceived:{...w.transcriptionHoursReceived,shaip:e.target.value}})}})]}),(0,n.jsxs)("div",{className:"mt-2",children:[(0,n.jsx)("label",{className:"flex",children:"Speech data delivered:"}),(0,n.jsx)(i,{type:"number",heading:"Magdap",value:null===(j=w.qcApprovedTranscription)||void 0===j?void 0:j.magdap,name:"name",placeholder:"Magdap",unit:"Hrs",onChange:e=>{S({...w,qcApprovedTranscription:{...w.qcApprovedTranscription,magdap:e.target.value}})}}),(0,n.jsx)(i,{type:"number",heading:"Shaip",value:null===(f=w.qcApprovedTranscription)||void 0===f?void 0:f.shaip,name:"name",placeholder:"Shaip",unit:"Hrs",onChange:e=>{S({...w,qcApprovedTranscription:{...w.qcApprovedTranscription,shaip:e.target.value}})}})]})]})]})]}),(0,n.jsxs)("div",{className:"mt-4",children:[(0,n.jsx)("h1",{className:"text-2xl font-semibold py-2 border-b-2",children:"Images Collected"}),(0,n.jsx)("div",{className:"mt-4 grid grid-cols-4 gap-4",children:(0,n.jsxs)("div",{className:"mt-2",children:[(0,n.jsx)("label",{className:"flex",children:"Data collection:"}),(0,n.jsx)(i,{type:"number",value:H,name:"name",placeholder:"Total Images Collected",unit:"Images",onChange:e=>{F(e.target.value)}})]})}),(0,n.jsx)("div",{className:"flex justify-end",children:(0,n.jsx)("input",{className:"btn mt-4 mr-0 flex justify-end",type:"submit",value:"Submit"})})]})]})})})}},49829:function(e,a,s){"use strict";s.d(a,{JI:function(){return l},P1:function(){return i},pv:function(){return t}});var n=s(70594);let t=async(e,a)=>(await n.Z.get(e,a)).data,l=async(e,a,s)=>await n.Z.post("/api/v1/add-member",{email:e,role:a,org:s}),i=async(e,a,s)=>await n.Z.put("/api/v1/add-member",{email:e,role:a,org:s})}},function(e){e.O(0,[664,889,293,763,888,774,179],function(){return e(e.s=81816)}),_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.