Loheide-eu-mitarbeiterplatt.../public/build/assets/NewPageDialog-CBAwufiL.js
Friederich Loheide 8acc0cfd8b
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Failing after 15m6s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Failing after 15m58s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Failing after 15m42s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Failing after 15m21s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 1h1m41s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 1h2m13s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 23m20s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 23m33s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 1m17s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m57s
Feed in der Mitarbeiter-App (0.54.0)
Feed-Registry mit Anbietern (Neu im Team, Neuigkeiten, Termine, Umfragen),
Schnellaktionen je nach Rechten, Nachladen über /feed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-30 14:27:23 +00:00

1 line
No EOL
2.5 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{C as e,D as t,M as n,P as r,S as i,T as a,w as o,x as s}from"./ui-DY0WbyhT.js";import{At as c,C as l,O as u,S as d,T as f,Tt as p,_t as m,a as h,g,k as _,nt as v,ot as y,q as b,rt as x,w as S,z as C}from"./framework-Cy4cevSy.js";import{O as w,o as T}from"./app-JMV1_L9S.js";var E={class:`grid gap-1.5`},D={key:0,class:`text-[13px] text-destructive`},O={key:0,class:`grid gap-1.5`},k={__name:`NewPageDialog`,props:C({parentId:{type:Number,default:null},parentTitle:{type:String,default:``}},{open:{type:Boolean,default:!1},openModifiers:{}}),emits:C([`before-create`],[`update:open`]),setup(C,{emit:k}){let A=C,j=v(C,`open`),M=k,N=h({title:``,parent_id:null,template_id:null}),P=m([]);x(j,async e=>{if(e){N.reset(),N.clearErrors();try{P.value=(await w.get(`/redaktion/bausteine?kind=template`)).snippets}catch{P.value=[]}}});async function F(){M(`before-create`),N.parent_id=A.parentId,N.post(`/redaktion/seiten`)}return(m,h)=>(b(),l(p(t),{open:j.value,"onUpdate:open":h[3]||=e=>j.value=e},{default:y(()=>[_(p(a),{class:`sm:max-w-md`},{default:y(()=>[_(p(i),null,{default:y(()=>[_(p(s),null,{default:y(()=>[u(c(C.parentId?`Unterseite anlegen`:`Neue Seite`),1)]),_:1}),C.parentId?(b(),l(p(o),{key:0},{default:y(()=>[u(`Unter „`+c(C.parentTitle)+`“. Die Seite ist erst nach dem Veröffentlichen sichtbar.`,1)]),_:1})):(b(),l(p(o),{key:1},{default:y(()=>[...h[4]||=[u(`Auf der obersten Ebene. Die Seite ist erst nach dem Veröffentlichen sichtbar.`,-1)]]),_:1}))]),_:1}),d(`form`,{class:`grid gap-4`,onSubmit:g(F,[`prevent`])},[d(`label`,E,[h[5]||=d(`span`,{class:`text-[13px] font-medium`},`Titel`,-1),_(p(n),{modelValue:p(N).title,"onUpdate:modelValue":h[0]||=e=>p(N).title=e,maxlength:`200`,autofocus:``,"aria-invalid":!!p(N).errors.title},null,8,[`modelValue`,`aria-invalid`]),p(N).errors.title?(b(),f(`span`,D,c(p(N).errors.title),1)):S(``,!0)]),P.value.length?(b(),f(`label`,O,[h[6]||=d(`span`,{class:`text-[13px] font-medium`},`Vorlage`,-1),_(T,{modelValue:p(N).template_id,"onUpdate:modelValue":h[1]||=e=>p(N).template_id=e,options:[{value:null,label:`Leere Seite`},...P.value.map(e=>({value:e.id,label:e.description?`${e.name} – ${e.description}`:e.name}))]},null,8,[`modelValue`,`options`])])):S(``,!0),_(p(e),null,{default:y(()=>[_(p(r),{type:`button`,variant:`outline`,onClick:h[2]||=e=>j.value=!1},{default:y(()=>[...h[7]||=[u(`Abbrechen`,-1)]]),_:1}),_(p(r),{type:`submit`,disabled:p(N).processing||!p(N).title.trim()},{default:y(()=>[...h[8]||=[u(`Anlegen und bearbeiten`,-1)]]),_:1},8,[`disabled`])]),_:1})],32)]),_:1})]),_:1},8,[`open`]))}};export{k as t};