Loheide-eu-mitarbeiterplatt.../public/build/assets/Edit-SHtMKq99.js
Friederich Loheide ea2200cb3e
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 3m46s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 3m49s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 4m7s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 4m8s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 5m51s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 6m29s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 6m12s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m11s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 5m33s
Plugin-SDK: Oberflächen für Kunden-Plugins, Generator, Doku (0.20.0)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-27 04:57:28 +00:00

2 lines
No EOL
9.2 KiB
JavaScript

const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ProfileBirthday-DwhqerqM.js","assets/runtime-core.esm-bundler-B8D2lM98.js","assets/runtime-dom.esm-bundler-BEWGoe8n.js","assets/loader-circle-Wr6tQn-J.js","assets/createLucideIcon-VlaMqNX_.js","assets/app-odFgXnck.js","assets/Presence-DEjNbTl8.js","assets/createContext-CgVTZeqH.js","assets/useForwardExpose-CxX7fZdu.js","assets/Primitive-Bc3V858a.js","assets/preload-helper-CwIXHf_L.js","assets/circle-check-K9QH5jex.js","assets/info-ByKJSon9.js","assets/getActiveElement-DWEoD8ZB.js","assets/Teleport-gLFWhBwt.js","assets/nullish-DHihWhf5.js","assets/useDirection-DA6i3jxU.js","assets/useForwardPropsEmits-CXqK2gMN.js","assets/usePrimitiveElement-CquXUboG.js","assets/DialogTitle-CJ4_uV5l.js","assets/RovingFocusGroup-Cc2A9ECP.js","assets/dist-CZxP9TJf.js","assets/utils-DOQQTBMN.js","assets/app-B2cNDpj6.css"])))=>i.map(i=>d[i]);
import{D as e,E as t,O as n,On as r,Zn as i,_ as a,b as o,bt as s,et as ee,mt as c,o as l,qt as u,tr as d,v as f,vn as p,wt as te,y as m}from"./runtime-core.esm-bundler-B8D2lM98.js";import{w as h}from"./runtime-dom.esm-bundler-BEWGoe8n.js";import{t as g}from"./preload-helper-CwIXHf_L.js";import{t as _}from"./createLucideIcon-VlaMqNX_.js";import{t as v}from"./loader-circle-Wr6tQn-J.js";import{t as y}from"./trash-CONUPzoz.js";import{C as b,G as x,d as S,f as C,fn as w,k as T,m as E,mn as D,t as ne,v as O,x as k}from"./app-odFgXnck.js";var A=_({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`}]]}),j={class:`grid gap-6 lg:grid-cols-12`},M={class:`lg:col-span-4`},N={class:`flex flex-col items-center text-center`},P={class:`mt-5 flex flex-wrap justify-center gap-2`},F={key:0,class:`mt-3 text-[13px] text-destructive`},I={class:`grid content-start gap-6 lg:col-span-8`},L={class:`grid gap-5 sm:grid-cols-2`},R={key:0,class:`grid gap-5 border-t pt-5`},z={class:`grid gap-5 sm:grid-cols-2`},B={class:`flex justify-end border-t pt-5`},V={class:`grid gap-5 sm:grid-cols-2`},H={class:`flex justify-end border-t pt-5`},U={__name:`Edit`,props:{profile:{type:Object,required:!0},managed:{type:Array,default:()=>[]},customFields:{type:Array,default:()=>[]},sections:{type:Array,default:()=>[]}},setup(_){let U=_,W=Object.fromEntries(Object.entries(Object.assign({"../../../../plugins-core/birthdays/resources/js/profile/ProfileBirthday.vue":()=>g(()=>import(`./ProfileBirthday-DwhqerqM.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23]))})).map(([e,t])=>[`${e.match(/plugins-core\/([^/]+)\//)[1]}::${e.split(`/`).pop().replace(`.vue`,``)}`,n(t)])),G=e=>U.managed.includes(e),K=w({first_name:U.profile.first_name??``,last_name:U.profile.last_name??``,email:U.profile.email,job_title:U.profile.job_title??``,department:U.profile.department??``,location:U.profile.location??``,phone:U.profile.phone??``,mobile:U.profile.mobile??``,about:U.profile.about??``,custom_fields:Object.fromEntries(U.customFields.map(e=>[e.key,e.value??``]))}),q={email:`email`,phone:`tel`,url:`url`,date:`date`};function J(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 Y(){K.put(`/profil`,{preserveScroll:!0,onSuccess:()=>{K.defaults(),x.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`}],Z=p(null),Q=w({avatar:null});function re(e){let t=e.target.files?.[0];t&&(Q.avatar=t,Q.post(`/profil/bild`,{preserveScroll:!0,forceFormData:!0,onSuccess:()=>x.success(`Profilbild aktualisiert`),onFinish:()=>{e.target.value=``}}))}function ie(){D.delete(`/profil/bild`,{preserveScroll:!0,onSuccess:()=>x.success(`Profilbild entfernt`)})}let $=w({current_password:``,password:``,password_confirmation:``});function ae(){$.put(`/user/password`,{preserveScroll:!0,errorBag:`updatePassword`,onSuccess:()=>{$.reset(),x.success(`Passwort geändert`)}})}return(n,p)=>(c(),f(b,{title:`Profil bearbeiten`},{default:u(()=>[p[10]||=a(`h1`,{class:`mb-6 text-2xl font-semibold tracking-tight`},`Profil bearbeiten`,-1),a(`div`,j,[a(`div`,M,[e(k,{title:`Profilbild`},{default:u(()=>[a(`div`,N,[e(T,{person:_.profile,class:`size-32 text-3xl`},null,8,[`person`]),a(`input`,{ref_key:`avatarInput`,ref:Z,type:`file`,accept:`image/jpeg,image/png,image/webp`,class:`hidden`,onChange:re},null,544),a(`div`,P,[e(r(E),{variant:`outline`,disabled:r(Q).processing,onClick:p[0]||=e=>Z.value?.click()},{default:u(()=>[r(Q).processing?(c(),f(r(v),{key:0,class:`animate-spin`})):(c(),f(r(A),{key:1})),t(` `+d(_.profile.avatar_url?`Bild ändern`:`Bild hochladen`),1)]),_:1},8,[`disabled`]),_.profile.avatar_url?(c(),f(r(E),{key:0,variant:`ghost`,class:`text-destructive hover:text-destructive`,onClick:ie},{default:u(()=>[e(r(y)),p[5]||=t(` Entfernen `,-1)]),_:1})):m(``,!0)]),r(Q).errors.avatar?(c(),o(`p`,F,d(r(Q).errors.avatar),1)):m(``,!0),p[6]||=a(`p`,{class:`mt-3 text-[13px] text-muted-foreground`},`JPG, PNG oder WebP, höchstens 8 MB. Das Bild wird quadratisch zugeschnitten.`,-1)])]),_:1})]),a(`div`,I,[e(k,{title:`Persönliche Angaben`},{default:u(()=>[a(`form`,{class:`grid gap-5`,onSubmit:h(Y,[`prevent`])},[a(`div`,L,[(c(),o(l,null,s(X,t=>e(O,{id:t.key,key:t.key,label:t.label,error:r(K).errors[t.key],hint:G(t.key)?`Wird aus Microsoft Entra ID übernommen.`:``,class:i({"sm:col-span-2":t.wide})},{default:u(()=>[e(r(C),{id:t.key,modelValue:r(K)[t.key],"onUpdate:modelValue":e=>r(K)[t.key]=e,type:t.type??`text`,autocomplete:t.autocomplete,disabled:G(t.key),"aria-invalid":!!r(K).errors[t.key]},null,8,[`id`,`modelValue`,`onUpdate:modelValue`,`type`,`autocomplete`,`disabled`,`aria-invalid`])]),_:2},1032,[`id`,`label`,`error`,`hint`,`class`])),64)),e(O,{id:`about`,label:`Über mich`,error:r(K).errors.about,hint:`Aufgaben, Themen, bei denen man Sie ansprechen kann.`,class:`sm:col-span-2`},{default:u(()=>[e(r(S),{id:`about`,modelValue:r(K).about,"onUpdate:modelValue":p[1]||=e=>r(K).about=e,rows:`4`,maxlength:`2000`},null,8,[`modelValue`])]),_:1},8,[`error`])]),_.customFields.length?(c(),o(`div`,R,[p[7]||=a(`h3`,{class:`text-sm font-semibold`},`Weitere Angaben`,-1),a(`div`,z,[(c(!0),o(l,null,s(_.customFields,e=>(c(),f(O,{id:`custom-${e.key}`,key:e.key,label:e.label,error:r(K).errors[`custom_fields.${e.key}`],hint:J(e),class:i({"sm:col-span-2":e.type===`textarea`})},{default:u(()=>[e.type===`textarea`?(c(),f(r(S),{key:0,id:`custom-${e.key}`,modelValue:r(K).custom_fields[e.key],"onUpdate:modelValue":t=>r(K).custom_fields[e.key]=t,rows:`3`,disabled:e.readonly},null,8,[`id`,`modelValue`,`onUpdate:modelValue`,`disabled`])):(c(),f(r(C),{key:1,id:`custom-${e.key}`,modelValue:r(K).custom_fields[e.key],"onUpdate:modelValue":t=>r(K).custom_fields[e.key]=t,type:q[e.type]??`text`,disabled:e.readonly,"aria-invalid":!!r(K).errors[`custom_fields.${e.key}`]},null,8,[`id`,`modelValue`,`onUpdate:modelValue`,`type`,`disabled`,`aria-invalid`]))]),_:2},1032,[`id`,`label`,`error`,`hint`,`class`]))),128))])])):m(``,!0),a(`div`,B,[e(r(E),{type:`submit`,disabled:r(K).processing||!r(K).isDirty},{default:u(()=>[r(K).processing?(c(),f(r(v),{key:0,class:`animate-spin`})):m(``,!0),p[8]||=t(` Speichern `,-1)]),_:1},8,[`disabled`])])],32)]),_:1}),(c(!0),o(l,null,s(_.sections,e=>(c(),f(te(r(W)[e.component]??r(ne)(e.component,`profile`)),ee({key:e.key},{ref_for:!0},e.props),null,16))),128)),_.profile.has_password?(c(),f(k,{key:0,title:`Passwort ändern`},{default:u(()=>[a(`form`,{class:`grid gap-5`,onSubmit:h(ae,[`prevent`])},[e(O,{id:`current_password`,label:`Aktuelles Passwort`,error:r($).errors.current_password,class:`sm:max-w-sm`},{default:u(()=>[e(r(C),{id:`current_password`,modelValue:r($).current_password,"onUpdate:modelValue":p[2]||=e=>r($).current_password=e,type:`password`,autocomplete:`current-password`},null,8,[`modelValue`])]),_:1},8,[`error`]),a(`div`,V,[e(O,{id:`password`,label:`Neues Passwort`,error:r($).errors.password,hint:`Mindestens 10 Zeichen, mit Buchstaben und Ziffern.`},{default:u(()=>[e(r(C),{id:`password`,modelValue:r($).password,"onUpdate:modelValue":p[3]||=e=>r($).password=e,type:`password`,autocomplete:`new-password`},null,8,[`modelValue`])]),_:1},8,[`error`]),e(O,{id:`password_confirmation`,label:`Neues Passwort wiederholen`},{default:u(()=>[e(r(C),{id:`password_confirmation`,modelValue:r($).password_confirmation,"onUpdate:modelValue":p[4]||=e=>r($).password_confirmation=e,type:`password`,autocomplete:`new-password`},null,8,[`modelValue`])]),_:1})]),a(`div`,H,[e(r(E),{type:`submit`,disabled:r($).processing},{default:u(()=>[r($).processing?(c(),f(r(v),{key:0,class:`animate-spin`})):m(``,!0),p[9]||=t(` Passwort ändern `,-1)]),_:1},8,[`disabled`])])],32)]),_:1})):m(``,!0)])])]),_:1}))}};export{U as default};