Loheide-eu-mitarbeiterplatt.../public/build/assets/Edit-CCQKBdnY.js
Friederich Loheide 50ee85c06b
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 3m31s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 3m39s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 3m57s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 3m46s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 5m9s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 5m13s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 4m30s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 4m27s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m7s
IT-Service: Baumstruktur, HTML-Antworten, Fehlermeldungen, geschlossene Tickets, Meine IT im Profilkasten
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-26 20:30:24 +00:00

2 lines
No EOL
9 KiB
JavaScript

const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ProfileBirthday--OyzM2-T.js","assets/runtime-core.esm-bundler-B8D2lM98.js","assets/runtime-dom.esm-bundler-BEWGoe8n.js","assets/app-BMGBqIQ5.js","assets/app-DwWntrIa.css","assets/dist-DtGNiYlK.js","assets/AppIcon-BsAgzB7_.js","assets/usePrimitiveElement-DC7UloPZ.js","assets/RovingFocusGroup-D88K7krN.js","assets/http-CAG9BrJF.js","assets/FormField-BoFAO4pm.js","assets/button-CwUSbS9X.js","assets/NativeSelect-G3km7PmI.js","assets/Panel-CAuEL9nG.js","assets/chevron-right-C9w5cb2q.js"])))=>i.map(i=>d[i]);
import{D as e,E as t,O as ee,On as n,Zn as r,_ as i,b as a,bt as o,et as s,mt as c,o as l,qt as u,tr as d,v as f,vn as p,wt as m,y as h}from"./runtime-core.esm-bundler-B8D2lM98.js";import{w as g}from"./runtime-dom.esm-bundler-BEWGoe8n.js";import{i as _,o as v,s as y}from"./app-BMGBqIQ5.js";import{O as b,k as x}from"./dist-DtGNiYlK.js";import{p as te}from"./AppIcon-BsAgzB7_.js";import{t as S}from"./AppLayout-_MGTeF52.js";import{s as C}from"./http-CAG9BrJF.js";import{t as w}from"./trash-DUqnVIgb.js";import{t as T}from"./FormField-BoFAO4pm.js";import{n as E}from"./button-CwUSbS9X.js";import{t as D}from"./Panel-CAuEL9nG.js";import{t as O}from"./Input-FGSb2-yK.js";import{t as k}from"./Textarea-DEFXqC2w.js";var A=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`}]]}),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(x){let U=x,W=Object.fromEntries(Object.entries(Object.assign({"../../../../plugins-core/birthdays/resources/js/profile/ProfileBirthday.vue":()=>y(()=>import(`./ProfileBirthday--OyzM2-T.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]))})).map(([e,t])=>[`${e.match(/plugins-core\/([^/]+)\//)[1]}::${e.split(`/`).pop().replace(`.vue`,``)}`,ee(t)])),G=e=>U.managed.includes(e),K=_({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(),C.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=_({avatar:null});function ne(e){let t=e.target.files?.[0];t&&(Q.avatar=t,Q.post(`/profil/bild`,{preserveScroll:!0,forceFormData:!0,onSuccess:()=>C.success(`Profilbild aktualisiert`),onFinish:()=>{e.target.value=``}}))}function re(){v.delete(`/profil/bild`,{preserveScroll:!0,onSuccess:()=>C.success(`Profilbild entfernt`)})}let $=_({current_password:``,password:``,password_confirmation:``});function ie(){$.put(`/user/password`,{preserveScroll:!0,errorBag:`updatePassword`,onSuccess:()=>{$.reset(),C.success(`Passwort geändert`)}})}return(ee,p)=>(c(),f(S,{title:`Profil bearbeiten`},{default:u(()=>[p[10]||=i(`h1`,{class:`mb-6 text-2xl font-semibold tracking-tight`},`Profil bearbeiten`,-1),i(`div`,j,[i(`div`,M,[e(D,{title:`Profilbild`},{default:u(()=>[i(`div`,N,[e(te,{person:x.profile,class:`size-32 text-3xl`},null,8,[`person`]),i(`input`,{ref_key:`avatarInput`,ref:Z,type:`file`,accept:`image/jpeg,image/png,image/webp`,class:`hidden`,onChange:ne},null,544),i(`div`,P,[e(n(E),{variant:`outline`,disabled:n(Q).processing,onClick:p[0]||=e=>Z.value?.click()},{default:u(()=>[n(Q).processing?(c(),f(n(b),{key:0,class:`animate-spin`})):(c(),f(n(A),{key:1})),t(` `+d(x.profile.avatar_url?`Bild ändern`:`Bild hochladen`),1)]),_:1},8,[`disabled`]),x.profile.avatar_url?(c(),f(n(E),{key:0,variant:`ghost`,class:`text-destructive hover:text-destructive`,onClick:re},{default:u(()=>[e(n(w)),p[5]||=t(` Entfernen `,-1)]),_:1})):h(``,!0)]),n(Q).errors.avatar?(c(),a(`p`,F,d(n(Q).errors.avatar),1)):h(``,!0),p[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`,I,[e(D,{title:`Persönliche Angaben`},{default:u(()=>[i(`form`,{class:`grid gap-5`,onSubmit:g(Y,[`prevent`])},[i(`div`,L,[(c(),a(l,null,o(X,t=>e(T,{id:t.key,key:t.key,label:t.label,error:n(K).errors[t.key],hint:G(t.key)?`Wird aus Microsoft Entra ID übernommen.`:``,class:r({"sm:col-span-2":t.wide})},{default:u(()=>[e(n(O),{id:t.key,modelValue:n(K)[t.key],"onUpdate:modelValue":e=>n(K)[t.key]=e,type:t.type??`text`,autocomplete:t.autocomplete,disabled:G(t.key),"aria-invalid":!!n(K).errors[t.key]},null,8,[`id`,`modelValue`,`onUpdate:modelValue`,`type`,`autocomplete`,`disabled`,`aria-invalid`])]),_:2},1032,[`id`,`label`,`error`,`hint`,`class`])),64)),e(T,{id:`about`,label:`Über mich`,error:n(K).errors.about,hint:`Aufgaben, Themen, bei denen man Sie ansprechen kann.`,class:`sm:col-span-2`},{default:u(()=>[e(n(k),{id:`about`,modelValue:n(K).about,"onUpdate:modelValue":p[1]||=e=>n(K).about=e,rows:`4`,maxlength:`2000`},null,8,[`modelValue`])]),_:1},8,[`error`])]),x.customFields.length?(c(),a(`div`,R,[p[7]||=i(`h3`,{class:`text-sm font-semibold`},`Weitere Angaben`,-1),i(`div`,z,[(c(!0),a(l,null,o(x.customFields,e=>(c(),f(T,{id:`custom-${e.key}`,key:e.key,label:e.label,error:n(K).errors[`custom_fields.${e.key}`],hint:J(e),class:r({"sm:col-span-2":e.type===`textarea`})},{default:u(()=>[e.type===`textarea`?(c(),f(n(k),{key:0,id:`custom-${e.key}`,modelValue:n(K).custom_fields[e.key],"onUpdate:modelValue":t=>n(K).custom_fields[e.key]=t,rows:`3`,disabled:e.readonly},null,8,[`id`,`modelValue`,`onUpdate:modelValue`,`disabled`])):(c(),f(n(O),{key:1,id:`custom-${e.key}`,modelValue:n(K).custom_fields[e.key],"onUpdate:modelValue":t=>n(K).custom_fields[e.key]=t,type:q[e.type]??`text`,disabled:e.readonly,"aria-invalid":!!n(K).errors[`custom_fields.${e.key}`]},null,8,[`id`,`modelValue`,`onUpdate:modelValue`,`type`,`disabled`,`aria-invalid`]))]),_:2},1032,[`id`,`label`,`error`,`hint`,`class`]))),128))])])):h(``,!0),i(`div`,B,[e(n(E),{type:`submit`,disabled:n(K).processing||!n(K).isDirty},{default:u(()=>[n(K).processing?(c(),f(n(b),{key:0,class:`animate-spin`})):h(``,!0),p[8]||=t(` Speichern `,-1)]),_:1},8,[`disabled`])])],32)]),_:1}),(c(!0),a(l,null,o(x.sections,e=>(c(),f(m(n(W)[e.component]),s({key:e.key},{ref_for:!0},e.props),null,16))),128)),x.profile.has_password?(c(),f(D,{key:0,title:`Passwort ändern`},{default:u(()=>[i(`form`,{class:`grid gap-5`,onSubmit:g(ie,[`prevent`])},[e(T,{id:`current_password`,label:`Aktuelles Passwort`,error:n($).errors.current_password,class:`sm:max-w-sm`},{default:u(()=>[e(n(O),{id:`current_password`,modelValue:n($).current_password,"onUpdate:modelValue":p[2]||=e=>n($).current_password=e,type:`password`,autocomplete:`current-password`},null,8,[`modelValue`])]),_:1},8,[`error`]),i(`div`,V,[e(T,{id:`password`,label:`Neues Passwort`,error:n($).errors.password,hint:`Mindestens 10 Zeichen, mit Buchstaben und Ziffern.`},{default:u(()=>[e(n(O),{id:`password`,modelValue:n($).password,"onUpdate:modelValue":p[3]||=e=>n($).password=e,type:`password`,autocomplete:`new-password`},null,8,[`modelValue`])]),_:1},8,[`error`]),e(T,{id:`password_confirmation`,label:`Neues Passwort wiederholen`},{default:u(()=>[e(n(O),{id:`password_confirmation`,modelValue:n($).password_confirmation,"onUpdate:modelValue":p[4]||=e=>n($).password_confirmation=e,type:`password`,autocomplete:`new-password`},null,8,[`modelValue`])]),_:1})]),i(`div`,H,[e(n(E),{type:`submit`,disabled:n($).processing},{default:u(()=>[n($).processing?(c(),f(n(b),{key:0,class:`animate-spin`})):h(``,!0),p[9]||=t(` Passwort ändern `,-1)]),_:1},8,[`disabled`])])],32)]),_:1})):h(``,!0)])])]),_:1}))}};export{U as default};