Loheide-eu-mitarbeiterplatt.../public/build/assets/ProfileBirthday-u6vQ4kJB.js
Friederich Loheide 7b20d40994
Some checks failed
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 10m32s
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 10m37s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 17m19s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 17m21s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 16m33s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 16m27s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 13m30s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 14m15s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 49s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m18s
App zeigt Plugins ohne neue App-Version (0.60.0)
API: Feed, Aufgaben, Schnellzugriffe, Menü; Einmal-Link für eingebettete
Portalseiten ohne Kopf- und Fußzeile.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-06 19:46:34 +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{Et as g,l as _,o as v,s as y}from"./app-WEU_Tx45.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(_,{title:`Geburtstag`},{default:d(()=>[o(`form`,{class:`grid gap-4`,onSubmit:l(O,[`prevent`])},[o(`p`,b,[u(s(g),{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(y,{id:`birthday-day`,label:`Tag`,error:s(T).errors.day},{default:d(()=>[u(v,{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(y,{id:`birthday-month`,label:`Monat`,error:s(T).errors.month},{default:d(()=>[u(v,{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};