From ee8dde93c033b5892200e781717aec5f04fbd595 Mon Sep 17 00:00:00 2001 From: Friederich Loheide Date: Sat, 26 Sep 2026 09:51:19 +0000 Subject: [PATCH] Feste Profilfelder in Formularen, Geburtstage, anpassbare Startseite MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Formulare: Felder fest aus dem Profil (nicht änderbar, Server setzt den Profilwert ein), Hinweis bei fehlender Profilangabe - Geburtstage (optionales Plugin, standardmäßig aus): Tag und Monat freiwillig im Profil, Kachel, Liste /geburtstage, Pagebuilder-Block, Glückwunsch am eigenen Geburtstag; Sichtbarkeit alle/Abteilung/Standort - Startseite: Kacheln je Bereich sortieren und ausblenden; eigene Kacheln (Bild mit Link, Text, Hinweis) mit Zeitraum und Zielgruppe - Kern: optionale mitgelieferte Plugins, Startseitenbereich „top“, Profilabschnitte für Plugins, Kachel-Bezeichnungen Co-Authored-By: Claude Opus 5.5 (1M context) --- CHANGELOG.md | 3 + app/Dashboard/CoreWidgets.php | 10 +- app/Dashboard/Widgets.php | 89 +- app/Filament/Pages/DashboardSettings.php | 108 ++ .../DashboardTiles/DashboardTileResource.php | 104 ++ .../Pages/ManageDashboardTiles.php | 24 + app/Http/Controllers/ProfileController.php | 2 + app/Models/DashboardTile.php | 94 ++ app/Plugins/PluginManifest.php | 2 + app/Plugins/PluginState.php | 11 +- app/Profile/ProfileSections.php | 52 + app/Providers/Filament/AdminPanelProvider.php | 2 + app/Providers/PluginServiceProvider.php | 2 + ...28_000005_create_dashboard_tiles_table.php | 38 + docs/PLAN.md | 2 +- docs/PLUGINS.md | 8 + ...26_09_28_000004_create_birthdays_table.php | 29 + plugins-core/birthdays/plugin.json | 14 + .../resources/js/blocks/BirthdaysBlock.vue | 15 + .../resources/js/components/BirthdayItem.vue | 28 + .../birthdays/resources/js/pages/Index.vue | 52 + .../resources/js/profile/ProfileBirthday.vue | 69 + .../resources/js/widgets/Greeting.vue | 55 + .../resources/js/widgets/Upcoming.vue | 17 + plugins-core/birthdays/routes/web.php | 10 + plugins-core/birthdays/src/BirthdayList.php | 95 ++ .../birthdays/src/BirthdaysPlugin.php | 60 + .../src/Filament/Pages/BirthdaySettings.php | 69 + .../Http/Controllers/BirthdayController.php | 48 + .../birthdays/src/Models/Birthday.php | 46 + plugins-core/events/src/EventsPlugin.php | 2 +- .../resources/js/components/FormRenderer.vue | 14 +- .../js/components/builder/BuilderField.vue | 9 +- .../js/components/builder/FieldSettings.vue | 15 +- plugins-core/forms/resources/js/lib/fields.js | 1 + .../forms/resources/js/pages/Builder.vue | 1 + plugins-core/forms/src/FormFields.php | 39 + .../Controllers/FormBuilderController.php | 11 +- .../src/Http/Controllers/FormController.php | 2 + plugins-core/news/src/NewsPlugin.php | 6 +- public/build/assets/Accordion-B8uYJgIF.js | 1 - public/build/assets/Accordion-BDgTZ9gX.js | 1 + public/build/assets/AppLayout-CZxIxdci.js | 1 - public/build/assets/AppLayout-NB83tH03.js | 1 + .../{Areas-Cg7wbdp3.js => Areas-CRQE6xfz.js} | 2 +- public/build/assets/BirthdayItem-oSdlplYX.js | 1 + .../build/assets/BirthdaysBlock-C7_QypSO.js | 1 + public/build/assets/Box-C8IMDYO5.js | 1 - public/build/assets/Box-VoQIN4Ir.js | 1 + ...Logo-i-onuz_c.js => BrandLogo-7kuRvCgc.js} | 2 +- public/build/assets/Builder-C0axn99S.js | 1 + public/build/assets/Builder-ClqeKrjr.js | 1 - public/build/assets/Buttons-0bwW4Lhd.js | 1 - public/build/assets/Buttons-DQQEn_A2.js | 1 + public/build/assets/Contacts-CdmwBRgW.js | 1 - public/build/assets/Contacts-Du3eUAAJ.js | 1 + public/build/assets/CustomTile-YMT7Y_NZ.js | 1 + public/build/assets/Dashboard-Cr7nTaxh.js | 2 - public/build/assets/Dashboard-bahnn8Qo.js | 2 + public/build/assets/DialogHeader-CyvvEfjW.js | 1 - public/build/assets/DialogHeader-DZlBIGxi.js | 1 + ...oads-CYwchegt.js => Downloads-Dj9zdPlo.js} | 2 +- public/build/assets/Edit-DkqYIN3H.js | 1 - public/build/assets/Edit-DpwsnwUw.js | 2 + public/build/assets/Editor-BKQqHjUe.js | 1 - public/build/assets/Editor-DMuCknIz.js | 1 + public/build/assets/Editor-Dqov3WZN.js | 1 + public/build/assets/Editor-ZCefbIKf.js | 1 - ...DFop-0Sq.js => EditorialForms-5sD8Mi9R.js} | 2 +- public/build/assets/EditorialNews-B7b1QnuE.js | 1 - public/build/assets/EditorialNews-CanFfj9X.js | 1 + .../build/assets/EditorialPages-Dt5O55B2.js | 1 - .../build/assets/EditorialPages-JZ-S3UJK.js | 1 + .../build/assets/EventDateBlock-CaP0fN12.js | 1 + .../build/assets/EventDateBlock-CbYS92pI.js | 1 - public/build/assets/EventListItem-BKnd12L-.js | 1 - public/build/assets/EventListItem-Cu3bbXXb.js | 1 + .../build/assets/ForgotPassword-DJYsIav0.js | 1 + .../build/assets/ForgotPassword-qysrfvH5.js | 1 - ...lock-CC6ffqrE.js => FormBlock-DyEYRIoN.js} | 2 +- public/build/assets/FormField-BcJMyuzX.js | 1 + public/build/assets/FormField-D33HIO77.js | 1 - public/build/assets/FormRenderer-D9Ou7ynT.js | 1 + public/build/assets/FormRenderer-vzhXmnNK.js | 1 - ...allery-BeYNfdo4.js => Gallery-BB33NFXt.js} | 2 +- public/build/assets/Greeting-BN7uh037.js | 1 + public/build/assets/Greeting-DFM7rgPu.js | 1 + public/build/assets/Greeting-iJtQcFUW.js | 1 - ...ut-k_8zfPw7.js => GuestLayout-DEOqZpDz.js} | 2 +- public/build/assets/Hero-C40rFCdS.js | 1 - .../{Hero-Cl8lLWJ_.js => Hero-RvLVeHgr.js} | 2 +- public/build/assets/Hero-d7w1bQ8B.js | 1 + ...nList-q78d70vF.js => IconList-RL4tX2aa.js} | 2 +- .../{Image-B7bTEMBH.js => Image-Ty0FORtQ.js} | 2 +- public/build/assets/Index-6Y38ifzE.js | 1 + public/build/assets/Index-Bdlr6qAx.js | 1 + public/build/assets/Index-C6aHJZE2.js | 1 + public/build/assets/Index-CB4nQD7I.js | 1 + public/build/assets/Index-CYjrd_B7.js | 1 - public/build/assets/Index-D7t0Sw6C.js | 1 + public/build/assets/Index-DCxCEGRl.js | 1 - public/build/assets/Index-DRdMFjqj.js | 1 - public/build/assets/Index-DTOm3arg.js | 1 - public/build/assets/Index-I67_GeEe.js | 1 + public/build/assets/Index-YcTIlX48.js | 1 - .../{Index-BSBD4cF0.js => Index-zbrK6RYT.js} | 4 +- public/build/assets/Input-CgjHXzkf.js | 1 + public/build/assets/Input-DE5SwW-e.js | 1 - public/build/assets/Latest-C4KZrsgS.js | 1 - public/build/assets/Latest-CyRay08_.js | 1 + ...ews-CYe6uLN2.js => LatestNews-B56Gkl0l.js} | 2 +- public/build/assets/Login-BQH0oyhz.js | 1 - public/build/assets/Login-BWZqyhyu.js | 1 + public/build/assets/NativeSelect-DYCQpK0c.js | 1 - public/build/assets/NativeSelect-OH2VlOdN.js | 1 + public/build/assets/NewColleagues-BLkoKLv-.js | 1 - public/build/assets/NewColleagues-CKBPIOhS.js | 1 + ...-b5toQ-4w.js => NewPageDialog-DyWdsqyH.js} | 2 +- public/build/assets/NewsCard-BjDSMRNQ.js | 1 - public/build/assets/NewsCard-C4vJU52d.js | 1 + public/build/assets/NewsImage-B0PMifSg.js | 1 + public/build/assets/NewsImage-COF0XihT.js | 1 - public/build/assets/NewsListItem-D51ogFq1.js | 1 - public/build/assets/NewsListItem-xPdLHCFu.js | 1 + public/build/assets/PageContent-CPLotD2q.js | 2 + public/build/assets/PageContent-ClJb88E5.js | 2 - .../{Panel-BS2636BW.js => Panel-C7tqQA-x.js} | 2 +- public/build/assets/PeopleSearch-BWBsEzdi.js | 1 + public/build/assets/PeopleSearch-IJ-6cMVt.js | 1 - public/build/assets/PersonAvatar-BA7DC_UD.js | 1 - .../build/assets/ProfileBirthday-C8QUUaoW.js | 1 + ...iMOuu.js => ProfileIncomplete-CC2t5tNh.js} | 2 +- ...nks-B4ymyHju.js => QuickLinks-Diz_fOqt.js} | 2 +- public/build/assets/ResetPassword-BUZM3Tch.js | 1 - public/build/assets/ResetPassword-xWF3fliX.js | 1 + ...BpnhAtXx.js => RichTextEditor-DP3LUVrE.js} | 2 +- .../build/assets/RovingFocusGroup-DePKKD9K.js | 1 - .../build/assets/RovingFocusGroup-rJCF33aj.js | 1 + .../build/assets/RovingFocusItem-DVHqJKAL.js | 1 - .../build/assets/RovingFocusItem-Uj-NtPRL.js | 1 + public/build/assets/Show-BGMM1Q7g.js | 1 + public/build/assets/Show-BM3pF2Sr.js | 1 - public/build/assets/Show-BQG9kcoU.js | 1 + public/build/assets/Show-Bi5cddiK.js | 1 + public/build/assets/Show-CGVxYjcj.js | 1 - public/build/assets/Show-CgRsqA_m.js | 1 + public/build/assets/Show-CsVutOe3.js | 1 + public/build/assets/Show-DGEgIMSu.js | 1 - public/build/assets/Show-DdVHrfwP.js | 1 - public/build/assets/Show-kRrXRAuj.js | 1 - ...pages-Dqrx1jRk.js => Subpages-CRPpB1u0.js} | 2 +- public/build/assets/Switch-BbEb1iXG.js | 1 + public/build/assets/Switch-CaeHWPTg.js | 1 - public/build/assets/Tabs-BB4KnyIx.js | 1 + public/build/assets/Tabs-BKtJNbBM.js | 1 - .../{Text-CbUIbj5q.js => Text-DBI2JmeZ.js} | 4 +- public/build/assets/Textarea-DWpyL-nk.js | 1 + public/build/assets/Textarea-_u9EqblO.js | 1 - public/build/assets/Upcoming-BQRmTxzO.js | 1 + public/build/assets/Upcoming-BhZoEKQy.js | 1 - public/build/assets/Upcoming-CCVnM2pS.js | 1 + ...88iiWTus.js => UpcomingEvents-DA7ph-z8.js} | 2 +- .../{Video-Bq7HXVFd.js => Video-DTMGvcbX.js} | 2 +- .../assets/VisuallyHiddenInput-XuoIcOsh.js | 1 - .../assets/VisuallyHiddenInput-i0fsjz38.js | 1 + public/build/assets/app-Bi8FukPL.css | 2 - public/build/assets/app-DzcKQJWN.css | 2 + .../{app-BEmka_ei.js => app-fPqdDpbG.js} | 4 +- public/build/assets/arrow-left-CeYKHQbE.js | 1 - public/build/assets/arrow-left-nZZEveo4.js | 1 + public/build/assets/arrow-right-CSfG3qiq.js | 1 - public/build/assets/arrow-right-CdMsByuI.js | 1 + .../build/assets/building-complex-CrN0pJ2v.js | 1 + .../build/assets/building-complex-Drk3TBKp.js | 1 - public/build/assets/button-BVLATeqq.js | 1 - public/build/assets/button-SRYY3-ko.js | 1 + public/build/assets/cake-DYVAYX9m.js | 1 + .../build/assets/calendar-clock-CswFc-uh.js | 1 + .../build/assets/calendar-clock-CwsI-C0a.js | 1 - public/build/assets/calendar-days-Cq3ZXY-S.js | 1 - public/build/assets/calendar-days-s3GhWVmT.js | 1 + public/build/assets/check-DGi8MtvT.js | 1 + public/build/assets/check-NR_gS8I-.js | 1 - public/build/assets/chevron-left-CfNljcKt.js | 1 + public/build/assets/chevron-left-D2Or6edo.js | 1 - public/build/assets/chevron-right-2hoRrfAe.js | 1 - public/build/assets/chevron-right-DR4LjgDm.js | 1 + public/build/assets/circle-alert-qymEjja5.js | 1 + .../build/assets/clipboard-list-BTFiddE0.js | 1 + .../build/assets/clipboard-list-DLZt3Hel.js | 1 - public/build/assets/clock-CH5MxcFu.js | 1 + public/build/assets/clock-IVbPqglU.js | 1 - public/build/assets/dialog-Bnq2xLhE.js | 1 + public/build/assets/dialog-Cs_lmohf.js | 1 - public/build/assets/dist-BRRmd-wM.js | 1 + public/build/assets/dist-CleIz2GP.js | 1 + public/build/assets/dist-FqXf5I3H.js | 1 - public/build/assets/download-DlQuIU5u.js | 1 - public/build/assets/download-cH_7CRKx.js | 1 + public/build/assets/eye-off-D9ExUiqn.js | 1 - public/build/assets/eye-off-DWbaLHNt.js | 1 + public/build/assets/file-text-4udxc_PB.js | 1 + public/build/assets/file-text-Dmdo-Zwf.js | 1 - public/build/assets/format-2iB7L6ww.js | 1 + public/build/assets/http-C4J46rTq.js | 1 + public/build/assets/http-CgzjkOa1.js | 1 - public/build/assets/icons-C_--K_bz.js | 1 - public/build/assets/icons-DL3m7OIP.js | 1 + public/build/assets/image-B2vtsdro.js | 1 - public/build/assets/image-DWzRulZ0.js | 1 + ...BYh.js => isValueEqualOrExist-BDaOcy4r.js} | 2 +- public/build/assets/lightbulb-BXPWdUy9.js | 1 + public/build/assets/lightbulb-Crmh5htw.js | 1 - public/build/assets/link-BE7bRFjZ.js | 1 - public/build/assets/link-mbI8ikd_.js | 1 + public/build/assets/lock-4X8Kfof0.js | 1 + public/build/assets/lock-DtEIVsTL.js | 1 - public/build/assets/mail-BO1XFIRu.js | 1 - public/build/assets/mail-BdcYMJ5_.js | 1 + public/build/assets/map-pin-B9eZ2Wq-.js | 1 + public/build/assets/map-pin-DhZUjkWx.js | 1 - public/build/assets/megaphone-DL1vN9P4.js | 1 + .../assets/message-square-warning-CUD7Iy66.js | 1 + .../assets/message-square-warning-CzxLG9ol.js | 1 - public/build/assets/pen-line-AST4G_M5.js | 1 + public/build/assets/pen-line-Clpe2kUm.js | 1 - public/build/assets/pencil-line-BmOFaoN0.js | 1 - public/build/assets/pencil-line-Cp-EHBoW.js | 1 + public/build/assets/phone-B-aOouYp.js | 1 + public/build/assets/phone-q79Rw2te.js | 1 - public/build/assets/play-BqfGHciU.js | 1 - public/build/assets/play-_hM1KTvn.js | 1 + public/build/assets/plus-CGTHU-CI.js | 1 - public/build/assets/plus-cKZvz4wH.js | 1 + public/build/assets/save-COy1XW3C.js | 1 + public/build/assets/save-DjKkjZCG.js | 1 - public/build/assets/send-BevoJaJI.js | 1 + public/build/assets/smartphone-2VTLQVgX.js | 1 + public/build/assets/smartphone-DJgIx-KL.js | 1 - .../build/assets/table-properties-B82lvC7D.js | 1 + .../build/assets/table-properties-CEIj_sW5.js | 1 - public/build/assets/trash-3XeUxfQJ.js | 1 + public/build/assets/trash-B6D7gfwo.js | 1 - .../assets/usePrimitiveElement-BOk1PFhF.js | 3 + .../assets/usePrimitiveElement-WzTT8b8E.js | 3 - public/build/assets/utils-DfNUDixG.js | 1 - public/build/assets/video-BV0GQFAO.js | 1 - public/build/assets/video-PqOW0ULZ.js | 1 + .../assets/vue-draggable-plus-BPJUawkl.js | 1 + .../assets/vue-draggable-plus-CMAN8Jts.js | 1 - public/build/manifest.json | 1218 +++++++++-------- resources/js/pagebuilder/editor/icons.js | 2 + resources/js/pages/Dashboard.vue | 4 + resources/js/pages/Profile/Edit.vue | 12 +- resources/js/widgets/CustomTile.vue | 48 + tests/Feature/Birthdays/BirthdaysTest.php | 118 ++ tests/Feature/DashboardCustomizationTest.php | 95 ++ tests/Feature/Forms/FormsTest.php | 49 + tests/TestCase.php | 9 + vendor/composer/autoload_classmap.php | 5 + vendor/composer/autoload_static.php | 5 + vendor/composer/installed.php | 4 +- 262 files changed, 2385 insertions(+), 692 deletions(-) create mode 100644 app/Filament/Pages/DashboardSettings.php create mode 100644 app/Filament/Resources/DashboardTiles/DashboardTileResource.php create mode 100644 app/Filament/Resources/DashboardTiles/Pages/ManageDashboardTiles.php create mode 100644 app/Models/DashboardTile.php create mode 100644 app/Profile/ProfileSections.php create mode 100644 database/migrations/2026_09_28_000005_create_dashboard_tiles_table.php create mode 100644 plugins-core/birthdays/database/migrations/2026_09_28_000004_create_birthdays_table.php create mode 100644 plugins-core/birthdays/plugin.json create mode 100644 plugins-core/birthdays/resources/js/blocks/BirthdaysBlock.vue create mode 100644 plugins-core/birthdays/resources/js/components/BirthdayItem.vue create mode 100644 plugins-core/birthdays/resources/js/pages/Index.vue create mode 100644 plugins-core/birthdays/resources/js/profile/ProfileBirthday.vue create mode 100644 plugins-core/birthdays/resources/js/widgets/Greeting.vue create mode 100644 plugins-core/birthdays/resources/js/widgets/Upcoming.vue create mode 100644 plugins-core/birthdays/routes/web.php create mode 100644 plugins-core/birthdays/src/BirthdayList.php create mode 100644 plugins-core/birthdays/src/BirthdaysPlugin.php create mode 100644 plugins-core/birthdays/src/Filament/Pages/BirthdaySettings.php create mode 100644 plugins-core/birthdays/src/Http/Controllers/BirthdayController.php create mode 100644 plugins-core/birthdays/src/Models/Birthday.php delete mode 100644 public/build/assets/Accordion-B8uYJgIF.js create mode 100644 public/build/assets/Accordion-BDgTZ9gX.js delete mode 100644 public/build/assets/AppLayout-CZxIxdci.js create mode 100644 public/build/assets/AppLayout-NB83tH03.js rename public/build/assets/{Areas-Cg7wbdp3.js => Areas-CRQE6xfz.js} (91%) create mode 100644 public/build/assets/BirthdayItem-oSdlplYX.js create mode 100644 public/build/assets/BirthdaysBlock-C7_QypSO.js delete mode 100644 public/build/assets/Box-C8IMDYO5.js create mode 100644 public/build/assets/Box-VoQIN4Ir.js rename public/build/assets/{BrandLogo-i-onuz_c.js => BrandLogo-7kuRvCgc.js} (92%) create mode 100644 public/build/assets/Builder-C0axn99S.js delete mode 100644 public/build/assets/Builder-ClqeKrjr.js delete mode 100644 public/build/assets/Buttons-0bwW4Lhd.js create mode 100644 public/build/assets/Buttons-DQQEn_A2.js delete mode 100644 public/build/assets/Contacts-CdmwBRgW.js create mode 100644 public/build/assets/Contacts-Du3eUAAJ.js create mode 100644 public/build/assets/CustomTile-YMT7Y_NZ.js delete mode 100644 public/build/assets/Dashboard-Cr7nTaxh.js create mode 100644 public/build/assets/Dashboard-bahnn8Qo.js delete mode 100644 public/build/assets/DialogHeader-CyvvEfjW.js create mode 100644 public/build/assets/DialogHeader-DZlBIGxi.js rename public/build/assets/{Downloads-CYwchegt.js => Downloads-Dj9zdPlo.js} (90%) delete mode 100644 public/build/assets/Edit-DkqYIN3H.js create mode 100644 public/build/assets/Edit-DpwsnwUw.js delete mode 100644 public/build/assets/Editor-BKQqHjUe.js create mode 100644 public/build/assets/Editor-DMuCknIz.js create mode 100644 public/build/assets/Editor-Dqov3WZN.js delete mode 100644 public/build/assets/Editor-ZCefbIKf.js rename public/build/assets/{EditorialForms-DFop-0Sq.js => EditorialForms-5sD8Mi9R.js} (85%) delete mode 100644 public/build/assets/EditorialNews-B7b1QnuE.js create mode 100644 public/build/assets/EditorialNews-CanFfj9X.js delete mode 100644 public/build/assets/EditorialPages-Dt5O55B2.js create mode 100644 public/build/assets/EditorialPages-JZ-S3UJK.js create mode 100644 public/build/assets/EventDateBlock-CaP0fN12.js delete mode 100644 public/build/assets/EventDateBlock-CbYS92pI.js delete mode 100644 public/build/assets/EventListItem-BKnd12L-.js create mode 100644 public/build/assets/EventListItem-Cu3bbXXb.js create mode 100644 public/build/assets/ForgotPassword-DJYsIav0.js delete mode 100644 public/build/assets/ForgotPassword-qysrfvH5.js rename public/build/assets/{FormBlock-CC6ffqrE.js => FormBlock-DyEYRIoN.js} (93%) create mode 100644 public/build/assets/FormField-BcJMyuzX.js delete mode 100644 public/build/assets/FormField-D33HIO77.js create mode 100644 public/build/assets/FormRenderer-D9Ou7ynT.js delete mode 100644 public/build/assets/FormRenderer-vzhXmnNK.js rename public/build/assets/{Gallery-BeYNfdo4.js => Gallery-BB33NFXt.js} (93%) create mode 100644 public/build/assets/Greeting-BN7uh037.js create mode 100644 public/build/assets/Greeting-DFM7rgPu.js delete mode 100644 public/build/assets/Greeting-iJtQcFUW.js rename public/build/assets/{GuestLayout-k_8zfPw7.js => GuestLayout-DEOqZpDz.js} (92%) delete mode 100644 public/build/assets/Hero-C40rFCdS.js rename public/build/assets/{Hero-Cl8lLWJ_.js => Hero-RvLVeHgr.js} (95%) create mode 100644 public/build/assets/Hero-d7w1bQ8B.js rename public/build/assets/{IconList-q78d70vF.js => IconList-RL4tX2aa.js} (88%) rename public/build/assets/{Image-B7bTEMBH.js => Image-Ty0FORtQ.js} (93%) create mode 100644 public/build/assets/Index-6Y38ifzE.js create mode 100644 public/build/assets/Index-Bdlr6qAx.js create mode 100644 public/build/assets/Index-C6aHJZE2.js create mode 100644 public/build/assets/Index-CB4nQD7I.js delete mode 100644 public/build/assets/Index-CYjrd_B7.js create mode 100644 public/build/assets/Index-D7t0Sw6C.js delete mode 100644 public/build/assets/Index-DCxCEGRl.js delete mode 100644 public/build/assets/Index-DRdMFjqj.js delete mode 100644 public/build/assets/Index-DTOm3arg.js create mode 100644 public/build/assets/Index-I67_GeEe.js delete mode 100644 public/build/assets/Index-YcTIlX48.js rename public/build/assets/{Index-BSBD4cF0.js => Index-zbrK6RYT.js} (50%) create mode 100644 public/build/assets/Input-CgjHXzkf.js delete mode 100644 public/build/assets/Input-DE5SwW-e.js delete mode 100644 public/build/assets/Latest-C4KZrsgS.js create mode 100644 public/build/assets/Latest-CyRay08_.js rename public/build/assets/{LatestNews-CYe6uLN2.js => LatestNews-B56Gkl0l.js} (86%) delete mode 100644 public/build/assets/Login-BQH0oyhz.js create mode 100644 public/build/assets/Login-BWZqyhyu.js delete mode 100644 public/build/assets/NativeSelect-DYCQpK0c.js create mode 100644 public/build/assets/NativeSelect-OH2VlOdN.js delete mode 100644 public/build/assets/NewColleagues-BLkoKLv-.js create mode 100644 public/build/assets/NewColleagues-CKBPIOhS.js rename public/build/assets/{NewPageDialog-b5toQ-4w.js => NewPageDialog-DyWdsqyH.js} (88%) delete mode 100644 public/build/assets/NewsCard-BjDSMRNQ.js create mode 100644 public/build/assets/NewsCard-C4vJU52d.js create mode 100644 public/build/assets/NewsImage-B0PMifSg.js delete mode 100644 public/build/assets/NewsImage-COF0XihT.js delete mode 100644 public/build/assets/NewsListItem-D51ogFq1.js create mode 100644 public/build/assets/NewsListItem-xPdLHCFu.js create mode 100644 public/build/assets/PageContent-CPLotD2q.js delete mode 100644 public/build/assets/PageContent-ClJb88E5.js rename public/build/assets/{Panel-BS2636BW.js => Panel-C7tqQA-x.js} (87%) create mode 100644 public/build/assets/PeopleSearch-BWBsEzdi.js delete mode 100644 public/build/assets/PeopleSearch-IJ-6cMVt.js delete mode 100644 public/build/assets/PersonAvatar-BA7DC_UD.js create mode 100644 public/build/assets/ProfileBirthday-C8QUUaoW.js rename public/build/assets/{ProfileIncomplete-zk8iMOuu.js => ProfileIncomplete-CC2t5tNh.js} (82%) rename public/build/assets/{QuickLinks-B4ymyHju.js => QuickLinks-Diz_fOqt.js} (89%) delete mode 100644 public/build/assets/ResetPassword-BUZM3Tch.js create mode 100644 public/build/assets/ResetPassword-xWF3fliX.js rename public/build/assets/{RichTextEditor-BpnhAtXx.js => RichTextEditor-DP3LUVrE.js} (93%) delete mode 100644 public/build/assets/RovingFocusGroup-DePKKD9K.js create mode 100644 public/build/assets/RovingFocusGroup-rJCF33aj.js delete mode 100644 public/build/assets/RovingFocusItem-DVHqJKAL.js create mode 100644 public/build/assets/RovingFocusItem-Uj-NtPRL.js create mode 100644 public/build/assets/Show-BGMM1Q7g.js delete mode 100644 public/build/assets/Show-BM3pF2Sr.js create mode 100644 public/build/assets/Show-BQG9kcoU.js create mode 100644 public/build/assets/Show-Bi5cddiK.js delete mode 100644 public/build/assets/Show-CGVxYjcj.js create mode 100644 public/build/assets/Show-CgRsqA_m.js create mode 100644 public/build/assets/Show-CsVutOe3.js delete mode 100644 public/build/assets/Show-DGEgIMSu.js delete mode 100644 public/build/assets/Show-DdVHrfwP.js delete mode 100644 public/build/assets/Show-kRrXRAuj.js rename public/build/assets/{Subpages-Dqrx1jRk.js => Subpages-CRPpB1u0.js} (85%) create mode 100644 public/build/assets/Switch-BbEb1iXG.js delete mode 100644 public/build/assets/Switch-CaeHWPTg.js create mode 100644 public/build/assets/Tabs-BB4KnyIx.js delete mode 100644 public/build/assets/Tabs-BKtJNbBM.js rename public/build/assets/{Text-CbUIbj5q.js => Text-DBI2JmeZ.js} (55%) create mode 100644 public/build/assets/Textarea-DWpyL-nk.js delete mode 100644 public/build/assets/Textarea-_u9EqblO.js create mode 100644 public/build/assets/Upcoming-BQRmTxzO.js delete mode 100644 public/build/assets/Upcoming-BhZoEKQy.js create mode 100644 public/build/assets/Upcoming-CCVnM2pS.js rename public/build/assets/{UpcomingEvents-88iiWTus.js => UpcomingEvents-DA7ph-z8.js} (82%) rename public/build/assets/{Video-Bq7HXVFd.js => Video-DTMGvcbX.js} (96%) delete mode 100644 public/build/assets/VisuallyHiddenInput-XuoIcOsh.js create mode 100644 public/build/assets/VisuallyHiddenInput-i0fsjz38.js delete mode 100644 public/build/assets/app-Bi8FukPL.css create mode 100644 public/build/assets/app-DzcKQJWN.css rename public/build/assets/{app-BEmka_ei.js => app-fPqdDpbG.js} (95%) delete mode 100644 public/build/assets/arrow-left-CeYKHQbE.js create mode 100644 public/build/assets/arrow-left-nZZEveo4.js delete mode 100644 public/build/assets/arrow-right-CSfG3qiq.js create mode 100644 public/build/assets/arrow-right-CdMsByuI.js create mode 100644 public/build/assets/building-complex-CrN0pJ2v.js delete mode 100644 public/build/assets/building-complex-Drk3TBKp.js delete mode 100644 public/build/assets/button-BVLATeqq.js create mode 100644 public/build/assets/button-SRYY3-ko.js create mode 100644 public/build/assets/cake-DYVAYX9m.js create mode 100644 public/build/assets/calendar-clock-CswFc-uh.js delete mode 100644 public/build/assets/calendar-clock-CwsI-C0a.js delete mode 100644 public/build/assets/calendar-days-Cq3ZXY-S.js create mode 100644 public/build/assets/calendar-days-s3GhWVmT.js create mode 100644 public/build/assets/check-DGi8MtvT.js delete mode 100644 public/build/assets/check-NR_gS8I-.js create mode 100644 public/build/assets/chevron-left-CfNljcKt.js delete mode 100644 public/build/assets/chevron-left-D2Or6edo.js delete mode 100644 public/build/assets/chevron-right-2hoRrfAe.js create mode 100644 public/build/assets/chevron-right-DR4LjgDm.js create mode 100644 public/build/assets/circle-alert-qymEjja5.js create mode 100644 public/build/assets/clipboard-list-BTFiddE0.js delete mode 100644 public/build/assets/clipboard-list-DLZt3Hel.js create mode 100644 public/build/assets/clock-CH5MxcFu.js delete mode 100644 public/build/assets/clock-IVbPqglU.js create mode 100644 public/build/assets/dialog-Bnq2xLhE.js delete mode 100644 public/build/assets/dialog-Cs_lmohf.js create mode 100644 public/build/assets/dist-BRRmd-wM.js create mode 100644 public/build/assets/dist-CleIz2GP.js delete mode 100644 public/build/assets/dist-FqXf5I3H.js delete mode 100644 public/build/assets/download-DlQuIU5u.js create mode 100644 public/build/assets/download-cH_7CRKx.js delete mode 100644 public/build/assets/eye-off-D9ExUiqn.js create mode 100644 public/build/assets/eye-off-DWbaLHNt.js create mode 100644 public/build/assets/file-text-4udxc_PB.js delete mode 100644 public/build/assets/file-text-Dmdo-Zwf.js create mode 100644 public/build/assets/format-2iB7L6ww.js create mode 100644 public/build/assets/http-C4J46rTq.js delete mode 100644 public/build/assets/http-CgzjkOa1.js delete mode 100644 public/build/assets/icons-C_--K_bz.js create mode 100644 public/build/assets/icons-DL3m7OIP.js delete mode 100644 public/build/assets/image-B2vtsdro.js create mode 100644 public/build/assets/image-DWzRulZ0.js rename public/build/assets/{isValueEqualOrExist-DhoPSBYh.js => isValueEqualOrExist-BDaOcy4r.js} (98%) create mode 100644 public/build/assets/lightbulb-BXPWdUy9.js delete mode 100644 public/build/assets/lightbulb-Crmh5htw.js delete mode 100644 public/build/assets/link-BE7bRFjZ.js create mode 100644 public/build/assets/link-mbI8ikd_.js create mode 100644 public/build/assets/lock-4X8Kfof0.js delete mode 100644 public/build/assets/lock-DtEIVsTL.js delete mode 100644 public/build/assets/mail-BO1XFIRu.js create mode 100644 public/build/assets/mail-BdcYMJ5_.js create mode 100644 public/build/assets/map-pin-B9eZ2Wq-.js delete mode 100644 public/build/assets/map-pin-DhZUjkWx.js create mode 100644 public/build/assets/megaphone-DL1vN9P4.js create mode 100644 public/build/assets/message-square-warning-CUD7Iy66.js delete mode 100644 public/build/assets/message-square-warning-CzxLG9ol.js create mode 100644 public/build/assets/pen-line-AST4G_M5.js delete mode 100644 public/build/assets/pen-line-Clpe2kUm.js delete mode 100644 public/build/assets/pencil-line-BmOFaoN0.js create mode 100644 public/build/assets/pencil-line-Cp-EHBoW.js create mode 100644 public/build/assets/phone-B-aOouYp.js delete mode 100644 public/build/assets/phone-q79Rw2te.js delete mode 100644 public/build/assets/play-BqfGHciU.js create mode 100644 public/build/assets/play-_hM1KTvn.js delete mode 100644 public/build/assets/plus-CGTHU-CI.js create mode 100644 public/build/assets/plus-cKZvz4wH.js create mode 100644 public/build/assets/save-COy1XW3C.js delete mode 100644 public/build/assets/save-DjKkjZCG.js create mode 100644 public/build/assets/send-BevoJaJI.js create mode 100644 public/build/assets/smartphone-2VTLQVgX.js delete mode 100644 public/build/assets/smartphone-DJgIx-KL.js create mode 100644 public/build/assets/table-properties-B82lvC7D.js delete mode 100644 public/build/assets/table-properties-CEIj_sW5.js create mode 100644 public/build/assets/trash-3XeUxfQJ.js delete mode 100644 public/build/assets/trash-B6D7gfwo.js create mode 100644 public/build/assets/usePrimitiveElement-BOk1PFhF.js delete mode 100644 public/build/assets/usePrimitiveElement-WzTT8b8E.js delete mode 100644 public/build/assets/utils-DfNUDixG.js delete mode 100644 public/build/assets/video-BV0GQFAO.js create mode 100644 public/build/assets/video-PqOW0ULZ.js create mode 100644 public/build/assets/vue-draggable-plus-BPJUawkl.js delete mode 100644 public/build/assets/vue-draggable-plus-CMAN8Jts.js create mode 100644 resources/js/widgets/CustomTile.vue create mode 100644 tests/Feature/Birthdays/BirthdaysTest.php create mode 100644 tests/Feature/DashboardCustomizationTest.php diff --git a/CHANGELOG.md b/CHANGELOG.md index 02b36d70..72288289 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,10 +11,13 @@ Der Self-Updater zeigt diese Abschnitte bei neuen Versionen an. - Einsendungen landen im Backend und per E-Mail bei festen Empfängern; auf Wunsch eine Kopie an die ausfüllende Person - Zugriff auf die Ergebnisse je Formular und Rolle – ansehen und exportieren (CSV für Excel) bzw. löschen getrennt vergebbar - Anonyme Formulare, „nur einmal ausfüllen“, Einsendeschluss, Sichtbarkeit und automatische Löschfrist +- Formularfelder lassen sich fest mit Profilangaben füllen (z. B. Vorname, Personalnummer, Abteilung) – nicht änderbar, beim Absenden gilt immer der Profilwert - Formulare lassen sich mit dem Pagebuilder in Seiten und unter Neuigkeiten-Beiträgen einbinden - Ergebnisse als CSV herunterladen – alle oder nur ausgewählte Einsendungen - WordPress-Import: Beiträge mit Kategorien, Autorinnen und Autoren, Beitragsbildern und Bildern im Text übernehmen, auf Wunsch auch Seiten – wiederholbar, ohne Doppelungen - E-Mail-Versand im Admin einrichten (SMTP), mit Test-Mail +- Startseite anpassen: Kacheln je Bereich sortieren und ausblenden, eigene Kacheln anlegen – Bild mit Link, Text oder Hinweis, mit Zeitraum und Zielgruppe +- Geburtstage (optional, unter „Plugins“ zu aktivieren): Mitarbeitende tragen freiwillig Tag und Monat im Profil ein; Kachel und Liste der anstehenden Geburtstage, Glückwunsch auf der Startseite am eigenen Geburtstag ## 0.5.0 diff --git a/app/Dashboard/CoreWidgets.php b/app/Dashboard/CoreWidgets.php index 22f36128..ab49798b 100644 --- a/app/Dashboard/CoreWidgets.php +++ b/app/Dashboard/CoreWidgets.php @@ -20,11 +20,11 @@ class CoreWidgets 'location' => $user->location, 'avatar_url' => $user->avatarUrl(256), ], - ], mobileSort: 0); + ], label: 'Begrüßung mit Profil', mobileSort: 0); $widgets->add('core.quick-links', 'core::QuickLinks', 'main', sort: 10, props: fn () => [ 'links' => app(QuickLinks::class)->all(), - ], mobileSort: 40); + ], label: 'Schnellzugriffe', mobileSort: 40); $widgets->add('core.new-colleagues', 'core::NewColleagues', 'main', sort: 90, props: function (User $user) { $people = User::query() @@ -36,12 +36,12 @@ class CoreWidgets ->get(); return $people->isEmpty() ? null : ['people' => PersonResource::collection($people)->resolve()]; - }, mobileSort: 60); + }, label: 'Neue Kolleginnen und Kollegen', mobileSort: 60); - $widgets->add('core.profile-incomplete', 'core::ProfileIncomplete', 'aside', sort: 50, props: fn (User $user) => $user->avatar_path && $user->job_title ? null : [], mobileSort: 70); + $widgets->add('core.profile-incomplete', 'core::ProfileIncomplete', 'aside', sort: 50, props: fn (User $user) => $user->avatar_path && $user->job_title ? null : [], label: 'Hinweis „Profil vervollständigen“', mobileSort: 70); $widgets->add('core.people-search', 'core::PeopleSearch', 'aside', sort: 60, props: fn () => [ 'count' => User::query()->active()->count(), - ], mobileSort: 80); + ], label: 'Personen finden', mobileSort: 80); } } diff --git a/app/Dashboard/Widgets.php b/app/Dashboard/Widgets.php index 17c437a5..1e3069dc 100644 --- a/app/Dashboard/Widgets.php +++ b/app/Dashboard/Widgets.php @@ -2,8 +2,11 @@ namespace App\Dashboard; +use App\Models\DashboardTile; use App\Models\User; +use App\Support\Settings; use Illuminate\Http\Request; +use Illuminate\Support\Collection; use Illuminate\Support\Facades\Log; use Throwable; @@ -11,6 +14,7 @@ use Throwable; * Kacheln der Startseite als Registry. * * Bereiche (siehe resources/js/pages/Dashboard.vue): + * top – volle Breite über allem (Hinweise, z. B. Geburtstagsgruß) * hero – groß links oben (z. B. Slider) feed – neben hero * main – volle Breite der linken Spalte aside – rechte Spalte * @@ -19,25 +23,27 @@ use Throwable; */ class Widgets { - public const AREAS = ['hero', 'feed', 'main', 'aside']; + public const AREAS = ['top', 'hero', 'feed', 'main', 'aside']; - /** @var array */ + /** @var array */ private array $widgets = []; /** * @param string $component Vue-Komponente, z. B. „core::QuickLinks“ oder „news::Hero“ * @param callable(User, Request): (array|null) $props * @param int|null $mobileSort Reihenfolge in der einspaltigen Mobilansicht (Standard: nach Bereich) + * @param string|null $label Name im Admin unter „Startseite“ */ - public function add(string $key, string $component, string $area, int $sort, callable $props, ?int $mobileSort = null): void + public function add(string $key, string $component, string $area, int $sort, callable $props, ?int $mobileSort = null, ?string $label = null): void { if (! in_array($area, self::AREAS, true)) { throw new \InvalidArgumentException("Unbekannter Bereich „{$area}“ für Kachel {$key}."); } - $mobileSort ??= ['hero' => 10, 'feed' => 20, 'aside' => 30, 'main' => 50][$area] + $sort; + $mobileSort ??= ['top' => -100, 'hero' => 10, 'feed' => 20, 'aside' => 30, 'main' => 50][$area] + $sort; - $this->widgets[$key] = compact('component', 'area', 'sort', 'mobileSort', 'props'); + $label ??= $key; + $this->widgets[$key] = compact('component', 'area', 'sort', 'mobileSort', 'props', 'label'); } public function remove(string $key): void @@ -45,6 +51,71 @@ class Widgets unset($this->widgets[$key]); } + /** + * Alle Kacheln eines Bereichs für den Admin: mitgelieferte und eigene, + * in gespeicherter Reihenfolge, mit Sichtbarkeit. + * + * @return list + */ + public function forAdmin(string $area): array + { + $layout = $this->layout(); + + return $this->candidates() + ->filter(fn (array $w) => $w['area'] === $area) + ->map(fn (array $w, string $key) => [ + 'key' => $key, + 'label' => $w['label'], + 'area' => $w['area'], + 'visible' => $layout[$key]['visible'] ?? true, + 'custom' => $w['custom'] ?? false, + ]) + ->values() + ->all(); + } + + /** + * Mitgelieferte Kacheln plus eigene Kacheln, sortiert nach gespeicherter Anordnung. + * + * @return Collection> + */ + private function candidates(?User $user = null) + { + $widgets = collect($this->widgets); + + try { + $tiles = DashboardTile::query()->when($user, fn ($q) => $q->visibleTo($user))->get(); + } catch (Throwable) { + $tiles = collect(); // Tabelle noch nicht angelegt (Aktualisierung läuft) + } + + foreach ($tiles as $tile) { + $widgets[$tile->widgetKey()] = [ + 'component' => 'core::CustomTile', + 'area' => array_key_exists($tile->area, DashboardTile::AREAS) ? $tile->area : 'aside', + 'sort' => 1000 + $tile->id, + 'mobileSort' => ['top' => -50, 'main' => 45, 'aside' => 32][$tile->area] ?? 32, + 'props' => fn () => $tile->toWidgetProps(), + 'label' => 'Eigene Kachel: '.$tile->name, + 'custom' => true, + ]; + } + + $layout = $this->layout(); + + return $widgets->sortBy(fn (array $w, string $key) => $layout[$key]['sort'] ?? $w['sort']); + } + + /** + * Gespeicherte Anordnung: Schlüssel => [sort, visible]. + * + * @return array + */ + private function layout(): array + { + return (array) app(Settings::class)->get('dashboard.layout', []); + } + /** * @return list}> */ @@ -52,7 +123,13 @@ class Widgets { $result = []; - foreach (collect($this->widgets)->sortBy('sort') as $key => $widget) { + $layout = $this->layout(); + + foreach ($this->candidates($user) as $key => $widget) { + if (($layout[$key]['visible'] ?? true) === false) { + continue; + } + try { $props = ($widget['props'])($user, $request); } catch (Throwable $e) { diff --git a/app/Filament/Pages/DashboardSettings.php b/app/Filament/Pages/DashboardSettings.php new file mode 100644 index 00000000..9213394f --- /dev/null +++ b/app/Filament/Pages/DashboardSettings.php @@ -0,0 +1,108 @@ + ['Ganz oben (volle Breite)', 'Hinweise und Banner über allem.'], + 'hero' => ['Groß links oben', 'Nur die erste sichtbare Kachel wird gezeigt.'], + 'feed' => ['Neben dem großen Bereich', ''], + 'main' => ['Hauptspalte', ''], + 'aside' => ['Seitenleiste (rechts)', ''], + ]; + + /** @var array|null */ + public ?array $data = []; + + public static function canAccess(): bool + { + return auth()->user()?->can('appearance.manage') ?? false; + } + + public function mount(Widgets $widgets): void + { + $this->form->fill(collect(self::AREAS)->mapWithKeys(fn ($info, $area) => [$area => $widgets->forAdmin($area)])->all()); + } + + public function form(Schema $schema): Schema + { + return $schema->statePath('data')->components( + collect(self::AREAS)->map(fn ($info, $area) => Section::make($info[0]) + ->description($info[1] ?: null) + ->visible(fn () => app(Widgets::class)->forAdmin($area) !== []) + ->schema([ + Repeater::make($area) + ->hiddenLabel() + ->reorderable() + ->reorderableWithDragAndDrop() + ->addable(false) + ->deletable(false) + ->itemLabel(fn (array $state) => $state['label'] ?? $state['key']) + ->schema([ + Hidden::make('key'), + Hidden::make('label'), + Toggle::make('visible')->label('Anzeigen'), + ]), + ]))->values()->all() + ); + } + + public function save(Settings $settings): void + { + $layout = []; + + foreach (array_keys(self::AREAS) as $area) { + foreach (array_values($this->data[$area] ?? []) as $index => $item) { + $layout[$item['key']] = ['sort' => $index * 10, 'visible' => (bool) ($item['visible'] ?? true)]; + } + } + + $settings->set('dashboard.layout', $layout); + + Notification::make()->success()->title('Startseite gespeichert')->send(); + } + + protected function getHeaderActions(): array + { + return [ + Action::make('tiles')->label('Eigene Kacheln')->icon(Heroicon::OutlinedRectangleGroup)->color('gray') + ->url(fn () => DashboardTileResource::getUrl()), + Action::make('preview')->label('Startseite ansehen')->icon(Heroicon::OutlinedEye)->color('gray') + ->url('/')->openUrlInNewTab(), + ]; + } +} diff --git a/app/Filament/Resources/DashboardTiles/DashboardTileResource.php b/app/Filament/Resources/DashboardTiles/DashboardTileResource.php new file mode 100644 index 00000000..91ce484f --- /dev/null +++ b/app/Filament/Resources/DashboardTiles/DashboardTileResource.php @@ -0,0 +1,104 @@ +user()?->can('appearance.manage') ?? false; + } + + public static function form(Schema $schema): Schema + { + $type = fn (string ...$types) => fn (Get $get) => in_array($get('type'), $types, true); + + return $schema->columns(2)->components([ + TextInput::make('name')->label('Name (nur im Admin)')->required()->maxLength(100), + Select::make('type')->label('Art')->options(DashboardTile::TYPES)->default('image')->required()->live()->native(false), + Select::make('area')->label('Bereich')->options(DashboardTile::AREAS)->default('aside')->required()->native(false) + ->helperText('Die Reihenfolge innerhalb des Bereichs legen Sie unter „Startseite“ fest.'), + TextInput::make('title')->label(fn (Get $get) => $get('type') === 'image' ? 'Bildunterschrift (optional)' : 'Überschrift')->maxLength(150), + + FileUpload::make('image_path')->label('Bild')->image()->disk('uploads')->directory('dashboard')->visibility('public') + ->maxSize(8 * 1024)->required($type('image'))->visible($type('image'))->columnSpanFull() + ->helperText('Für die Seitenleiste z. B. 800 × 600 Pixel, für „ganz oben“ ein breites Banner (z. B. 2400 × 500).'), + TextInput::make('alt')->label('Alternativtext')->maxLength(200)->visible($type('image'))->helperText('Beschreibt das Bild für Screenreader.'), + + RichEditor::make('body')->label('Text')->toolbarButtons([['bold', 'italic', 'link'], ['bulletList', 'orderedList'], ['undo', 'redo']]) + ->required($type('text', 'notice'))->visible($type('text', 'notice'))->columnSpanFull(), + Select::make('variant')->label('Farbe')->options(DashboardTile::VARIANTS)->default('brand')->visible($type('notice'))->native(false), + + TextInput::make('url')->label('Link')->placeholder('https://… oder /seiten/…')->maxLength(2000), + Toggle::make('new_tab')->label('In neuem Tab öffnen')->inline(false), + + Section::make('Anzeige')->columnSpanFull()->columns(3)->schema([ + Toggle::make('is_active')->label('Aktiv')->default(true)->inline(false), + DateTimePicker::make('starts_at')->label('Ab')->native(false)->seconds(false)->displayFormat('d.m.Y H:i'), + DateTimePicker::make('ends_at')->label('Bis')->native(false)->seconds(false)->displayFormat('d.m.Y H:i')->after('starts_at'), + ]), + AudienceSection::make('dashboard_tile', 'Wer die Kachel sieht. Leer lassen = alle.')->columnSpanFull(), + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + ImageColumn::make('image_path')->label('')->disk('uploads')->width(64)->height(40), + TextColumn::make('name')->label('Name')->weight('medium')->searchable(), + TextColumn::make('type')->label('Art')->formatStateUsing(fn (string $state) => DashboardTile::TYPES[$state] ?? $state), + TextColumn::make('area')->label('Bereich')->formatStateUsing(fn (string $state) => DashboardTile::AREAS[$state] ?? $state), + IconColumn::make('is_active')->label('Aktiv')->boolean(), + TextColumn::make('ends_at')->label('Bis')->dateTime('d.m.Y H:i')->placeholder('–'), + ]) + ->recordActions([EditAction::make(), DeleteAction::make()]) + ->emptyStateHeading('Noch keine eigenen Kacheln') + ->emptyStateDescription('Zum Beispiel ein verlinktes Bild in der Seitenleiste oder ein Hinweis ganz oben.'); + } + + public static function getPages(): array + { + return ['index' => ManageDashboardTiles::route('/')]; + } +} diff --git a/app/Filament/Resources/DashboardTiles/Pages/ManageDashboardTiles.php b/app/Filament/Resources/DashboardTiles/Pages/ManageDashboardTiles.php new file mode 100644 index 00000000..11df25ef --- /dev/null +++ b/app/Filament/Resources/DashboardTiles/Pages/ManageDashboardTiles.php @@ -0,0 +1,24 @@ +label('Anordnung der Startseite')->icon(Heroicon::OutlinedSquares2x2)->color('gray') + ->url(fn () => DashboardSettings::getUrl()), + CreateAction::make()->label('Kachel anlegen'), + ]; + } +} diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.php index 6b33fa91..50036fe4 100644 --- a/app/Http/Controllers/ProfileController.php +++ b/app/Http/Controllers/ProfileController.php @@ -4,6 +4,7 @@ namespace App\Http\Controllers; use App\Http\Requests\UpdateProfileRequest; use App\Models\User; +use App\Profile\ProfileSections; use App\Support\Avatars; use App\Support\ProfileFields; use Illuminate\Http\RedirectResponse; @@ -39,6 +40,7 @@ class ProfileController extends Controller // Felder, die Microsoft Entra ID pflegt – im Portal nur lesbar. 'managed' => $managed, 'customFields' => $profileFields->formFor($user, $managed), + 'sections' => app(ProfileSections::class)->resolve($user), ]); } diff --git a/app/Models/DashboardTile.php b/app/Models/DashboardTile.php new file mode 100644 index 00000000..6eb59f6d --- /dev/null +++ b/app/Models/DashboardTile.php @@ -0,0 +1,94 @@ + 'Bild mit Link', + 'text' => 'Text', + 'notice' => 'Hinweis', + ]; + + public const AREAS = [ + 'aside' => 'Seitenleiste (rechts)', + 'main' => 'Hauptspalte (breit)', + 'top' => 'Ganz oben (volle Breite)', + ]; + + public const VARIANTS = [ + 'brand' => 'Markenfarbe', + 'info' => 'Info (blau)', + 'success' => 'Erfolg (grün)', + 'warning' => 'Warnung (rot)', + 'neutral' => 'Neutral (grau)', + ]; + + protected static function booted(): void + { + static::saving(function (DashboardTile $tile) { + $tile->url = filled($tile->url) ? (Field::safeUrl($tile->url) ?: null) : null; + + if ($tile->isDirty('body')) { + $tile->body_html = app(RichText::class)->toSafeHtml($tile->body); + } + }); + + static::deleted(fn (DashboardTile $tile) => $tile->image_path && Storage::disk('uploads')->delete($tile->image_path)); + } + + protected function casts(): array + { + return ['new_tab' => 'boolean', 'is_active' => 'boolean', 'starts_at' => 'datetime', 'ends_at' => 'datetime']; + } + + public function widgetKey(): string + { + return 'tile.'.$this->id; + } + + /** + * Aktiv, im Zeitraum und für die Person sichtbar. + * + * @param Builder $query + */ + public function scopeVisibleTo(Builder $query, User $user): void + { + $query->where('is_active', true) + ->where(fn ($q) => $q->whereNull('starts_at')->orWhere('starts_at', '<=', now())) + ->where(fn ($q) => $q->whereNull('ends_at')->orWhere('ends_at', '>', now())); + + Audiences::constrain($query, 'dashboard_tile', 'dashboard_tiles.id', $user); + } + + /** + * @return array + */ + public function toWidgetProps(): array + { + return [ + 'tile' => [ + 'type' => $this->type, + 'title' => $this->title, + 'image_url' => $this->image_path ? Storage::disk('uploads')->url($this->image_path) : null, + 'url' => $this->url, + 'new_tab' => $this->new_tab, + 'alt' => $this->alt ?: '', + 'html' => $this->body_html, + 'variant' => $this->variant ?: 'brand', + ], + ]; + } +} diff --git a/app/Plugins/PluginManifest.php b/app/Plugins/PluginManifest.php index dafe2cc6..51291a3d 100644 --- a/app/Plugins/PluginManifest.php +++ b/app/Plugins/PluginManifest.php @@ -39,6 +39,7 @@ final class PluginManifest public readonly bool $core, public readonly array $requires, public readonly ?string $updateUrl, + public readonly bool $enabledByDefault = true, ) {} public static function fromDirectory(string $path, bool $core): self @@ -90,6 +91,7 @@ final class PluginManifest core: $core, requires: is_array($data['requires'] ?? null) ? $data['requires'] : [], updateUrl: is_string($data['update_url'] ?? null) ? $data['update_url'] : null, + enabledByDefault: (bool) ($data['enabled_by_default'] ?? true), ); } diff --git a/app/Plugins/PluginState.php b/app/Plugins/PluginState.php index cf6e98f9..29c7a948 100644 --- a/app/Plugins/PluginState.php +++ b/app/Plugins/PluginState.php @@ -7,10 +7,17 @@ use App\Support\Update\AtomicFile; /** * Aktivierungszustand der Plugins in storage/app/plugins.json – als Datei, damit * das Laden der Plugins keine Datenbankabfrage kostet und auch ohne DB klappt. - * Mitgelieferte Plugins sind aktiv, solange nichts anderes vermerkt ist. + * Mitgelieferte Plugins sind aktiv, solange nichts anderes vermerkt ist – außer sie + * sind als optional markiert („enabled_by_default“: false in plugin.json). */ class PluginState { + /** + * Test-Suite: optionale mitgelieferte Plugins ebenfalls laden, damit ihre + * Tabellen und Tests dabei sind (gesetzt in tests/TestCase.php). + */ + public static bool $enableOptionalCorePlugins = false; + /** @var array>|null */ private ?array $data = null; @@ -20,7 +27,7 @@ class PluginState { $entry = $this->all()[$manifest->slug] ?? null; - return is_array($entry) ? (bool) ($entry['enabled'] ?? false) : $manifest->core; + return is_array($entry) ? (bool) ($entry['enabled'] ?? false) : $manifest->core && ($manifest->enabledByDefault || self::$enableOptionalCorePlugins); } public function setEnabled(string $slug, bool $enabled, ?string $reason = null): void diff --git a/app/Profile/ProfileSections.php b/app/Profile/ProfileSections.php new file mode 100644 index 00000000..967427ac --- /dev/null +++ b/app/Profile/ProfileSections.php @@ -0,0 +1,52 @@ +/resources/js/profile/.vue („::Name“) + * und speichert über eigene Routen des Plugins. + */ +class ProfileSections +{ + /** @var array */ + private array $sections = []; + + /** + * @param Closure(User): (array|null) $props null = Abschnitt nicht zeigen + */ + public function add(string $key, string $component, int $sort, Closure $props): void + { + $this->sections[$key] = compact('component', 'sort', 'props'); + } + + /** + * @return list}> + */ + public function resolve(User $user): array + { + $result = []; + + foreach (collect($this->sections)->sortBy('sort') as $key => $section) { + try { + $props = ($section['props'])($user); + } catch (Throwable $e) { + Log::error("Profilabschnitt {$key} fehlgeschlagen: ".$e->getMessage()); + + continue; + } + + if ($props !== null) { + $result[] = ['key' => $key, 'component' => $section['component'], 'props' => $props]; + } + } + + return $result; + } +} diff --git a/app/Providers/Filament/AdminPanelProvider.php b/app/Providers/Filament/AdminPanelProvider.php index f412bac7..9929691c 100644 --- a/app/Providers/Filament/AdminPanelProvider.php +++ b/app/Providers/Filament/AdminPanelProvider.php @@ -4,6 +4,7 @@ namespace App\Providers\Filament; use App\Filament\AvatarProviders\InitialsAvatarProvider; use App\Filament\Pages\Feedback; +use App\Filament\Resources\DashboardTiles\DashboardTileResource; use App\Filament\Resources\IdentityProviders\IdentityProviderResource; use App\Filament\Resources\ProfileFields\ProfileFieldResource; use App\Filament\Resources\Roles\RoleResource; @@ -65,6 +66,7 @@ class AdminPanelProvider extends PanelProvider UserResource::class, RoleResource::class, ProfileFieldResource::class, + DashboardTileResource::class, IdentityProviderResource::class, ]) ->discoverPages(in: app_path('Filament/Pages'), for: 'App\Filament\Pages') diff --git a/app/Providers/PluginServiceProvider.php b/app/Providers/PluginServiceProvider.php index ad145ae1..9d57c021 100644 --- a/app/Providers/PluginServiceProvider.php +++ b/app/Providers/PluginServiceProvider.php @@ -6,6 +6,7 @@ use App\Dashboard\Widgets; use App\Plugins\Hooks; use App\Plugins\PluginManager; use App\Plugins\PluginState; +use App\Profile\ProfileSections; use App\Support\Abilities; use App\Support\Navigation; use Illuminate\Support\ServiceProvider; @@ -24,6 +25,7 @@ class PluginServiceProvider extends ServiceProvider $this->app->singleton(Navigation::class); $this->app->singleton(Widgets::class); $this->app->singleton(Abilities::class); + $this->app->singleton(ProfileSections::class); $this->app->make(PluginManager::class)->registerAll(); } diff --git a/database/migrations/2026_09_28_000005_create_dashboard_tiles_table.php b/database/migrations/2026_09_28_000005_create_dashboard_tiles_table.php new file mode 100644 index 00000000..89d673e6 --- /dev/null +++ b/database/migrations/2026_09_28_000005_create_dashboard_tiles_table.php @@ -0,0 +1,38 @@ +id(); + $table->string('name'); + $table->string('type', 20); + $table->string('area', 20)->default('aside'); + $table->string('title')->nullable(); + $table->string('image_path')->nullable(); + $table->string('url', 2000)->nullable(); + $table->boolean('new_tab')->default(false); + $table->string('alt')->nullable(); + $table->longText('body')->nullable(); + $table->longText('body_html')->nullable(); + $table->string('variant', 20)->nullable(); + $table->boolean('is_active')->default(true); + $table->timestamp('starts_at')->nullable(); + $table->timestamp('ends_at')->nullable(); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('dashboard_tiles'); + } +}; diff --git a/docs/PLAN.md b/docs/PLAN.md index 49c86c97..78c0c167 100644 --- a/docs/PLAN.md +++ b/docs/PLAN.md @@ -482,7 +482,7 @@ Kantinenplan, Ideenbox, Urlaubsanträge. | **2 – Plugin-System & Rechte** ✅ | Plugin-Loader, Hooks/Filter, Registries, Recovery-Modus, Import-Map-Frontend; Rollen, Grants, Zielgruppen, Rechte-Cache, Rechte-Prüfer | | **3 – Entra ID** ✅ | OIDC-Login, JIT, Gruppen-/App-Rollen-Mapping (additiv), Graph-Profil- & Foto-Sync mit frei zuordenbaren Attributen (inkl. Erweiterungsattributen) und eigenen Profilfeldern, Delta-Sync | | **4 – CMS** ✅ | Seitenbaum, Pagebuilder (Layout-, Inhalts-, Medien- und dynamische Blöcke, Sichtbarkeit je Block), Entwürfe, Versionen, Zeitsteuerung, Bearbeitungssperre, Freigaben; News-Freigabe-Workflow und Redaktion im Portal; Benachrichtigungen. Offen: Vorlagen und wiederverwendbare Blöcke | -| **4b – Formulare & Umstieg** ✅ | Formular-Plugin (visueller Baukasten im Portal, Bedingungen, Uploads, anonyme Formulare, Mail + Backend, Ergebnis-Rechte je Formular und Rolle, CSV, Löschfristen; eingebunden per Pagebuilder-Block und unter Beiträgen, kein eigener Menüpunkt); WordPress-Import (Beiträge, Kategorien, Bilder, Seiten); E-Mail-Versand im Admin | +| **4b – Formulare & Umstieg** ✅ | Formular-Plugin (visueller Baukasten im Portal, Bedingungen, Uploads, anonyme Formulare, Mail + Backend, Ergebnis-Rechte je Formular und Rolle, CSV, Löschfristen; eingebunden per Pagebuilder-Block und unter Beiträgen, kein eigener Menüpunkt); WordPress-Import (Beiträge, Kategorien, Bilder, Seiten); E-Mail-Versand im Admin; anpassbare Startseite mit eigenen Kacheln; Geburtstage (optionales Plugin) | | **5 – Branding & Theming** | Vollständige Seite „Erscheinungsbild“: Logo-Varianten, Farben inkl. Farbtreue & Kontrastprüfung, Schriften, Form, Login-Seite, E-Mails, Live-Vorschau, Entwurf/Veröffentlichen, Export/Import | | **6 – Weitere Plugins & IdPs** | Verzeichnis/Organigramm, Dokumente, Events …; OIDC generisch, LDAP, SAML; Lasttests 5.000 User | | **7 – Plugin-SDK öffentlich** | Doku, Generator, Beispiel-Plugins (kein Plugin-Verzeichnis) | diff --git a/docs/PLUGINS.md b/docs/PLUGINS.md index f9bab006..05ce6368 100644 --- a/docs/PLUGINS.md +++ b/docs/PLUGINS.md @@ -116,6 +116,14 @@ $this->app->make(Blocks::class)->add(BlockType::make('mein-plugin.liste', 'Meine - Die Vue-Komponente erhält `block` (`data`, `items`, `props`) – Kinder werden mit `inject('pagebuilder:list')` gerendert. `inject('pagebuilder:editing')` ist im Editor wahr. +## Startseite und Profil + +- Kacheln: `app(App\Dashboard\Widgets::class)->add($key, 'mein-plugin::Kachel', 'aside', sort: 20, props: fn (User $user) => [...], label: 'Name im Admin')`. + Bereiche: `top`, `hero`, `feed`, `main`, `aside`. Admins sortieren und blenden Kacheln unter „Startseite“ aus. +- Abschnitt in „Profil bearbeiten“: `app(App\Profile\ProfileSections::class)->add($key, 'mein-plugin::Abschnitt', $sort, fn (User $user) => [...])` + (Komponente unter `resources/js/profile/`, speichert über eigene Routen). +- Optionale mitgelieferte Plugins: `"enabled_by_default": false` in `plugin.json`. + ## Redaktion, Navigation und Benachrichtigungen - Arbeitslisten im Bereich „Redaktion“: `app(App\Editorial\Editorial::class)->add($key, $label, 'mein-plugin::Liste', $sort, $sichtbar, $props)`. diff --git a/plugins-core/birthdays/database/migrations/2026_09_28_000004_create_birthdays_table.php b/plugins-core/birthdays/database/migrations/2026_09_28_000004_create_birthdays_table.php new file mode 100644 index 00000000..2c23dbee --- /dev/null +++ b/plugins-core/birthdays/database/migrations/2026_09_28_000004_create_birthdays_table.php @@ -0,0 +1,29 @@ +id(); + $table->foreignId('user_id')->unique()->constrained('users')->cascadeOnDelete(); + $table->unsignedTinyInteger('month'); + $table->unsignedTinyInteger('day'); + $table->timestamps(); + + $table->index(['month', 'day']); + }); + } + + public function down(): void + { + Schema::dropIfExists('birthdays'); + } +}; diff --git a/plugins-core/birthdays/plugin.json b/plugins-core/birthdays/plugin.json new file mode 100644 index 00000000..acca40b7 --- /dev/null +++ b/plugins-core/birthdays/plugin.json @@ -0,0 +1,14 @@ +{ + "slug": "birthdays", + "name": "Geburtstage", + "version": "1.0.0", + "description": "Geburtstagsliste zum Mitmachen: Wer möchte, trägt Tag und Monat im Profil ein. Mit Kachel auf der Startseite und Glückwunsch am eigenen Geburtstag.", + "author": "Inhaus", + "namespace": "Inhaus\\Plugins\\Birthdays\\", + "class": "Inhaus\\Plugins\\Birthdays\\BirthdaysPlugin", + "enabled_by_default": false, + "requires": { + "core": ">=0.6.0", + "php": ">=8.3" + } +} diff --git a/plugins-core/birthdays/resources/js/blocks/BirthdaysBlock.vue b/plugins-core/birthdays/resources/js/blocks/BirthdaysBlock.vue new file mode 100644 index 00000000..75c21b30 --- /dev/null +++ b/plugins-core/birthdays/resources/js/blocks/BirthdaysBlock.vue @@ -0,0 +1,15 @@ + + + diff --git a/plugins-core/birthdays/resources/js/components/BirthdayItem.vue b/plugins-core/birthdays/resources/js/components/BirthdayItem.vue new file mode 100644 index 00000000..8b233a29 --- /dev/null +++ b/plugins-core/birthdays/resources/js/components/BirthdayItem.vue @@ -0,0 +1,28 @@ + + + diff --git a/plugins-core/birthdays/resources/js/pages/Index.vue b/plugins-core/birthdays/resources/js/pages/Index.vue new file mode 100644 index 00000000..925c9ef8 --- /dev/null +++ b/plugins-core/birthdays/resources/js/pages/Index.vue @@ -0,0 +1,52 @@ + + + diff --git a/plugins-core/birthdays/resources/js/profile/ProfileBirthday.vue b/plugins-core/birthdays/resources/js/profile/ProfileBirthday.vue new file mode 100644 index 00000000..ddfdfb66 --- /dev/null +++ b/plugins-core/birthdays/resources/js/profile/ProfileBirthday.vue @@ -0,0 +1,69 @@ + + + diff --git a/plugins-core/birthdays/resources/js/widgets/Greeting.vue b/plugins-core/birthdays/resources/js/widgets/Greeting.vue new file mode 100644 index 00000000..412b0eb4 --- /dev/null +++ b/plugins-core/birthdays/resources/js/widgets/Greeting.vue @@ -0,0 +1,55 @@ + + + diff --git a/plugins-core/birthdays/resources/js/widgets/Upcoming.vue b/plugins-core/birthdays/resources/js/widgets/Upcoming.vue new file mode 100644 index 00000000..b48f8b56 --- /dev/null +++ b/plugins-core/birthdays/resources/js/widgets/Upcoming.vue @@ -0,0 +1,17 @@ + + + diff --git a/plugins-core/birthdays/routes/web.php b/plugins-core/birthdays/routes/web.php new file mode 100644 index 00000000..bc970cba --- /dev/null +++ b/plugins-core/birthdays/routes/web.php @@ -0,0 +1,10 @@ +group(function () { + Route::get('/geburtstage', [BirthdayController::class, 'index'])->name('birthdays.index'); + Route::put('/profil/geburtstag', [BirthdayController::class, 'update'])->name('birthdays.update'); + Route::delete('/profil/geburtstag', [BirthdayController::class, 'destroy'])->name('birthdays.destroy'); +}); diff --git a/plugins-core/birthdays/src/BirthdayList.php b/plugins-core/birthdays/src/BirthdayList.php new file mode 100644 index 00000000..dbf0547c --- /dev/null +++ b/plugins-core/birthdays/src/BirthdayList.php @@ -0,0 +1,95 @@ + 'Alle Mitarbeitenden', + 'department' => 'Nur die eigene Abteilung', + 'location' => 'Nur der eigene Standort', + ]; + + public function __construct(private readonly Settings $settings) {} + + public function scope(): string + { + return array_key_exists($s = (string) $this->settings->get('birthdays.scope', 'all'), self::SCOPES) ? $s : 'all'; + } + + public function daysAhead(): int + { + return max(0, min(60, (int) $this->settings->get('birthdays.days', 7))); + } + + public function greetingEnabled(): bool + { + return (bool) $this->settings->get('birthdays.greeting', true); + } + + /** + * @return list}> + */ + public function upcoming(User $viewer, ?int $days = null, ?string $scope = null, int $limit = 200): array + { + $days ??= $this->daysAhead(); + $scope ??= $this->scope(); + $today = Carbon::today(); + $end = $today->copy()->addDays($days); + + // Nur die betroffenen Monate laden (höchstens drei), dann genau filtern. + $months = collect(range(0, (int) $today->copy()->startOfMonth()->diffInMonths($end->copy()->startOfMonth()))) + ->map(fn ($i) => $today->copy()->startOfMonth()->addMonths($i)->month)->unique()->values()->all(); + + $birthdays = Birthday::query() + ->whereIn('month', $months) + ->whereHas('user', function ($q) use ($viewer, $scope) { + $q->where('is_active', true); + + if ($scope === 'department') { + $viewer->department ? $q->where('department', $viewer->department) : $q->whereKey($viewer->id); + } elseif ($scope === 'location') { + $viewer->location ? $q->where('location', $viewer->location) : $q->whereKey($viewer->id); + } + }) + ->with('user') + ->get(); + + return $birthdays + ->map(fn (Birthday $b) => ['birthday' => $b, 'date' => $b->nextOccurrence($today)]) + ->filter(fn ($row) => $row['date']->lte($end)) + ->sortBy(fn ($row) => $row['date']->format('Ymd').mb_strtolower($row['birthday']->user->last_name.' '.$row['birthday']->user->first_name)) + ->take($limit) + ->map(fn ($row) => [ + 'date' => $row['date']->toDateString(), + 'today' => $row['date']->isSameDay($today), + 'person' => (new PersonResource($row['birthday']->user))->resolve(), + ]) + ->values() + ->all(); + } + + public function isBirthdayToday(User $user): bool + { + return (bool) Birthday::query()->where('user_id', $user->id)->first()?->isOn(Carbon::today()); + } + + /** + * @return Collection + */ + public static function months(): Collection + { + return collect(range(1, 12))->mapWithKeys(fn ($m) => [$m => Carbon::create(2000, $m, 1)->locale('de')->translatedFormat('F')]); + } +} diff --git a/plugins-core/birthdays/src/BirthdaysPlugin.php b/plugins-core/birthdays/src/BirthdaysPlugin.php new file mode 100644 index 00000000..7659a79d --- /dev/null +++ b/plugins-core/birthdays/src/BirthdaysPlugin.php @@ -0,0 +1,60 @@ +app->singleton(BirthdayList::class); + + $this->app->make(ProfileSections::class)->add('birthday', 'birthdays::ProfileBirthday', 10, function (User $user) { + $birthday = Birthday::query()->where('user_id', $user->id)->first(); + + return [ + 'birthday' => $birthday ? ['day' => $birthday->day, 'month' => $birthday->month] : null, + 'months' => BirthdayList::months()->map(fn ($label, $value) => ['value' => $value, 'label' => $label])->values(), + 'scope' => app(BirthdayList::class)->scope(), + ]; + }); + + $widgets = $this->app->make(Widgets::class); + + // Glückwunsch oben auf der Startseite – nur am eigenen Geburtstag. + $widgets->add('birthdays.greeting', 'birthdays::Greeting', 'top', sort: 0, props: function (User $user) { + $list = app(BirthdayList::class); + + return $list->greetingEnabled() && $list->isBirthdayToday($user) ? ['name' => $user->first_name ?: $user->name] : null; + }, label: 'Geburtstagsgruß (am eigenen Geburtstag)', mobileSort: -100); + + $widgets->add('birthdays.upcoming', 'birthdays::Upcoming', 'aside', sort: 30, props: function (User $user) { + $list = app(BirthdayList::class); + $upcoming = $list->upcoming($user, limit: 8); + + return $upcoming === [] ? null : ['birthdays' => $upcoming, 'days' => $list->daysAhead()]; + }, label: 'Geburtstage', mobileSort: 35); + + $this->app->make(Blocks::class)->add(BlockType::make('birthdays.list', 'Geburtstage', 'cake', 'dynamic', 'birthdays::BirthdaysBlock') + ->description('Anstehende Geburtstage – z. B. auf der Seite einer Abteilung.') + ->fields([ + Field::text('title', 'Überschrift', 150, 'Geburtstage'), + Field::select('scope', 'Wessen Geburtstage', ['' => 'Wie in den Einstellungen'] + BirthdayList::SCOPES, ''), + Field::number('days', 'Tage im Voraus', 0, 60, 14), + ]) + ->resolveUsing(fn (array $data, ?User $user) => $user ? [ + 'birthdays' => app(BirthdayList::class)->upcoming($user, $data['days'], $data['scope'] ?: null, 30), + ] : null)); + } +} diff --git a/plugins-core/birthdays/src/Filament/Pages/BirthdaySettings.php b/plugins-core/birthdays/src/Filament/Pages/BirthdaySettings.php new file mode 100644 index 00000000..0913c457 --- /dev/null +++ b/plugins-core/birthdays/src/Filament/Pages/BirthdaySettings.php @@ -0,0 +1,69 @@ +|null */ + public ?array $data = []; + + public static function canAccess(): bool + { + return auth()->user()?->can('appearance.manage') ?? false; + } + + public function mount(BirthdayList $list): void + { + $this->form->fill(['scope' => $list->scope(), 'days' => $list->daysAhead(), 'greeting' => $list->greetingEnabled()]); + } + + public function form(Schema $schema): Schema + { + return $schema->statePath('data')->components([ + Section::make('Geburtstagsliste') + ->description(fn () => 'Mitarbeitende tragen sich freiwillig im Profil ein (nur Tag und Monat). Derzeit eingetragen: '.Birthday::query()->count().'.') + ->columns(2) + ->schema([ + Select::make('scope')->label('Wer sieht wessen Geburtstag')->options(BirthdayList::SCOPES)->required()->native(false), + TextInput::make('days')->label('Tage im Voraus auf der Startseite')->numeric()->minValue(0)->maxValue(60)->required(), + Toggle::make('greeting')->label('Am eigenen Geburtstag auf der Startseite gratulieren')->columnSpanFull(), + ]), + ]); + } + + public function save(Settings $settings): void + { + $state = $this->form->getState(); + $settings->setMany(['birthdays.scope' => $state['scope'], 'birthdays.days' => (int) $state['days'], 'birthdays.greeting' => (bool) $state['greeting']]); + + Notification::make()->success()->title('Gespeichert')->send(); + } +} diff --git a/plugins-core/birthdays/src/Http/Controllers/BirthdayController.php b/plugins-core/birthdays/src/Http/Controllers/BirthdayController.php new file mode 100644 index 00000000..956304a0 --- /dev/null +++ b/plugins-core/birthdays/src/Http/Controllers/BirthdayController.php @@ -0,0 +1,48 @@ + $list->upcoming($request->user(), 30), + 'scope' => BirthdayList::SCOPES[$list->scope()], + 'registered' => Birthday::query()->where('user_id', $request->user()->id)->exists(), + ]); + } + + public function update(Request $request): RedirectResponse + { + $data = $request->validate([ + 'day' => ['required', 'integer', 'between:1,31'], + 'month' => ['required', 'integer', 'between:1,12'], + ], [], ['day' => 'Tag', 'month' => 'Monat']); + + // Gültiger Tag im Monat (29. Februar erlaubt). + if (! checkdate($data['month'], $data['day'], 2000)) { + throw ValidationException::withMessages(['day' => 'Diesen Tag gibt es im gewählten Monat nicht.']); + } + + Birthday::query()->updateOrCreate(['user_id' => $request->user()->id], $data); + + return back()->with('status', 'birthday-saved'); + } + + public function destroy(Request $request): RedirectResponse + { + Birthday::query()->where('user_id', $request->user()->id)->delete(); + + return back()->with('status', 'birthday-removed'); + } +} diff --git a/plugins-core/birthdays/src/Models/Birthday.php b/plugins-core/birthdays/src/Models/Birthday.php new file mode 100644 index 00000000..237f39cc --- /dev/null +++ b/plugins-core/birthdays/src/Models/Birthday.php @@ -0,0 +1,46 @@ + + */ + public function user(): BelongsTo + { + return $this->belongsTo(User::class); + } + + /** + * Nächster Geburtstag ab $from (heute eingeschlossen). Der 29. Februar + * wird in Nicht-Schaltjahren am 28. Februar gefeiert. + */ + public function nextOccurrence(Carbon $from): Carbon + { + $date = self::inYear($from->year, $this->month, $this->day); + + return $date->lt($from->copy()->startOfDay()) ? self::inYear($from->year + 1, $this->month, $this->day) : $date; + } + + public function isOn(Carbon $date): bool + { + return self::inYear($date->year, $this->month, $this->day)->isSameDay($date); + } + + private static function inYear(int $year, int $month, int $day): Carbon + { + if ($month === 2 && $day === 29 && ! Carbon::create($year)->isLeapYear()) { + $day = 28; + } + + return Carbon::create($year, $month, $day)->startOfDay(); + } +} diff --git a/plugins-core/events/src/EventsPlugin.php b/plugins-core/events/src/EventsPlugin.php index 87dd9343..99093a8a 100644 --- a/plugins-core/events/src/EventsPlugin.php +++ b/plugins-core/events/src/EventsPlugin.php @@ -25,7 +25,7 @@ class EventsPlugin extends Plugin $this->app->make(Widgets::class)->add('events.upcoming', 'events::Upcoming', 'aside', sort: 20, props: fn (User $user) => [ 'events' => EventResource::collection(Event::query()->upcoming()->visibleTo($user)->limit(4)->get())->resolve(), - ], mobileSort: 30); + ], label: 'Termine', mobileSort: 30); $this->app->make(Blocks::class)->add(BlockType::make('events.upcoming', 'Termine', 'calendar-days', 'dynamic', 'events::UpcomingEvents') ->description('Die nächsten Termine.') diff --git a/plugins-core/forms/resources/js/components/FormRenderer.vue b/plugins-core/forms/resources/js/components/FormRenderer.vue index 5aa29af9..d78b10e0 100644 --- a/plugins-core/forms/resources/js/components/FormRenderer.vue +++ b/plugins-core/forms/resources/js/components/FormRenderer.vue @@ -1,7 +1,7 @@ + + diff --git a/tests/Feature/Birthdays/BirthdaysTest.php b/tests/Feature/Birthdays/BirthdaysTest.php new file mode 100644 index 00000000..d7c78d7f --- /dev/null +++ b/tests/Feature/Birthdays/BirthdaysTest.php @@ -0,0 +1,118 @@ +travelTo(Carbon::create(2027, 3, 10, 9)); + $this->anna = User::factory()->create(['first_name' => 'Anna', 'last_name' => 'Schmidt', 'department' => 'Pflege', 'location' => 'Hamburg']); + } + + private function birthday(User $user, int $month, int $day): void + { + Birthday::query()->create(['user_id' => $user->id, 'month' => $month, 'day' => $day]); + } + + public function test_plugin_is_optional_and_off_by_default(): void + { + $manifest = PluginManifest::fromDirectory(base_path('plugins-core/birthdays'), core: true); + $state = new PluginState(storage_path('framework/testing/plugins-'.uniqid().'.json')); + + PluginState::$enableOptionalCorePlugins = false; + + try { + $this->assertFalse($manifest->enabledByDefault); + $this->assertFalse($state->isEnabled($manifest)); + $this->assertTrue($state->isEnabled(PluginManifest::fromDirectory(base_path('plugins-core/news'), core: true))); + + $state->setEnabled('birthdays', true); + $this->assertTrue($state->isEnabled($manifest)); + } finally { + PluginState::$enableOptionalCorePlugins = true; + } + } + + public function test_people_opt_in_with_day_and_month_only(): void + { + $this->actingAs($this->anna)->get('/profil/bearbeiten')->assertInertia(fn (Assert $p) => $p + ->where('sections.0.key', 'birthday') + ->where('sections.0.props.birthday', null)); + + $this->put('/profil/geburtstag', ['day' => 31, 'month' => 4])->assertSessionHasErrors('day'); + $this->put('/profil/geburtstag', ['day' => 29, 'month' => 2])->assertSessionHasNoErrors(); + $this->put('/profil/geburtstag', ['day' => 12, 'month' => 3])->assertSessionHasNoErrors(); + + $this->assertSame(1, Birthday::query()->count()); + $this->get('/profil/bearbeiten')->assertInertia(fn (Assert $p) => $p->where('sections.0.props.birthday', ['day' => 12, 'month' => 3])); + + $this->delete('/profil/geburtstag'); + $this->assertSame(0, Birthday::query()->count()); + } + + public function test_upcoming_birthdays_on_the_dashboard_and_list(): void + { + $ben = User::factory()->create(['first_name' => 'Ben', 'department' => 'Verwaltung']); + $cleo = User::factory()->create(['first_name' => 'Cleo', 'department' => 'Pflege']); + $gone = User::factory()->inactive()->create(); + $this->birthday($ben, 3, 10); // heute + $this->birthday($cleo, 3, 14); // in 4 Tagen + $this->birthday($gone, 3, 11); // deaktiviert + $this->birthday(User::factory()->create(), 5, 1); // zu weit weg + + $response = $this->actingAs($this->anna)->get('/'); + $upcoming = $this->dashboardWidget($response, 'birthdays.upcoming')['birthdays']; + $this->assertSame([[$ben->id, true, '2027-03-10'], [$cleo->id, false, '2027-03-14']], array_map(fn ($b) => [$b['person']['id'], $b['today'], $b['date']], $upcoming)); + $this->assertNull($this->dashboardWidget($response, 'birthdays.greeting')); + + // Nur die eigene Abteilung + app(Settings::class)->set('birthdays.scope', 'department'); + $this->assertSame([$cleo->id], array_map(fn ($b) => $b['person']['id'], app(BirthdayList::class)->upcoming($this->anna))); + + $this->get('/geburtstage')->assertOk()->assertInertia(fn (Assert $p) => $p->component('birthdays::Index')->has('birthdays', 1)->where('registered', false)); + } + + public function test_birthday_person_is_congratulated(): void + { + $this->birthday($this->anna, 3, 10); + + $response = $this->actingAs($this->anna)->get('/'); + $this->assertSame(['name' => 'Anna'], $this->dashboardWidget($response, 'birthdays.greeting')); + + app(Settings::class)->set('birthdays.greeting', false); + $this->assertNull($this->dashboardWidget($this->get('/'), 'birthdays.greeting')); + } + + public function test_new_year_and_leap_day(): void + { + $this->travelTo(Carbon::create(2027, 12, 28)); + $leap = User::factory()->create(); + $newYear = User::factory()->create(); + $this->birthday($newYear, 1, 2); + $this->birthday($leap, 2, 29); + + $this->assertSame(['2028-01-02'], array_column(app(BirthdayList::class)->upcoming($this->anna, 7), 'date')); + + // 2027 ist kein Schaltjahr: gefeiert wird am 28. Februar. + $this->travelTo(Carbon::create(2027, 2, 28, 8)); + $this->assertTrue(app(BirthdayList::class)->isBirthdayToday($leap)); + } +} diff --git a/tests/Feature/DashboardCustomizationTest.php b/tests/Feature/DashboardCustomizationTest.php new file mode 100644 index 00000000..967ce55d --- /dev/null +++ b/tests/Feature/DashboardCustomizationTest.php @@ -0,0 +1,95 @@ +actingAs($user)->get('/')->viewData('page')['props']['widgets']; + + return array_values(array_column(array_filter($widgets, fn ($w) => $w['area'] === $area), 'key')); + } + + public function test_admin_adds_an_image_tile_with_link(): void + { + Storage::fake('uploads'); + $admin = User::factory()->admin()->create(); + $this->actingAs($admin); + + Livewire::test(ManageDashboardTiles::class) + ->callAction('create', [ + 'name' => 'Betriebsrat-Banner', + 'type' => 'image', + 'area' => 'aside', + 'image_path' => UploadedFile::fake()->image('banner.jpg', 800, 600), + 'url' => 'intranet.example.org/aktion', + 'alt' => 'Aktion Gesundheit', + 'is_active' => true, + ]) + ->assertHasNoActionErrors(); + + $tile = DashboardTile::query()->sole(); + $this->assertSame('https://intranet.example.org/aktion', $tile->url); + + $props = $this->dashboardWidget($this->get('/'), $tile->widgetKey()); + $this->assertSame('image', $props['tile']['type']); + $this->assertSame('Aktion Gesundheit', $props['tile']['alt']); + $this->assertNotNull($props['tile']['image_url']); + } + + public function test_tiles_respect_period_and_audience(): void + { + $nurse = User::factory()->create(['department' => 'Pflege']); + $clerk = User::factory()->create(['department' => 'Verwaltung']); + + $notice = DashboardTile::query()->create(['name' => 'Hinweis', 'type' => 'notice', 'area' => 'top', 'title' => 'Heute Betriebsversammlung', 'body' => '

14 Uhr

', 'variant' => 'info']); + $expired = DashboardTile::query()->create(['name' => 'Alt', 'type' => 'text', 'area' => 'aside', 'body' => 'x', 'ends_at' => now()->subDay()]); + $inactive = DashboardTile::query()->create(['name' => 'Aus', 'type' => 'text', 'area' => 'aside', 'body' => 'x', 'is_active' => false]); + Audiences::sync('dashboard_tile', $notice->id, ['department' => ['Pflege']]); + + $this->assertSame(['tile.'.$notice->id], $this->keys($nurse, 'top')); + $this->assertSame([], $this->keys($clerk, 'top')); + $this->assertNotContains($expired->widgetKey(), $this->keys($nurse, 'aside')); + $this->assertNotContains($inactive->widgetKey(), $this->keys($nurse, 'aside')); + $this->assertStringNotContainsString('script', $notice->fresh()->body_html); + } + + public function test_admin_reorders_and_hides_tiles(): void + { + $admin = User::factory()->admin()->create(); + $tile = DashboardTile::query()->create(['name' => 'Banner', 'type' => 'text', 'area' => 'aside', 'body' => 'Hallo']); + + $default = $this->keys($admin, 'aside'); + $this->assertSame('core.greeting', $default[0]); + $this->assertSame($tile->widgetKey(), end($default), 'Neue eigene Kacheln stehen zunächst am Ende.'); + + $page = Livewire::actingAs($admin)->test(DashboardSettings::class); + $aside = collect($page->get('data.aside'))->values(); + $this->assertContains('Eigene Kachel: Banner', $aside->pluck('label')); + + // Eigene Kachel nach oben, „Personen finden“ ausblenden + $reordered = $aside->sortBy(fn ($item) => $item['key'] === $tile->widgetKey() ? 0 : 1)->values() + ->map(fn ($item) => $item['key'] === 'core.people-search' ? [...$item, 'visible' => false] : $item)->all(); + $page->set('data.aside', $reordered)->call('save')->assertHasNoErrors(); + + $keys = $this->keys($admin, 'aside'); + $this->assertSame($tile->widgetKey(), $keys[0]); + $this->assertNotContains('core.people-search', $keys); + + $this->actingAs(User::factory()->create())->get('/admin/startseite')->assertForbidden(); + } +} diff --git a/tests/Feature/Forms/FormsTest.php b/tests/Feature/Forms/FormsTest.php index 4c20f3b9..3a5d0526 100644 --- a/tests/Feature/Forms/FormsTest.php +++ b/tests/Feature/Forms/FormsTest.php @@ -2,6 +2,7 @@ namespace Tests\Feature\Forms; +use App\Models\ProfileField; use App\Models\Role; use App\Models\User; use App\Notifications\PortalNotification; @@ -339,4 +340,52 @@ class FormsTest extends TestCase Audiences::sync('form', $form->id, ['department' => ['Verwaltung']]); $this->assertSame([], $content->render($content->sanitize(['blocks' => [['type' => 'forms.form', 'data' => ['form' => (string) $form->id]]]]), $this->employee)['blocks']); } + + public function test_locked_profile_fields_always_use_the_profile_value(): void + { + ProfileField::query()->create(['key' => 'personalnummer', 'label' => 'Personalnummer', 'editable' => false]); + $this->employee->update(['custom_fields' => ['personalnummer' => 'P-4711'], 'location' => null]); + + $form = Form::query()->create(['title' => 'Stammdaten', 'fields' => [ + ['type' => 'text', 'data' => ['label' => 'Vorname', 'prefill' => 'first_name', 'locked' => true, 'required' => true]], + ['type' => 'text', 'data' => ['label' => 'Personalnummer', 'prefill' => 'custom.personalnummer', 'locked' => true, 'required' => true]], + ['type' => 'text', 'data' => ['label' => 'Standort', 'prefill' => 'location', 'locked' => true, 'required' => true]], + ['type' => 'text', 'data' => ['label' => 'Abteilung', 'prefill' => 'department']], + ]]); + + $this->actingAs($this->employee)->get($form->url())->assertInertia(fn (Assert $p) => $p + ->where('form.fields.0.locked', true) + ->where('form.fields.1.locked', true) + ->where('form.prefill.personalnummer', 'P-4711') + ->missing('form.fields.3.locked')); + + // Standort fehlt im Profil → Hinweis statt Einsendung. + $this->post($form->url(), ['answers' => ['vorname' => 'Gefälscht', 'personalnummer' => 'X-0000']]) + ->assertSessionHasErrors(['answers.standort' => 'Diese Angabe fehlt in Ihrem Profil. Bitte ergänzen Sie sie dort (Profil bearbeiten) oder wenden Sie sich an die Personalverwaltung.']); + + $this->employee->update(['location' => 'Hamburg']); + $this->post($form->url(), ['answers' => ['vorname' => 'Gefälscht', 'personalnummer' => 'X-0000', 'abteilung' => 'Selbst geändert']])->assertSessionHasNoErrors(); + + $submission = FormSubmission::query()->sole(); + $this->assertSame('Anna', $submission->display('vorname'), 'Manipulierte Eingaben werden durch den Profilwert ersetzt.'); + $this->assertSame('P-4711', $submission->display('personalnummer')); + $this->assertSame('Hamburg', $submission->display('standort')); + $this->assertSame('Selbst geändert', $submission->display('abteilung'), 'Nur vorbelegte Felder bleiben änderbar.'); + } + + public function test_builder_keeps_lock_only_with_prefill(): void + { + $this->actingAs(User::factory()->admin()->create()); + $form = $this->trainingForm(); + + $saved = $this->putJson(route('forms.builder.update', $form), ['title' => 'x', 'fields' => [ + ['type' => 'text', 'data' => ['label' => 'Vorname', 'prefill' => 'first_name', 'locked' => true]], + ['type' => 'text', 'data' => ['label' => 'Frei', 'locked' => true]], + ['type' => 'textarea', 'data' => ['label' => 'Text', 'prefill' => 'name', 'locked' => true]], + ]])->assertOk()->json('fields'); + + $this->assertTrue($saved[0]['data']['locked']); + $this->assertArrayNotHasKey('locked', $saved[1]['data']); + $this->assertArrayNotHasKey('locked', $saved[2]['data']); + } } diff --git a/tests/TestCase.php b/tests/TestCase.php index 4cc4aa1d..69a8da89 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -2,11 +2,20 @@ namespace Tests; +use App\Plugins\PluginState; use Illuminate\Foundation\Testing\TestCase as BaseTestCase; use Illuminate\Testing\TestResponse; abstract class TestCase extends BaseTestCase { + public function createApplication() + { + // Optionale mitgelieferte Plugins (z. B. Geburtstage) in Tests mitladen. + PluginState::$enableOptionalCorePlugins = true; + + return parent::createApplication(); + } + /** * Props einer Startseiten-Kachel (oder null, wenn sie nicht angezeigt wird). * diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 416df620..7a6c8669 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -23,6 +23,7 @@ return array( 'App\\Filament\\Components\\AudienceSection' => $baseDir . '/app/Filament/Components/AudienceSection.php', 'App\\Filament\\Components\\RoleGrantSelect' => $baseDir . '/app/Filament/Components/RoleGrantSelect.php', 'App\\Filament\\Pages\\Appearance' => $baseDir . '/app/Filament/Pages/Appearance.php', + 'App\\Filament\\Pages\\DashboardSettings' => $baseDir . '/app/Filament/Pages/DashboardSettings.php', 'App\\Filament\\Pages\\Feedback' => $baseDir . '/app/Filament/Pages/Feedback.php', 'App\\Filament\\Pages\\MailSettingsPage' => $baseDir . '/app/Filament/Pages/MailSettingsPage.php', 'App\\Filament\\Pages\\PermissionChecker' => $baseDir . '/app/Filament/Pages/PermissionChecker.php', @@ -30,6 +31,8 @@ return array( 'App\\Filament\\Pages\\QuickLinksSettings' => $baseDir . '/app/Filament/Pages/QuickLinksSettings.php', 'App\\Filament\\Pages\\SystemHealth' => $baseDir . '/app/Filament/Pages/SystemHealth.php', 'App\\Filament\\Pages\\Updates' => $baseDir . '/app/Filament/Pages/Updates.php', + 'App\\Filament\\Resources\\DashboardTiles\\DashboardTileResource' => $baseDir . '/app/Filament/Resources/DashboardTiles/DashboardTileResource.php', + 'App\\Filament\\Resources\\DashboardTiles\\Pages\\ManageDashboardTiles' => $baseDir . '/app/Filament/Resources/DashboardTiles/Pages/ManageDashboardTiles.php', 'App\\Filament\\Resources\\IdentityProviders\\IdentityProviderResource' => $baseDir . '/app/Filament/Resources/IdentityProviders/IdentityProviderResource.php', 'App\\Filament\\Resources\\IdentityProviders\\Pages\\CreateIdentityProvider' => $baseDir . '/app/Filament/Resources/IdentityProviders/Pages/CreateIdentityProvider.php', 'App\\Filament\\Resources\\IdentityProviders\\Pages\\EditIdentityProvider' => $baseDir . '/app/Filament/Resources/IdentityProviders/Pages/EditIdentityProvider.php', @@ -75,6 +78,7 @@ return array( 'App\\Identity\\IdentitySync' => $baseDir . '/app/Identity/IdentitySync.php', 'App\\Models\\Audience' => $baseDir . '/app/Models/Audience.php', 'App\\Models\\AuditLog' => $baseDir . '/app/Models/AuditLog.php', + 'App\\Models\\DashboardTile' => $baseDir . '/app/Models/DashboardTile.php', 'App\\Models\\Grant' => $baseDir . '/app/Models/Grant.php', 'App\\Models\\IdentityProvider' => $baseDir . '/app/Models/IdentityProvider.php', 'App\\Models\\IdpGroupMapping' => $baseDir . '/app/Models/IdpGroupMapping.php', @@ -99,6 +103,7 @@ return array( 'App\\Plugins\\VersionConstraint' => $baseDir . '/app/Plugins/VersionConstraint.php', 'App\\Policies\\RolePolicy' => $baseDir . '/app/Policies/RolePolicy.php', 'App\\Policies\\UserPolicy' => $baseDir . '/app/Policies/UserPolicy.php', + 'App\\Profile\\ProfileSections' => $baseDir . '/app/Profile/ProfileSections.php', 'App\\Providers\\AppServiceProvider' => $baseDir . '/app/Providers/AppServiceProvider.php', 'App\\Providers\\Filament\\AdminPanelProvider' => $baseDir . '/app/Providers/Filament/AdminPanelProvider.php', 'App\\Providers\\FortifyServiceProvider' => $baseDir . '/app/Providers/FortifyServiceProvider.php', diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index c5aba6de..7c5b8c05 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -803,6 +803,7 @@ class ComposerStaticInit7be5f0fc2523def46ad071c4f7cbcb0e 'App\\Filament\\Components\\AudienceSection' => __DIR__ . '/../..' . '/app/Filament/Components/AudienceSection.php', 'App\\Filament\\Components\\RoleGrantSelect' => __DIR__ . '/../..' . '/app/Filament/Components/RoleGrantSelect.php', 'App\\Filament\\Pages\\Appearance' => __DIR__ . '/../..' . '/app/Filament/Pages/Appearance.php', + 'App\\Filament\\Pages\\DashboardSettings' => __DIR__ . '/../..' . '/app/Filament/Pages/DashboardSettings.php', 'App\\Filament\\Pages\\Feedback' => __DIR__ . '/../..' . '/app/Filament/Pages/Feedback.php', 'App\\Filament\\Pages\\MailSettingsPage' => __DIR__ . '/../..' . '/app/Filament/Pages/MailSettingsPage.php', 'App\\Filament\\Pages\\PermissionChecker' => __DIR__ . '/../..' . '/app/Filament/Pages/PermissionChecker.php', @@ -810,6 +811,8 @@ class ComposerStaticInit7be5f0fc2523def46ad071c4f7cbcb0e 'App\\Filament\\Pages\\QuickLinksSettings' => __DIR__ . '/../..' . '/app/Filament/Pages/QuickLinksSettings.php', 'App\\Filament\\Pages\\SystemHealth' => __DIR__ . '/../..' . '/app/Filament/Pages/SystemHealth.php', 'App\\Filament\\Pages\\Updates' => __DIR__ . '/../..' . '/app/Filament/Pages/Updates.php', + 'App\\Filament\\Resources\\DashboardTiles\\DashboardTileResource' => __DIR__ . '/../..' . '/app/Filament/Resources/DashboardTiles/DashboardTileResource.php', + 'App\\Filament\\Resources\\DashboardTiles\\Pages\\ManageDashboardTiles' => __DIR__ . '/../..' . '/app/Filament/Resources/DashboardTiles/Pages/ManageDashboardTiles.php', 'App\\Filament\\Resources\\IdentityProviders\\IdentityProviderResource' => __DIR__ . '/../..' . '/app/Filament/Resources/IdentityProviders/IdentityProviderResource.php', 'App\\Filament\\Resources\\IdentityProviders\\Pages\\CreateIdentityProvider' => __DIR__ . '/../..' . '/app/Filament/Resources/IdentityProviders/Pages/CreateIdentityProvider.php', 'App\\Filament\\Resources\\IdentityProviders\\Pages\\EditIdentityProvider' => __DIR__ . '/../..' . '/app/Filament/Resources/IdentityProviders/Pages/EditIdentityProvider.php', @@ -855,6 +858,7 @@ class ComposerStaticInit7be5f0fc2523def46ad071c4f7cbcb0e 'App\\Identity\\IdentitySync' => __DIR__ . '/../..' . '/app/Identity/IdentitySync.php', 'App\\Models\\Audience' => __DIR__ . '/../..' . '/app/Models/Audience.php', 'App\\Models\\AuditLog' => __DIR__ . '/../..' . '/app/Models/AuditLog.php', + 'App\\Models\\DashboardTile' => __DIR__ . '/../..' . '/app/Models/DashboardTile.php', 'App\\Models\\Grant' => __DIR__ . '/../..' . '/app/Models/Grant.php', 'App\\Models\\IdentityProvider' => __DIR__ . '/../..' . '/app/Models/IdentityProvider.php', 'App\\Models\\IdpGroupMapping' => __DIR__ . '/../..' . '/app/Models/IdpGroupMapping.php', @@ -879,6 +883,7 @@ class ComposerStaticInit7be5f0fc2523def46ad071c4f7cbcb0e 'App\\Plugins\\VersionConstraint' => __DIR__ . '/../..' . '/app/Plugins/VersionConstraint.php', 'App\\Policies\\RolePolicy' => __DIR__ . '/../..' . '/app/Policies/RolePolicy.php', 'App\\Policies\\UserPolicy' => __DIR__ . '/../..' . '/app/Policies/UserPolicy.php', + 'App\\Profile\\ProfileSections' => __DIR__ . '/../..' . '/app/Profile/ProfileSections.php', 'App\\Providers\\AppServiceProvider' => __DIR__ . '/../..' . '/app/Providers/AppServiceProvider.php', 'App\\Providers\\Filament\\AdminPanelProvider' => __DIR__ . '/../..' . '/app/Providers/Filament/AdminPanelProvider.php', 'App\\Providers\\FortifyServiceProvider' => __DIR__ . '/../..' . '/app/Providers/FortifyServiceProvider.php', diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 0c12366e..3309a01e 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => 'inhaus/inhaus', 'pretty_version' => 'dev-main', 'version' => 'dev-main', - 'reference' => '11123fecc0afe197d1edcc0d98a927f5e06d62ff', + 'reference' => '435960725d3832d8c639dc5c825fac30d84b4068', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -550,7 +550,7 @@ 'inhaus/inhaus' => array( 'pretty_version' => 'dev-main', 'version' => 'dev-main', - 'reference' => '11123fecc0afe197d1edcc0d98a927f5e06d62ff', + 'reference' => '435960725d3832d8c639dc5c825fac30d84b4068', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(),