Loheide-eu-mitarbeiterplatt.../public/build/assets/ProfileBirthday-CIcnZ7CJ.js
Friederich Loheide e191fb03b0
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 6m55s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 7m3s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 7m20s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 7m44s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 10m13s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 10m12s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 9m13s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 9m0s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 43s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m5s
Neuer Seitenrahmen (0.50.0)
Bleibendes Inertia-Layout (PortalFrame) mit festem Seitenkopf-Bereich;
PageHeader teleportiert dorthin, AppLayout meldet Titel und Seitenvorlage
(default/medium/narrow/app). Seiten ohne Kopf bekommen einen vom Rahmen.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-29 05:48:50 +00:00

1 line
No EOL
2.4 KiB
JavaScript
Raw 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{Ot as e,P as t,W as n}from"./ui-DY0WbyhT.js";import{At as r,C as i,O as a,S as o,Tt as s,a as c,g as l,k as u,ot as d,q as f,s as p,w as m,x as h}from"./framework-Cy4cevSy.js";import{l as g,o as _,s as v,wt as y}from"./app-BKZ5-_-G.js";var b={class:`flex gap-2 text-sm text-muted-foreground`},x={class:`grid grid-cols-2 gap-4 sm:max-w-sm`},S={class:`flex justify-end gap-2 border-t pt-4`},C={__name:`ProfileBirthday`,props:{birthday:{type:Object,default:null},months:{type:Array,required:!0},scope:{type:String,default:`all`}},setup(C){let w=C,T=c({day:w.birthday?.day??null,month:w.birthday?.month??null}),E=h(()=>Array.from({length:31},(e,t)=>({value:t+1,label:String(t+1)}))),D={all:`allen Mitarbeitenden`,department:`Ihrer Abteilung`,location:`Ihrem Standort`};function O(){T.put(`/profil/geburtstag`,{preserveScroll:!0,onSuccess:()=>{T.defaults(),n.success(`Geburtstag gespeichert`)}})}function k(){p.delete(`/profil/geburtstag`,{preserveScroll:!0,onSuccess:()=>{T.day=null,T.month=null,T.defaults(),n.success(`Aus der Geburtstagsliste entfernt`)}})}return(n,c)=>(f(),i(g,{title:`Geburtstag`},{default:d(()=>[o(`form`,{class:`grid gap-4`,onSubmit:l(O,[`prevent`])},[o(`p`,b,[u(s(y),{class:`mt-0.5 size-4 shrink-0 text-brand-text`}),o(`span`,null,`Freiwillig: Wenn Sie Tag und Monat eintragen, erscheint Ihr Geburtstag in der Geburtstagsliste und ist `+r(D[C.scope])+` sichtbar. Das Geburtsjahr wird nicht erfasst. Austragen ist jederzeit möglich.`,1)]),o(`div`,x,[u(v,{id:`birthday-day`,label:`Tag`,error:s(T).errors.day},{default:d(()=>[u(_,{id:`birthday-day`,modelValue:s(T).day,"onUpdate:modelValue":c[0]||=e=>s(T).day=e,options:E.value,placeholder:`–`},null,8,[`modelValue`,`options`])]),_:1},8,[`error`]),u(v,{id:`birthday-month`,label:`Monat`,error:s(T).errors.month},{default:d(()=>[u(_,{id:`birthday-month`,modelValue:s(T).month,"onUpdate:modelValue":c[1]||=e=>s(T).month=e,options:C.months,placeholder:`–`},null,8,[`modelValue`,`options`])]),_:1},8,[`error`])]),o(`div`,S,[C.birthday?(f(),i(s(t),{key:0,type:`button`,variant:`ghost`,class:`text-destructive hover:text-destructive`,onClick:k},{default:d(()=>[...c[2]||=[a(`Austragen`,-1)]]),_:1})):m(``,!0),u(s(t),{type:`submit`,disabled:s(T).processing||!s(T).day||!s(T).month||!s(T).isDirty},{default:d(()=>[s(T).processing?(f(),i(s(e),{key:0,class:`animate-spin`})):m(``,!0),a(` `+r(C.birthday?`Speichern`:`Eintragen`),1)]),_:1},8,[`disabled`])])],32)]),_:1}))}};export{C as default};