Loheide-eu-mitarbeiterplatt.../public/build/assets/SupportButton-DfIhzXbu.js
Friederich Loheide 3addc09c38
All checks were successful
CI / PHP 8.3 / mariadb:10.6 (pull_request) Has been skipped
CI / PHP 8.4 / mariadb:10.6 (pull_request) Has been skipped
CI / PHP 8.3 / mariadb:11.4 (pull_request) Has been skipped
CI / PHP 8.4 / mariadb:11.4 (pull_request) Has been skipped
CI / PHP 8.3 / mysql:8.0 (pull_request) Has been skipped
CI / PHP 8.4 / mysql:8.0 (pull_request) Has been skipped
CI / PHP 8.3 / mysql:8.4 (pull_request) Has been skipped
CI / PHP 8.4 / mysql:8.4 (pull_request) Has been skipped
CI / Browser-Tests (pull_request) Successful in 8m33s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 9m8s
CI / PHP 8.3 / mysql:8.4-1 (pull_request) Successful in 17m55s
CI / Build-Artefakte aktuell (pull_request) Successful in 9m50s
Frag das Portal durchsucht alles, neue Demo-Inhalte (0.66.0)
- Wissensquellen: Termine, Downloads, Formulare, Stellen, Ideen, Umfragen,
  Personen, eigene IT-Tickets/Geräte (OpenNIT, je Anfrage zwischengespeichert)
- Ranking mit IDF, Abfrage je Begriff, Abkürzungen als ganze Wörter,
  LIKE unabhängig von Groß-/Kleinschreibung (JSON-Spalten), Datum im Prompt
- Demo-Inhalte für einen Träger der Eingliederungshilfe (DemoData),
  mehrseitige PDFs, vorhandene Inhalte je Bereich entfernen

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-07 20:01:00 +00:00

1 line
No EOL
4 KiB
JavaScript
Raw Permalink 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,H as n,M as r,Ot as i,P as a,S as o,T as s,j as c,w as l,x as u}from"./ui-DY0WbyhT.js";import{At as d,C as f,Dt as p,O as m,S as h,T as g,Tt as _,_t as v,a as y,g as b,k as x,nt as S,ot as C,q as w,rt as T,s as E,w as D,z as O}from"./framework-Cy4cevSy.js";import{t as k}from"./thumbs-up-G2mLpa21.js";import{l as A}from"./app-DGEXwKAN.js";var j={key:0,class:`flex items-start justify-between gap-4 rounded-md border p-3 text-sm`},M={__name:`IdeaDialog`,props:O({idea:{type:Object,default:null}},{open:{type:Boolean,default:!1},openModifiers:{}}),emits:[`update:open`],setup(p){let v=p,E=S(p,`open`),O=y({title:``,body:``,anonymous:!1});T(E,e=>{e&&(O.clearErrors(),O.defaults({title:v.idea?.title??``,body:v.idea?.body??``,anonymous:!1}),O.reset())});function k(){let e={preserveScroll:!0,onSuccess:()=>E.value=!1};v.idea?O.put(`/ideen/${v.idea.id}`,e):O.post(`/ideen`,e)}return(v,y)=>(w(),f(_(t),{open:E.value,"onUpdate:open":y[4]||=e=>E.value=e},{default:C(()=>[x(_(s),{class:`sm:max-w-xl`},{default:C(()=>[x(_(o),null,{default:C(()=>[x(_(u),null,{default:C(()=>[m(d(p.idea?`Idee bearbeiten`:`Idee einreichen`),1)]),_:1}),x(_(l),null,{default:C(()=>[...y[5]||=[m(`Was ließe sich verbessern? Beschreiben Sie kurz das Problem und Ihren Vorschlag.`,-1)]]),_:1})]),_:1}),h(`form`,{id:`idea-form`,class:`grid gap-5`,onSubmit:b(k,[`prevent`])},[x(A,{id:`idea-title`,label:`Titel`,error:_(O).errors.title},{default:C(()=>[x(_(r),{id:`idea-title`,modelValue:_(O).title,"onUpdate:modelValue":y[0]||=e=>_(O).title=e,maxlength:`160`,placeholder:`z. B. Fahrradständer mit Überdachung`},null,8,[`modelValue`])]),_:1},8,[`error`]),x(A,{id:`idea-body`,label:`Beschreibung`,error:_(O).errors.body},{default:C(()=>[x(_(c),{id:`idea-body`,modelValue:_(O).body,"onUpdate:modelValue":y[1]||=e=>_(O).body=e,rows:`7`,maxlength:`5000`,placeholder:`Was ist heute schwierig? Was schlagen Sie vor? Wem würde es helfen?`},null,8,[`modelValue`])]),_:1},8,[`error`]),p.idea?D(``,!0):(w(),g(`label`,j,[y[6]||=h(`span`,null,[h(`span`,{class:`font-medium`},`Anonym einreichen`),h(`span`,{class:`block text-xs text-muted-foreground`},`Ihr Name wird nicht gespeichert – auch nicht für das Gremium. Dann können Sie die Idee später nicht mehr bearbeiten und bekommen keine Rückmeldung per Benachrichtigung.`)],-1),x(_(n),{modelValue:_(O).anonymous,"onUpdate:modelValue":y[2]||=e=>_(O).anonymous=e},null,8,[`modelValue`])]))],32),x(_(e),null,{default:C(()=>[x(_(a),{variant:`ghost`,onClick:y[3]||=e=>E.value=!1},{default:C(()=>[...y[7]||=[m(`Abbrechen`,-1)]]),_:1}),x(_(a),{type:`submit`,form:`idea-form`,disabled:_(O).processing},{default:C(()=>[_(O).processing?(w(),f(_(i),{key:0,class:`animate-spin`})):D(``,!0),m(` `+d(p.idea?`Speichern`:`Einreichen`),1)]),_:1},8,[`disabled`])]),_:1})]),_:1})]),_:1},8,[`open`]))}},N=[`disabled`,`aria-pressed`,`title`],P={class:`text-sm font-semibold`},F={key:0,class:`text-[11px]`},I={__name:`SupportButton`,props:{idea:{type:Object,required:!0},disabled:{type:Boolean,default:!1},large:{type:Boolean,default:!1}},setup(e){let t=e,n=v(!!t.idea.supported),r=v(t.idea.supports);T(()=>[t.idea.supported,t.idea.supports],([e,t])=>{n.value=!!e,r.value=t});function i(){let e=!n.value;n.value=e,r.value+=e?1:-1,E.visit(`/ideen/${t.idea.id}/unterstuetzen`,{method:e?`post`:`delete`,preserveScroll:!0,preserveState:!0,onError:()=>{n.value=!e,r.value+=e?-1:1}})}return(t,a)=>(w(),g(`button`,{type:`button`,disabled:e.disabled,"aria-pressed":n.value,title:e.disabled?`Ihre eigene Idee`:n.value?`Unterstützung zurücknehmen`:`Idee unterstützen`,class:p([`flex shrink-0 flex-col items-center justify-center rounded-md border tabular-nums transition-colors disabled:cursor-default disabled:opacity-70`,[e.large?`min-w-20 gap-1 px-3 py-2.5`:`size-14 gap-0.5`,n.value?`border-brand bg-brand text-brand-foreground`:`bg-card hover:border-brand/50 hover:bg-brand-soft`]]),onClick:i},[x(_(k),{class:p([e.large?`size-5`:`size-4`,n.value?`fill-current`:``])},null,8,[`class`]),h(`span`,P,d(r.value),1),e.large?(w(),g(`span`,F,d(n.value?`Unterstützt`:`Unterstützen`),1)):D(``,!0)],10,N))}};export{M as n,I as t};