Loheide-eu-mitarbeiterplatt.../public/build/assets/Edit-DEVJjjGl.js
Friederich Loheide 28ef1e4a20 Plugin-System; Neuigkeiten und Termine als mitgelieferte Plugins
- Plugins nach WordPress-Prinzip: plugin.json-Manifest mit Versions- und
  Abhängigkeitsprüfung, eigenes PSR-4-Autoloading, register()/boot(),
  activate()/deactivate()/uninstall(), Migrationen, Routen und Views je Plugin
- plugins-core/ (mitgeliefert, aktiv bis zur Deaktivierung) und plugins/
  (Kunden-Plugins, geschützt vor Updates, inaktiv bis zur Aktivierung)
- Zustand in storage/app/plugins.json – Laden ohne Datenbankabfrage
- Wiederherstellungsmodus: Ausnahmen und Fatal Errors beim Laden
  deaktivieren das Plugin, das Portal bleibt erreichbar
- Hooks (Actions/Filter mit Prioritäten) und Registries für Navigation,
  Startseiten-Kacheln, Rechte und Admin-Seiten (Filament-Discovery)
- Admin-Seite „Plugins“: aktivieren, deaktivieren, per ZIP installieren
  (ZIP-Slip-Schutz), löschen mit oder ohne Daten; abschaltbar per
  INHAUS_DISALLOW_FILE_MODS
- Startseite komplett aus Kacheln; Plugin-Seiten als „slug::Seite“
- Version 0.3.0

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-26 07:06:16 +00:00

1 line
No EOL
7.2 KiB
JavaScript

import{A as e,Bn as t,Cn as n,D as r,I as i,J as a,Jn as o,Tn as s,Wt as c,X as l,Xt as u,Y as d,a as f,at as p,ir as m,nt as h,q as g,r as _,rt as v,sr as y,ur as b}from"./app-DJnl8SxL.js";import{M as x,j as S,n as C}from"./BrandLogo-B9oA1DG4.js";import{n as w,r as T,t as E}from"./AppLayout-1ldLchM-.js";import{r as D,t as O}from"./FormField-BmjgU2Yw.js";import{i as k}from"./dist-CQsPCHOQ.js";import{t as A}from"./button-9_XTGiWz.js";import{t as j}from"./Panel-D5zuY1_v.js";var M=x({name:`camera`,size:24,node:[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`,key:`18u6gg`}],[`circle`,{cx:`12`,cy:`13`,r:`3`,key:`1vg3eu`}]]}),N=x({name:`trash`,size:24,node:[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]],aliases:[`trash-2`]}),P=p({__name:`Textarea`,props:{class:{type:[Boolean,null,String,Object,Array]},defaultValue:{},modelValue:{}},emits:[`update:modelValue`],setup(e,{emit:n}){let i=e,a=k(i,`modelValue`,n,{passive:!0,defaultValue:i.defaultValue});return(e,n)=>s((c(),l(`textarea`,{"onUpdate:modelValue":n[0]||=e=>t(a)?a.value=e:null,"data-slot":`textarea`,class:y(m(C)(`border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`,i.class))},null,2)),[[r,m(a)]])}}),F={class:`grid gap-6 lg:grid-cols-12`},I={class:`lg:col-span-4`},L={class:`flex flex-col items-center text-center`},R={class:`mt-5 flex flex-wrap justify-center gap-2`},z={key:0,class:`mt-3 text-[13px] text-destructive`},B={class:`grid content-start gap-6 lg:col-span-8`},V={class:`grid gap-5 sm:grid-cols-2`},H={class:`flex justify-end border-t pt-5`},U={class:`grid gap-5 sm:grid-cols-2`},W={class:`flex justify-end border-t pt-5`},G={__name:`Edit`,props:{profile:{type:Object,required:!0}},setup(t){let r=t,s=_({first_name:r.profile.first_name??``,last_name:r.profile.last_name??``,email:r.profile.email,job_title:r.profile.job_title??``,department:r.profile.department??``,location:r.profile.location??``,phone:r.profile.phone??``,mobile:r.profile.mobile??``,about:r.profile.about??``});function p(){s.put(`/profil`,{preserveScroll:!0,onSuccess:()=>{s.defaults(),T.success(`Profil gespeichert`)}})}let x=[{key:`first_name`,label:`Vorname`,autocomplete:`given-name`},{key:`last_name`,label:`Nachname`,autocomplete:`family-name`},{key:`email`,label:`E-Mail-Adresse`,type:`email`,autocomplete:`email`,wide:!0},{key:`job_title`,label:`Funktion`,autocomplete:`organization-title`},{key:`department`,label:`Abteilung`},{key:`location`,label:`Standort`},{key:`phone`,label:`Telefon`,type:`tel`,autocomplete:`tel`},{key:`mobile`,label:`Mobil`,type:`tel`}],C=o(null),k=_({avatar:null});function G(e){let t=e.target.files?.[0];t&&(k.avatar=t,k.post(`/profil/bild`,{preserveScroll:!0,forceFormData:!0,onSuccess:()=>T.success(`Profilbild aktualisiert`),onFinish:()=>{e.target.value=``}}))}function K(){f.delete(`/profil/bild`,{preserveScroll:!0,onSuccess:()=>T.success(`Profilbild entfernt`)})}let q=_({current_password:``,password:``,password_confirmation:``});function J(){q.put(`/user/password`,{preserveScroll:!0,errorBag:`updatePassword`,onSuccess:()=>{q.reset(),T.success(`Passwort geändert`)}})}return(r,o)=>(c(),a(E,{title:`Profil bearbeiten`},{default:n(()=>[o[9]||=g(`h1`,{class:`mb-6 text-2xl font-semibold tracking-tight`},`Profil bearbeiten`,-1),g(`div`,F,[g(`div`,I,[v(j,{title:`Profilbild`},{default:n(()=>[g(`div`,L,[v(w,{person:t.profile,class:`size-32 text-3xl`},null,8,[`person`]),g(`input`,{ref_key:`avatarInput`,ref:C,type:`file`,accept:`image/jpeg,image/png,image/webp`,class:`hidden`,onChange:G},null,544),g(`div`,R,[v(m(A),{variant:`outline`,disabled:m(k).processing,onClick:o[0]||=e=>C.value?.click()},{default:n(()=>[m(k).processing?(c(),a(m(S),{key:0,class:`animate-spin`})):(c(),a(m(M),{key:1})),h(` `+b(t.profile.avatar_url?`Bild ändern`:`Bild hochladen`),1)]),_:1},8,[`disabled`]),t.profile.avatar_url?(c(),a(m(A),{key:0,variant:`ghost`,class:`text-destructive hover:text-destructive`,onClick:K},{default:n(()=>[v(m(N)),o[5]||=h(` Entfernen `,-1)]),_:1})):d(``,!0)]),m(k).errors.avatar?(c(),l(`p`,z,b(m(k).errors.avatar),1)):d(``,!0),o[6]||=g(`p`,{class:`mt-3 text-[13px] text-muted-foreground`},`JPG, PNG oder WebP, höchstens 8 MB. Das Bild wird quadratisch zugeschnitten.`,-1)])]),_:1})]),g(`div`,B,[v(j,{title:`Persönliche Angaben`},{default:n(()=>[g(`form`,{class:`grid gap-5`,onSubmit:e(p,[`prevent`])},[g(`div`,V,[(c(),l(i,null,u(x,e=>v(O,{id:e.key,key:e.key,label:e.label,error:m(s).errors[e.key],class:y({"sm:col-span-2":e.wide})},{default:n(()=>[v(m(D),{id:e.key,modelValue:m(s)[e.key],"onUpdate:modelValue":t=>m(s)[e.key]=t,type:e.type??`text`,autocomplete:e.autocomplete,"aria-invalid":!!m(s).errors[e.key]},null,8,[`id`,`modelValue`,`onUpdate:modelValue`,`type`,`autocomplete`,`aria-invalid`])]),_:2},1032,[`id`,`label`,`error`,`class`])),64)),v(O,{id:`about`,label:`Über mich`,error:m(s).errors.about,hint:`Aufgaben, Themen, bei denen man Sie ansprechen kann.`,class:`sm:col-span-2`},{default:n(()=>[v(m(P),{id:`about`,modelValue:m(s).about,"onUpdate:modelValue":o[1]||=e=>m(s).about=e,rows:`4`,maxlength:`2000`},null,8,[`modelValue`])]),_:1},8,[`error`])]),g(`div`,H,[v(m(A),{type:`submit`,disabled:m(s).processing||!m(s).isDirty},{default:n(()=>[m(s).processing?(c(),a(m(S),{key:0,class:`animate-spin`})):d(``,!0),o[7]||=h(` Speichern `,-1)]),_:1},8,[`disabled`])])],32)]),_:1}),t.profile.has_password?(c(),a(j,{key:0,title:`Passwort ändern`},{default:n(()=>[g(`form`,{class:`grid gap-5`,onSubmit:e(J,[`prevent`])},[v(O,{id:`current_password`,label:`Aktuelles Passwort`,error:m(q).errors.current_password,class:`sm:max-w-sm`},{default:n(()=>[v(m(D),{id:`current_password`,modelValue:m(q).current_password,"onUpdate:modelValue":o[2]||=e=>m(q).current_password=e,type:`password`,autocomplete:`current-password`},null,8,[`modelValue`])]),_:1},8,[`error`]),g(`div`,U,[v(O,{id:`password`,label:`Neues Passwort`,error:m(q).errors.password,hint:`Mindestens 10 Zeichen, mit Buchstaben und Ziffern.`},{default:n(()=>[v(m(D),{id:`password`,modelValue:m(q).password,"onUpdate:modelValue":o[3]||=e=>m(q).password=e,type:`password`,autocomplete:`new-password`},null,8,[`modelValue`])]),_:1},8,[`error`]),v(O,{id:`password_confirmation`,label:`Neues Passwort wiederholen`},{default:n(()=>[v(m(D),{id:`password_confirmation`,modelValue:m(q).password_confirmation,"onUpdate:modelValue":o[4]||=e=>m(q).password_confirmation=e,type:`password`,autocomplete:`new-password`},null,8,[`modelValue`])]),_:1})]),g(`div`,W,[v(m(A),{type:`submit`,disabled:m(q).processing},{default:n(()=>[m(q).processing?(c(),a(m(S),{key:0,class:`animate-spin`})):d(``,!0),o[8]||=h(` Passwort ändern `,-1)]),_:1},8,[`disabled`])])],32)]),_:1})):d(``,!0)])])]),_:1}))}};export{G as default};