Loheide-eu-mitarbeiterplatt.../public/build/assets/Editor-DZ1OcaS_.js
Friederich Loheide a618927a52
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 7m7s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 7m30s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 8m6s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 8m21s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 17m13s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 17m12s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 9m52s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 9m29s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 47s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m23s
Schnellzugriffe mit Logo, Kategorien und Sichtbar für (0.51.0)
Untertitel, Logo, Kategorie, Rollen und Anheften je Eintrag; Knopf
„Anwendungen“ in der Kopfzeile mit allen sichtbaren Einträgen.

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

1 line
No EOL
9.9 KiB
JavaScript
Raw Permalink 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{Et as e,M as t,Ot as n,P as r}from"./ui-DY0WbyhT.js";import{At as i,C as a,O as o,S as s,T as c,Tt as l,Y as u,_t as d,a as f,g as p,k as m,ot as h,q as g,s as _,v,w as y,x as ee}from"./framework-Cy4cevSy.js";import{n as b}from"./RichTextEditor-BphybSDf.js";import{d as x}from"./useMediaList-B0NXVwZI.js";import{t as S}from"./save-puTfr0Iw.js";import{t as C}from"./trash-5Sd5z4th.js";import{_t as te,d as ne,l as w,n as T,o as E,s as D,u as O}from"./app-DA5soZKk.js";import{n as k,t as A}from"./useMediaPicker-GsBRs-VV.js";var j={class:`grid min-w-0 gap-6`},M={class:`grid gap-5`},N={class:`grid gap-4 sm:grid-cols-2`},P={id:`job-departments`},F=[`value`],I={id:`job-locations`},L=[`value`],R={class:`grid gap-4 sm:grid-cols-2`},z={class:`flex flex-wrap items-center gap-2`},B={key:0,class:`inline-flex min-w-0 items-center gap-1 text-[13px] text-muted-foreground`},V={class:`truncate`},H={class:`grid gap-6`},U={class:`grid gap-4`},W={key:1,class:`text-xs text-muted-foreground`},G={class:`grid gap-4`},K={__name:`Editor`,props:{posting:{type:Object,default:null},options:{type:Object,required:!0}},setup(K){let q=K.posting,J=f({title:q?.title??``,department:q?.department??``,location:q?.location??``,employment:q?.employment??`full`,hours:q?.hours??``,contract:q?.contract??`permanent`,contract_note:q?.contract_note??``,pay_grade:q?.pay_grade??``,start:q?.start??``,deadline:q?.deadline??``,description:q?.description??``,apply_mode:q?.apply_mode??`online`,apply_url:q?.apply_url??``,apply_email:q?.apply_email??``,contact_id:q?.contact?.id??null,notify_email:q?.notify_email??``,publish:q?q.status===`draft`?`draft`:q.status===`scheduled`?`at`:`now`:`now`,published_at:q?.published_at??``,pdf:null,remove_pdf:!1}),Y=async e=>(await x(`/redaktion/stellen/bilder`,e)).url,X=A({upload:(e,t)=>x(`/redaktion/stellen/bilder`,e,{onProgress:t}),contextLabel:`In dieser Stelle`}),Z=d(null),Q=ee(()=>J.pdf?.name??(J.remove_pdf?null:q?.pdf_name)),re=[{value:`now`,label:q?.status===`open`||q?.status===`expired`?`Veröffentlicht`:`Sofort veröffentlichen`},{value:`at`,label:`Zu einem Zeitpunkt`},{value:`draft`,label:`Entwurf (nicht sichtbar)`}];function $(){let e={forceFormData:!0,preserveScroll:!0};q?J.post(`/redaktion/stellen/${q.id}`,e):J.post(`/redaktion/stellen`,e)}function ie(){let e=q.applications?` Auch die ${q.applications} Bewerbung(en) werden gelöscht.`:``;window.confirm(`Stelle „${q.title}“ löschen?${e}`)&&_.delete(`/redaktion/stellen/${q.id}`)}return(d,f)=>(g(),a(O,{title:l(q)?`Bearbeiten: ${l(q).title}`:`Stelle ausschreiben`},{default:h(()=>[m(ne,{title:l(q)?`Stelle bearbeiten`:`Stelle ausschreiben`,breadcrumbs:[{label:`Stellen`,href:`/stellen`}]},{actions:h(()=>[l(q)?(g(),a(l(r),{key:0,variant:`ghost`,class:`text-destructive hover:text-destructive`,onClick:ie},{default:h(()=>[m(l(C)),f[21]||=o(` Löschen`,-1)]),_:1})):y(``,!0),m(l(r),{disabled:l(J).processing,onClick:$},{default:h(()=>[l(J).processing?(g(),a(l(n),{key:0,class:`animate-spin`})):(g(),a(l(S),{key:1})),f[22]||=o(` Speichern`,-1)]),_:1},8,[`disabled`])]),_:1},8,[`title`]),s(`form`,{class:`grid grid-cols-1 items-start gap-6 lg:grid-cols-[minmax(0,1fr)_22rem]`,onSubmit:p($,[`prevent`])},[s(`div`,j,[m(w,null,{default:h(()=>[s(`div`,M,[m(D,{id:`job-title`,label:`Titel der Stelle`,error:l(J).errors.title},{default:h(()=>[m(l(t),{id:`job-title`,modelValue:l(J).title,"onUpdate:modelValue":f[0]||=e=>l(J).title=e,maxlength:`200`,placeholder:`z. B. Pflegefachkraft (m/w/d) im Nachtdienst`,class:`text-base`},null,8,[`modelValue`])]),_:1},8,[`error`]),s(`div`,N,[m(D,{id:`job-dept`,label:`Bereich`,error:l(J).errors.department},{default:h(()=>[m(l(t),{id:`job-dept`,modelValue:l(J).department,"onUpdate:modelValue":f[1]||=e=>l(J).department=e,maxlength:`150`,list:`job-departments`,placeholder:`z. B. Pflege`},null,8,[`modelValue`]),s(`datalist`,P,[(g(!0),c(v,null,u(K.options.departments,e=>(g(),c(`option`,{key:e,value:e},null,8,F))),128))])]),_:1},8,[`error`]),m(D,{id:`job-location`,label:`Standort`,error:l(J).errors.location},{default:h(()=>[m(l(t),{id:`job-location`,modelValue:l(J).location,"onUpdate:modelValue":f[2]||=e=>l(J).location=e,maxlength:`150`,list:`job-locations`,placeholder:`z. B. Haus am See`},null,8,[`modelValue`]),s(`datalist`,I,[(g(!0),c(v,null,u(K.options.locations,e=>(g(),c(`option`,{key:e,value:e},null,8,L))),128))])]),_:1},8,[`error`])]),s(`div`,R,[m(D,{id:`job-employment`,label:`Umfang`,error:l(J).errors.employment},{default:h(()=>[m(E,{id:`job-employment`,modelValue:l(J).employment,"onUpdate:modelValue":f[3]||=e=>l(J).employment=e,options:K.options.employment},null,8,[`modelValue`,`options`])]),_:1},8,[`error`]),m(D,{id:`job-hours`,label:`Stunden (optional)`,error:l(J).errors.hours},{default:h(()=>[m(l(t),{id:`job-hours`,modelValue:l(J).hours,"onUpdate:modelValue":f[4]||=e=>l(J).hours=e,maxlength:`60`,placeholder:`z. B. 30 Std./Woche`},null,8,[`modelValue`])]),_:1},8,[`error`]),m(D,{id:`job-contract`,label:`Vertrag`,error:l(J).errors.contract},{default:h(()=>[m(E,{id:`job-contract`,modelValue:l(J).contract,"onUpdate:modelValue":f[5]||=e=>l(J).contract=e,options:K.options.contract},null,8,[`modelValue`,`options`])]),_:1},8,[`error`]),l(J).contract===`fixed`?(g(),a(D,{key:0,id:`job-contract-note`,label:`Befristung`,error:l(J).errors.contract_note},{default:h(()=>[m(l(t),{id:`job-contract-note`,modelValue:l(J).contract_note,"onUpdate:modelValue":f[6]||=e=>l(J).contract_note=e,maxlength:`120`,placeholder:`z. B. bis 31.12.2027 (Elternzeitvertretung)`},null,8,[`modelValue`])]),_:1},8,[`error`])):y(``,!0),m(D,{id:`job-pay`,label:`Eingruppierung (optional)`,error:l(J).errors.pay_grade},{default:h(()=>[m(l(t),{id:`job-pay`,modelValue:l(J).pay_grade,"onUpdate:modelValue":f[7]||=e=>l(J).pay_grade=e,maxlength:`60`,placeholder:`z. B. AVR P8`},null,8,[`modelValue`])]),_:1},8,[`error`]),m(D,{id:`job-start`,label:`Beginn (optional)`,error:l(J).errors.start},{default:h(()=>[m(l(t),{id:`job-start`,modelValue:l(J).start,"onUpdate:modelValue":f[8]||=e=>l(J).start=e,maxlength:`60`,placeholder:`z. B. ab sofort`},null,8,[`modelValue`])]),_:1},8,[`error`])]),m(D,{id:`job-description`,label:`Beschreibung`,error:l(J).errors.description,hint:`Zum Beispiel: Ihre Aufgaben, Ihr Profil, Wir bieten.`},{default:h(()=>[m(b,{modelValue:l(J).description,"onUpdate:modelValue":f[9]||=e=>l(J).description=e,bordered:``,"min-height":`16rem`,"upload-image":Y,"pick-image":e=>l(X).pick(e)},null,8,[`modelValue`,`pick-image`])]),_:1},8,[`error`]),m(D,{id:`job-pdf`,label:`Ausschreibung als PDF (optional)`,error:l(J).errors.pdf},{default:h(()=>[s(`div`,z,[s(`input`,{ref_key:`pdfInput`,ref:Z,type:`file`,accept:`.pdf`,class:`hidden`,onChange:f[10]||=e=>(l(J).pdf=e.target.files?.[0]??null,l(J).remove_pdf=!1)},null,544),m(l(r),{type:`button`,variant:`outline`,size:`sm`,onClick:f[11]||=e=>Z.value?.click()},{default:h(()=>[m(l(te)),o(` `+i(Q.value?`Andere Datei`:`PDF auswählen`),1)]),_:1}),Q.value?(g(),c(`span`,B,[s(`span`,V,i(Q.value),1),s(`button`,{type:`button`,class:`rounded p-0.5 hover:text-destructive`,"aria-label":`PDF entfernen`,onClick:f[12]||=e=>(l(J).pdf=null,l(J).remove_pdf=!0)},[m(l(e),{class:`size-3.5`})])])):y(``,!0)])]),_:1},8,[`error`])])]),_:1})]),s(`div`,H,[m(w,{title:`Veröffentlichung`},{default:h(()=>[s(`div`,U,[m(E,{modelValue:l(J).publish,"onUpdate:modelValue":f[13]||=e=>l(J).publish=e,options:re,"aria-label":`Veröffentlichung`},null,8,[`modelValue`]),l(J).publish===`at`?(g(),a(D,{key:0,id:`job-publish-at`,label:`Erscheint am`,error:l(J).errors.published_at},{default:h(()=>[m(l(t),{id:`job-publish-at`,modelValue:l(J).published_at,"onUpdate:modelValue":f[14]||=e=>l(J).published_at=e,type:`datetime-local`},null,8,[`modelValue`])]),_:1},8,[`error`])):y(``,!0),m(D,{id:`job-deadline`,label:`Bewerbungsfrist`,error:l(J).errors.deadline,hint:`Danach verschwindet die Stelle aus der Liste. Leer = ohne Frist.`},{default:h(()=>[m(l(t),{id:`job-deadline`,modelValue:l(J).deadline,"onUpdate:modelValue":f[15]||=e=>l(J).deadline=e,type:`date`},null,8,[`modelValue`])]),_:1},8,[`error`]),!l(q)||l(q).status!==`open`?(g(),c(`p`,W,`Beim Erscheinen werden alle Mitarbeitenden einmalig benachrichtigt.`)):y(``,!0)])]),_:1}),m(w,{title:`Bewerbung`},{default:h(()=>[s(`div`,G,[m(E,{modelValue:l(J).apply_mode,"onUpdate:modelValue":f[16]||=e=>l(J).apply_mode=e,options:K.options.apply_modes,"aria-label":`Art der Bewerbung`},null,8,[`modelValue`,`options`]),l(J).apply_mode===`link`?(g(),a(D,{key:0,id:`job-apply-url`,label:`Link zur Bewerbung`,error:l(J).errors.apply_url},{default:h(()=>[m(l(t),{id:`job-apply-url`,modelValue:l(J).apply_url,"onUpdate:modelValue":f[17]||=e=>l(J).apply_url=e,maxlength:`1000`,placeholder:`https://…`},null,8,[`modelValue`])]),_:1},8,[`error`])):y(``,!0),l(J).apply_mode===`email`?(g(),a(D,{key:1,id:`job-apply-email`,label:`E-Mail-Adresse für Bewerbungen`,error:l(J).errors.apply_email},{default:h(()=>[m(l(t),{id:`job-apply-email`,modelValue:l(J).apply_email,"onUpdate:modelValue":f[18]||=e=>l(J).apply_email=e,type:`email`,maxlength:`190`,placeholder:`z. B. bewerbung@firma.de`},null,8,[`modelValue`])]),_:1},8,[`error`])):y(``,!0),m(D,{id:`job-contact`,label:`Ansprechperson`,error:l(J).errors.contact_id,hint:l(J).apply_mode===`online`?`Erhält die Bewerbungen im Portal. Ohne Ansprechperson: alle mit „Bewerbungen einsehen“.`:`Wird bei der Stelle mit E-Mail und Telefon gezeigt.`},{default:h(()=>[m(T,{id:`job-contact`,modelValue:l(J).contact_id,"onUpdate:modelValue":f[19]||=e=>l(J).contact_id=e,person:l(q)?.contact},null,8,[`modelValue`,`person`])]),_:1},8,[`error`,`hint`]),l(J).apply_mode===`online`?(g(),a(D,{key:2,id:`job-notify`,label:`Zusätzlich per E-Mail an (optional)`,error:l(J).errors.notify_email,hint:`Nur ein Hinweis mit Link – Unterlagen bleiben im Portal.`},{default:h(()=>[m(l(t),{id:`job-notify`,modelValue:l(J).notify_email,"onUpdate:modelValue":f[20]||=e=>l(J).notify_email=e,type:`email`,maxlength:`190`,placeholder:`z. B. personal@firma.de`},null,8,[`modelValue`])]),_:1},8,[`error`])):y(``,!0)])]),_:1})])],32),m(k,{picker:l(X)},null,8,[`picker`])]),_:1},8,[`title`]))}};export{K as default};