1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/FormNotification-LlHhsjXG.js","assets/index-MSa8avpS.js","assets/index-DY-sP-Wx.css","assets/FormNotification-CbDE1wN6.css"])))=>i.map(i=>d[i]); 2import{u as T,aP as B,j as C,bG as I,b as e,g as U,a as s,t as c,e as u,bf as q,l as A,I as F,m as t,aT as G,br as H,J,o as L,q as O,aX as g}from"./index-MSa8avpS.js";import{u as R}from"./useUnsaved-D3rhImp5.js";import{u as X}from"./index-Db-z5BXD.js";import{g as z}from"./validators-D3xlM0YQ.js";import f from"./InputDatepicker-O1cbkjyc.js";import"./index-CfQiTdJu.js";import"./ibantools-CtyiK2fp.js";import"./differenceInMinutes-BGG29Sdm.js";import"./style-Buw4cw7X.js";const K={key:0},M={class:"card"},Q={class:"card__padding"},W={class:"title__h3 bold"},Y={class:"margin__t--18"},Z={for:"event_start_date",class:"input__label input__label--small"},ee={class:"margin__t--18"},te={for:"event_end_date",class:"input__label input__label--small"},ue={__name:"PrivateSettingsEvent",props:{projectSlug:{type:String,required:!0}},setup(m){const b=F(()=>J(()=>import("./FormNotification-LlHhsjXG.js"),__vite__mapDeps([0,1,2,3]))),{t:n}=T(),{reportErrorToSentry:h}=H(),{getProject:D,patchProject:S,$resetStore:j}=B(),{postSideNotification:y}=C(),{project:i,clonedProject:r,loader:V,error:w}=D({id:m.projectSlug});I({title:t(()=>`${n("literal.event")} / ${n("literal.settings")} / ${i.value?.name}`)});const{isUnsaved:E}=R({condition:t(()=>!O.isEqual(i.value,r.value))}),p=t(()=>i.value?.show_event_time),a=t({get:()=>r.value?.event_start_date,set:l=>r.value.event_start_date=l}),d=t({get:()=>r.value?.event_end_date,set:l=>r.value.event_end_date=l}),k=t(()=>a.value?g(a.value,1):g(new Date,1)),P=t(()=>({end:d.value})),$=t(()=>({start:a.value})),N=t(()=>({endDate:a.value?{minDate:z(a.value)}:{}})),v=X(N,{endDate:d}),x=async()=>{if(v.value.$touch(),v.value.$error)return G(".input--errors");try{await S({id:i.value.slug,params:{event_start_date:a.value,event_end_date:d.value}}),j(["projects"]),y({text:"literal.modifications_have_been_saved"})}catch(l){h(l,{extra:{project_id:m.projectSlug}})}};return(l,o)=>e(i)?(L(),U("section",K,[s("article",M,[s("div",Q,[s("h3",W,c(e(n)("literal.event_dates")),1),u(e(b),{class:"margin__t--12",keys:e(w)},null,8,["keys"]),s("fieldset",Y,[s("label",Z,c(e(n)("literal.event_start_date")),1),u(e(f),{id:"event_start_date",class:"margin__t--6","available-dates":P.value,"open-date":new Date,"show-time":p.value,modelValue:a.value,"onUpdate:modelValue":o[0]||(o[0]=_=>a.value=_)},null,8,["available-dates","open-date","show-time","modelValue"])]),s("fieldset",ee,[s("label",te,c(e(n)("literal.event_end_date")),1),u(e(f),{id:"event_end_date",class:"margin__t--6","available-dates":$.value,"open-date":k.value,"show-time":p.value,v:e(v).endDate,modelValue:d.value,"onUpdate:modelValue":o[1]||(o[1]=_=>d.value=_)},null,8,["available-dates","open-date","show-time","v","modelValue"])]),u(e(q),{class:"margin__t--24",name:"save_project_settings_event","is-loading":e(V),"is-saved":!e(E),onClick:o[2]||(o[2]=_=>x())},null,8,["is-loading","is-saved"])])])])):A("",!0)}};export{ue 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.