Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 2m0s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 2m7s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 2m11s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 2m7s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 2m52s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 3m2s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 2m31s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 2m27s
CI / Build-Artefakte aktuell (pull_request) Successful in 53s
- Formular-Plugin: Baukasten mit 13 Feldtypen, Bedingungen, Vorbelegung aus dem Profil, Datei-Uploads (geschützt), anonyme Formulare, „nur einmal“, Einsendeschluss, Sichtbarkeit, Löschfrist; Einsendungen im Backend und per Mail (optional ohne Angaben, Kopie an die Person); Rechte je Formular und Rolle für Ansehen/Export und Löschen; CSV für Excel; Pagebuilder-Block - WordPress-Import (Plugin): WXR-Datei einlesen, Kategorien/Personen zuordnen, Beiträge mit Status, Datum, Beitragsbild und Bildern im Text übernehmen, optional Seiten mit Hierarchie; in Portionen, wiederholbar ohne Doppelungen - E-Mail-Versand im Admin (SMTP, verschlüsseltes Passwort, Test-Mail) - Speichertest unabhängig vom Verbrauch der Test-Suite Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1 line
No EOL
7.9 KiB
JavaScript
1 line
No EOL
7.9 KiB
JavaScript
import{D as e,E as t,On as n,Zn as r,_ as i,b as a,bt as o,mt as s,o as c,qt as l,tr as u,v as d,vn as f,y as p}from"./runtime-core.esm-bundler-B8D2lM98.js";import{w as m}from"./runtime-dom.esm-bundler-BEWGoe8n.js";import{a as h,r as g}from"./app-qaQo9ARB.js";import{A as _,j as v}from"./utils-DfNUDixG.js";import{t as y}from"./AppLayout-Xi_ip4AB.js";import{s as b,t as x}from"./PersonAvatar-CD4S56En.js";import{t as S}from"./trash-B6D7gfwo.js";import{t as C}from"./FormField-D33HIO77.js";import{t as w}from"./button-BVLATeqq.js";import{t as T}from"./Panel-GlXreVuM.js";import{t as E}from"./Input-DE5SwW-e.js";import{t as D}from"./Textarea-_u9EqblO.js";var O=v({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`}]]}),k={class:`grid gap-6 lg:grid-cols-12`},A={class:`lg:col-span-4`},j={class:`flex flex-col items-center text-center`},M={class:`mt-5 flex flex-wrap justify-center gap-2`},N={key:0,class:`mt-3 text-[13px] text-destructive`},P={class:`grid content-start gap-6 lg:col-span-8`},F={class:`grid gap-5 sm:grid-cols-2`},I={key:0,class:`grid gap-5 border-t pt-5`},L={class:`grid gap-5 sm:grid-cols-2`},R={class:`flex justify-end border-t pt-5`},z={class:`grid gap-5 sm:grid-cols-2`},B={class:`flex justify-end border-t pt-5`},V={__name:`Edit`,props:{profile:{type:Object,required:!0},managed:{type:Array,default:()=>[]},customFields:{type:Array,default:()=>[]}},setup(v){let V=v,H=e=>V.managed.includes(e),U=g({first_name:V.profile.first_name??``,last_name:V.profile.last_name??``,email:V.profile.email,job_title:V.profile.job_title??``,department:V.profile.department??``,location:V.profile.location??``,phone:V.profile.phone??``,mobile:V.profile.mobile??``,about:V.profile.about??``,custom_fields:Object.fromEntries(V.customFields.map(e=>[e.key,e.value??``]))}),W={email:`email`,phone:`tel`,url:`url`,date:`date`};function G(e){let t=[];return e.managed?t.push(`Wird aus Microsoft Entra ID übernommen.`):e.readonly&&t.push(`Wird von der Personalverwaltung gepflegt.`),e.restricted&&t.push(`Nur für Sie und die Personalverwaltung sichtbar.`),e.help&&t.push(e.help),t.join(` `)}function K(){U.put(`/profil`,{preserveScroll:!0,onSuccess:()=>{U.defaults(),b.success(`Profil gespeichert`)}})}let q=[{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`}],J=f(null),Y=g({avatar:null});function X(e){let t=e.target.files?.[0];t&&(Y.avatar=t,Y.post(`/profil/bild`,{preserveScroll:!0,forceFormData:!0,onSuccess:()=>b.success(`Profilbild aktualisiert`),onFinish:()=>{e.target.value=``}}))}function Z(){h.delete(`/profil/bild`,{preserveScroll:!0,onSuccess:()=>b.success(`Profilbild entfernt`)})}let Q=g({current_password:``,password:``,password_confirmation:``});function $(){Q.put(`/user/password`,{preserveScroll:!0,errorBag:`updatePassword`,onSuccess:()=>{Q.reset(),b.success(`Passwort geändert`)}})}return(f,h)=>(s(),d(y,{title:`Profil bearbeiten`},{default:l(()=>[h[10]||=i(`h1`,{class:`mb-6 text-2xl font-semibold tracking-tight`},`Profil bearbeiten`,-1),i(`div`,k,[i(`div`,A,[e(T,{title:`Profilbild`},{default:l(()=>[i(`div`,j,[e(x,{person:v.profile,class:`size-32 text-3xl`},null,8,[`person`]),i(`input`,{ref_key:`avatarInput`,ref:J,type:`file`,accept:`image/jpeg,image/png,image/webp`,class:`hidden`,onChange:X},null,544),i(`div`,M,[e(n(w),{variant:`outline`,disabled:n(Y).processing,onClick:h[0]||=e=>J.value?.click()},{default:l(()=>[n(Y).processing?(s(),d(n(_),{key:0,class:`animate-spin`})):(s(),d(n(O),{key:1})),t(` `+u(v.profile.avatar_url?`Bild ändern`:`Bild hochladen`),1)]),_:1},8,[`disabled`]),v.profile.avatar_url?(s(),d(n(w),{key:0,variant:`ghost`,class:`text-destructive hover:text-destructive`,onClick:Z},{default:l(()=>[e(n(S)),h[5]||=t(` Entfernen `,-1)]),_:1})):p(``,!0)]),n(Y).errors.avatar?(s(),a(`p`,N,u(n(Y).errors.avatar),1)):p(``,!0),h[6]||=i(`p`,{class:`mt-3 text-[13px] text-muted-foreground`},`JPG, PNG oder WebP, höchstens 8 MB. Das Bild wird quadratisch zugeschnitten.`,-1)])]),_:1})]),i(`div`,P,[e(T,{title:`Persönliche Angaben`},{default:l(()=>[i(`form`,{class:`grid gap-5`,onSubmit:m(K,[`prevent`])},[i(`div`,F,[(s(),a(c,null,o(q,t=>e(C,{id:t.key,key:t.key,label:t.label,error:n(U).errors[t.key],hint:H(t.key)?`Wird aus Microsoft Entra ID übernommen.`:``,class:r({"sm:col-span-2":t.wide})},{default:l(()=>[e(n(E),{id:t.key,modelValue:n(U)[t.key],"onUpdate:modelValue":e=>n(U)[t.key]=e,type:t.type??`text`,autocomplete:t.autocomplete,disabled:H(t.key),"aria-invalid":!!n(U).errors[t.key]},null,8,[`id`,`modelValue`,`onUpdate:modelValue`,`type`,`autocomplete`,`disabled`,`aria-invalid`])]),_:2},1032,[`id`,`label`,`error`,`hint`,`class`])),64)),e(C,{id:`about`,label:`Über mich`,error:n(U).errors.about,hint:`Aufgaben, Themen, bei denen man Sie ansprechen kann.`,class:`sm:col-span-2`},{default:l(()=>[e(n(D),{id:`about`,modelValue:n(U).about,"onUpdate:modelValue":h[1]||=e=>n(U).about=e,rows:`4`,maxlength:`2000`},null,8,[`modelValue`])]),_:1},8,[`error`])]),v.customFields.length?(s(),a(`div`,I,[h[7]||=i(`h3`,{class:`text-sm font-semibold`},`Weitere Angaben`,-1),i(`div`,L,[(s(!0),a(c,null,o(v.customFields,e=>(s(),d(C,{id:`custom-${e.key}`,key:e.key,label:e.label,error:n(U).errors[`custom_fields.${e.key}`],hint:G(e),class:r({"sm:col-span-2":e.type===`textarea`})},{default:l(()=>[e.type===`textarea`?(s(),d(n(D),{key:0,id:`custom-${e.key}`,modelValue:n(U).custom_fields[e.key],"onUpdate:modelValue":t=>n(U).custom_fields[e.key]=t,rows:`3`,disabled:e.readonly},null,8,[`id`,`modelValue`,`onUpdate:modelValue`,`disabled`])):(s(),d(n(E),{key:1,id:`custom-${e.key}`,modelValue:n(U).custom_fields[e.key],"onUpdate:modelValue":t=>n(U).custom_fields[e.key]=t,type:W[e.type]??`text`,disabled:e.readonly,"aria-invalid":!!n(U).errors[`custom_fields.${e.key}`]},null,8,[`id`,`modelValue`,`onUpdate:modelValue`,`type`,`disabled`,`aria-invalid`]))]),_:2},1032,[`id`,`label`,`error`,`hint`,`class`]))),128))])])):p(``,!0),i(`div`,R,[e(n(w),{type:`submit`,disabled:n(U).processing||!n(U).isDirty},{default:l(()=>[n(U).processing?(s(),d(n(_),{key:0,class:`animate-spin`})):p(``,!0),h[8]||=t(` Speichern `,-1)]),_:1},8,[`disabled`])])],32)]),_:1}),v.profile.has_password?(s(),d(T,{key:0,title:`Passwort ändern`},{default:l(()=>[i(`form`,{class:`grid gap-5`,onSubmit:m($,[`prevent`])},[e(C,{id:`current_password`,label:`Aktuelles Passwort`,error:n(Q).errors.current_password,class:`sm:max-w-sm`},{default:l(()=>[e(n(E),{id:`current_password`,modelValue:n(Q).current_password,"onUpdate:modelValue":h[2]||=e=>n(Q).current_password=e,type:`password`,autocomplete:`current-password`},null,8,[`modelValue`])]),_:1},8,[`error`]),i(`div`,z,[e(C,{id:`password`,label:`Neues Passwort`,error:n(Q).errors.password,hint:`Mindestens 10 Zeichen, mit Buchstaben und Ziffern.`},{default:l(()=>[e(n(E),{id:`password`,modelValue:n(Q).password,"onUpdate:modelValue":h[3]||=e=>n(Q).password=e,type:`password`,autocomplete:`new-password`},null,8,[`modelValue`])]),_:1},8,[`error`]),e(C,{id:`password_confirmation`,label:`Neues Passwort wiederholen`},{default:l(()=>[e(n(E),{id:`password_confirmation`,modelValue:n(Q).password_confirmation,"onUpdate:modelValue":h[4]||=e=>n(Q).password_confirmation=e,type:`password`,autocomplete:`new-password`},null,8,[`modelValue`])]),_:1})]),i(`div`,B,[e(n(w),{type:`submit`,disabled:n(Q).processing},{default:l(()=>[n(Q).processing?(s(),d(n(_),{key:0,class:`animate-spin`})):p(``,!0),h[9]||=t(` Passwort ändern `,-1)]),_:1},8,[`disabled`])])],32)]),_:1})):p(``,!0)])])]),_:1}))}};export{V as default}; |