PageSourceSearch

https://www.nycwomeninstem.org/_nuxt/_id_.c5fbffd0.js

js nycwomeninstem.org collected 2026-10-06 22:55:20 UTC 6,883 bytes, 1 lines download raw bytes

1import{_ as j}from"./MyNuxtLink.f0daccb4.js";import{_ as B}from"./LoadingSpinner.e67c3ebb.js";import{f as N,u as L,j as M,k as T,r as m,z as A,G as I,D as R,l as E,o as c,c as u,b as h,w as $,d as g,a as e,s as v,g as l,t as z,q as _,m as d,v as r,H as F,F as X,h as H,x as W}from"./entry.1745472e.js";import{g as G,X as J,t as P}from"./main.a84dfeef.js";import"./nuxt-link.7b81b239.js";import"./_plugin-vue_export-helper.c27b6911.js";const K={class:"flex flex-col gap-4 lg:gap-8"},Q={class:"w-full h-full"},Y={class:"flex flex-col text-neutral-10 h-full"},Z=e("div",{class:"w-full"},[e("div",{class:"stem-tab-selected text-start bg-yellow text-black"}," Edit Vote ")],-1),ee={class:"bg-blue-80 p-2 md:p-4 md:px-6 flex flex-col gap-0.5 md:gap-1.5"},te={class:"py-4 code text-white"},le=["onSubmit"],se={key:0,class:"text-accent-red"},oe={class:"code grid gap-2 grid-cols-6"},ne=e("span",{class:"label-left col-span-6"},"name of vote",-1),ae=["disabled"],ie=e("span",{class:"label-left col-span-6"},"brief description",-1),de=["disabled"],ce=e("span",{class:"label-left col-span-6"},"deadline",-1),ue={class:"col-span-6 relative"},re=["value","disabled"],pe=e("span",{class:"label-left col-span-3"},"pin",-1),me=e("span",{class:"label-left col-span-3"},"vote type",-1),_e=e("option",{value:!0},"multivote",-1),he=e("option",{value:!1},"singlevote",-1),ve=[_e,he],fe=e("span",{class:"label-left col-span-6 flex flex-col"},"options",-1),xe={class:"grid grid-cols-6 w-full gap-2"},be=e("div",{class:"h4 text-right flex items-baseline gap-2 col-span-2"}," title: ",-1),ge=["onUpdate:modelValue"],ye=["onClick"],ke=e("div",{class:"italic flex items-baseline gap-2 col-span-2"}," subtitle: ",-1),Se=["onUpdate:modelValue"],Ve=e("div",{class:"flex items-baseline gap-2 col-span-2"}," author (s): ",-1),we=["onUpdate:modelValue"],Ue=e("div",{class:"italic flex items-baseline gap-2 text-blue col-span-2"}," url ",-1),Ce=["onUpdate:modelValue"],qe=["onClick"],De={class:"col-span-6 flex mt-4"},Oe={key:0,type:"submit",for:"create-vote-form",class:"button-submit ml-auto"},je={key:1,disabled:"",class:"button-submit relative ml-auto"},Be={key:2,disabled:"",class:"button-submit ml-auto opacity-80 hover:bg-black hover:text-yellow-10"},Ne=e("div",{class:"p-container"},null,-1),ze=N({__name:"[id]",setup(Le){const f=W();L({meta:[{name:"ROBOTS",content:"NOINDEX, NOFOLLOW"}]});const x=M(),y=T(),k=m(!0),S=m(null),s=m({name:"",deadline:"",description:"",pin:"0308",multivote:!1,candidates:null});A(()=>{fetch(`${f.public.BASE_URL}/votes/admin/${x.params.id}`,{headers:{Authorization:"Bearer "+localStorage.getItem("token")}}).then(t=>t.json()).then(t=>{S.value=t,s.value.name=t.name,s.value.description=t.description,s.value.deadline=new Date(t.deadline),s.value.pin=t.pin,s.value.multivote=t.multivote,s.value.candidates=[...t.candidates],k.value=!1}).catch(t=>{t.statusMessage==="vote not concluded"&&alert("vote not concluded")})});const a=m("idle"),p=m(""),b=I().username,V=R(()=>G(s.value.deadline));E(s.value,()=>{p.value=""}),m([]);function w(){const t={title:"",subtitle:"",url:"",author:"",id:crypto.randomUUID().slice(0,8),admin:l(b)};s.value.candidates.push(t)}function U(t){s.value.candidates.splice(t,1)}function C(){const t={...s.value,admin:l(b)};if(typeof t.deadline!="object"){p.value="Use the datepicker";return}if(t.deadline=P(t.deadline),t.candidates.length<2){p.value="Include at least 2 options";return}t.submissions=[],a.value="sending",fetch(`${f.public.BASE_URL}/votes/admin/${x.params.id}`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json",Authorization:"Bearer "+localStorage.getItem("token")},body:JSON.stringify(t)}).then(n=>n.json()).then(n=>{n.success?y.push("/admin/vote/"):(p.value=n.msg,a.value="idle")}).catch(n=>(a.value="idle",n))}return(t,n)=>{const q=j,D=B;return c(),u("div",null,[h(q,{class:"button-navigation block",to:"/admin/vote"},{default:$(()=>[g("back to all votes")]),_:1}),e("div",K,[e("div",Q,[e("div",Y,[Z,e("div",ee,[e("div",te,[e("div",null,[e("form",{id:"create-vote-form",onSubmit:v(C,["prevent"])},[l(p)?(c(),u("div",se,z(l(p)),1)):_("",!0),e("div",oe,[ne,d(e("input",{class:"input-text input-text-flex col-span-6",type:"text","onUpdate:modelValue":n[0]||(n[0]=o=>l(s).name=o),placeholder:"e.g. Vote for May 2023 book club",disabled:l(a).value==="sending",required:""},null,8,ae),[[r,l(s).name]]),ie,d(e("textarea",{rows:"3",class:"input-text input-text-flex col-span-6",type:"text","onUpdate:modelValue":n[1]||(n[1]=o=>l(s).description=o),placeholder:"e.g. theme or topic, purpose for the event",disabled:l(a).value==="sending",required:""},null,8,de),[[r,l(s).description]]),ce,e("div",ue,[h(l(J),{class:"w-full h-full",modelValue:l(s).deadline,"onUpdate:modelValue":n[2]||(n[2]=o=>l(s).deadline=o),"auto-apply":"","partial-flow":"",clearable:!1,flow:["calendar","time"]},null,8,["modelValue"]),e("input",{class:"input-text input-text-flex absolute top-0 pointer-events-none",type:"text",value:l(V),placeholder:"click to select a date and time",disabled:l(a).value==="sending",required:""},null,8,re)]),pe,me,d(e("input",{class:"input-text input-text-flex col-span-3",type:"text","onUpdate:modelValue":n[3]||(n[3]=o=>l(s).pin=o),placeholder:"share only with members",required:""},null,512),[[r,l(s).pin]]),d(e("select",{class:"col-span-3 input-text input-text-flex","onUpdate:modelValue":n[4]||(n[4]=o=>l(s).multivote=o),placeholder:"select an event",required:""},ve,512),[[F,l(s).multivote]]),fe,(c(!0),u(X,null,H(l(s).candidates,(o,O)=>
1(c(),u("div",{class:"p-4 col-span-6 flex flex-col gap-10 text-white bg-blue-90",key:o.id},[e("div",xe,[be,d(e("input",{class:"input-text input-text-flex col-span-3",type:"text","onUpdate:modelValue":i=>o.title=i,placeholder:"title",required:""},null,8,ge),[[r,o.title]]),e("button",{onClick:v(i=>U(O),["prevent"]),class:"text-accent-red underline"}," delete ",8,ye),ke,d(e("input",{class:"input-text input-text-flex col-span-4",type:"text","onUpdate:modelValue":i=>o.subtitle=i,placeholder:"subtitle",required:""},null,8,Se),[[r,o.subtitle]]),Ve,d(e("input",{class:"input-text input-text-flex col-span-4",type:"text","onUpdate:modelValue":i=>o.author=i,placeholder:"author"},null,8,we),[[r,o.author]]),Ue,d(e("input",{"onUpdate:modelValue":i=>o.url=i,class:"input-text input-text-flex underline text-blue col-span-4",placeholder:"enter the url"},null,8,Ce),[[r,o.url]])])]))),128)),e("div",{class:"p-4 col-span-6 flex gap-8 label-left cursor-pointer border-accent-blue border-dotted border-2",onClick:v(w,["prevent"])}," add another option ",8,qe),e("div",De,[l(a)==="idle"?(c(),u("button",Oe," Save ")):_("",!0),l(a)==="sending"?(c(),u("button",je,[g("   "),h(D,{class:"text-white opacity-90 w-8 h-8 group-focus-within:opacity-100 text-sm"})])):_("",!0),l(a)==="sent"?(c(),u("button",Be," sent! ")):_("",!0)])])],40,le)])])])])]),Ne])])}}});export{ze as default};

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.