diff --git a/BeWo/BeWo.csproj b/BeWo/BeWo.csproj index a5a28d26b..abc070b0b 100644 --- a/BeWo/BeWo.csproj +++ b/BeWo/BeWo.csproj @@ -221,6 +221,7 @@ DeveloperView.xaml + CustomerWohneinheitenView.xaml @@ -378,6 +379,7 @@ Designer MSBuild:Compile + MSBuild:Compile Designer diff --git a/BeWo/Scheduler/Utils/AppointmentExtensions.cs b/BeWo/Scheduler/Utils/AppointmentExtensions.cs index 4897b5fbd..6ad35c327 100644 --- a/BeWo/Scheduler/Utils/AppointmentExtensions.cs +++ b/BeWo/Scheduler/Utils/AppointmentExtensions.cs @@ -17,7 +17,15 @@ namespace BeWo.Scheduler.Utils public static CustomFieldStorage GetCustomFieldStorage(this Appointment appointment) { - return appointment.CustomFields[nameof(CustomFieldStorage)] as CustomFieldStorage; + try + { + return appointment.CustomFields[nameof(CustomFieldStorage)] as CustomFieldStorage; + } + catch (Exception) + { + + } + return new CustomFieldStorage(); } public static bool CF_IsTask(this Appointment appointment) diff --git a/BeWo/Scheduler/View/NewSchedulerView.xaml.cs b/BeWo/Scheduler/View/NewSchedulerView.xaml.cs index ac37696a4..fa1977274 100644 --- a/BeWo/Scheduler/View/NewSchedulerView.xaml.cs +++ b/BeWo/Scheduler/View/NewSchedulerView.xaml.cs @@ -7,6 +7,7 @@ using System.Globalization; using System.IO; using System.Linq; using System.Text; +using System.Threading; using System.Windows; using System.Windows.Controls; using System.Windows.Controls.Primitives; @@ -55,6 +56,8 @@ namespace BeWo.Scheduler.View private bool _IsEmployeeBrushVisible; + Appointment appointmentToOpenFormHomePanel = null; + public bool IsEmployeeBrushVisible { get => _IsEmployeeBrushVisible; @@ -2255,11 +2258,11 @@ namespace BeWo.Scheduler.View var apps = Scheduler.ActiveView.GetAppointments().ToList(); var oid = _SelectedAppointmentFromHomePanelView.SchedulerAppointmentOid; - Appointment appointmentToOpen; + //Appointment appointmentToOpen; if(oid != null) { - appointmentToOpen = apps.FirstOrDefault(app => + appointmentToOpenFormHomePanel = apps.FirstOrDefault(app => { var oidValue = app.CF_SchedulerAppointmentOid(); @@ -2267,19 +2270,19 @@ namespace BeWo.Scheduler.View }); - if(appointmentToOpen != null) - { - Scheduler.ShowEditAppointmentForm(appointmentToOpen); - } + //if(appointmentToOpenFormHomePanel != null) + //{ + // Scheduler.ShowEditAppointmentForm(appointmentToOpenFormHomePanel); + //} } else if(_SelectedAppointmentFromHomePanelView.RecurrenceId != null && _SelectedAppointmentFromHomePanelView.RecurrenceIndex > 0) { - appointmentToOpen = apps.FirstOrDefault(appointment => appointment.RecurrenceInfo.Id.ToString().Equals(_SelectedAppointmentFromHomePanelView.RecurrenceId)); + appointmentToOpenFormHomePanel = apps.FirstOrDefault(appointment => appointment.RecurrenceInfo.Id.ToString().Equals(_SelectedAppointmentFromHomePanelView.RecurrenceId)); - if(appointmentToOpen != null) - { - Scheduler.ShowEditAppointmentForm(appointmentToOpen); - } + //if(appointmentToOpenFormHomePanel != null) + //{ + // Scheduler.ShowEditAppointmentForm(appointmentToOpenFormHomePanel); + //} } _IsComingFromHomeDragPanel = false; @@ -2298,6 +2301,19 @@ namespace BeWo.Scheduler.View } }); } + public void OpenAppointmentFromHomePanel() + { + while (_IsComingFromHomeDragPanel) + { + Thread.Sleep(100); + } + if (appointmentToOpenFormHomePanel != null) + { + Scheduler.ShowEditAppointmentForm(appointmentToOpenFormHomePanel); + + appointmentToOpenFormHomePanel = null; + } + } private void ExportButton_OnClick(object sender, RoutedEventArgs e) { diff --git a/BeWo/View/HomeView.xaml.cs b/BeWo/View/HomeView.xaml.cs index 9664bb995..5455d8a6a 100644 --- a/BeWo/View/HomeView.xaml.cs +++ b/BeWo/View/HomeView.xaml.cs @@ -308,7 +308,8 @@ namespace BeWo.View BeWoApp.LoggedOnUser.HasRight(UserRightType.ViewAll)) && sc2.StartDate.HasValue) { #if DEBUG - MainControl.NavigateTo(new SchedulingMasterView(sc2.StartDate.Value, sc2) { ParentView = this }); + //MainControl.NavigateTo(new SchedulingMasterView(sc2.StartDate.Value, sc2) { ParentView = this }); + MainControl.NavigateTo(new SchedulerMasterView(sc2.StartDate.Value, sc2) { ParentView = this }); #else MainControl.NavigateTo(new SchedulerMasterView(sc2.StartDate.Value, sc2) { ParentView = this }); #endif diff --git a/BeWo/View/Master/SchedulerMasterView.xaml.cs b/BeWo/View/Master/SchedulerMasterView.xaml.cs index e75d08c75..3e88e8be3 100644 --- a/BeWo/View/Master/SchedulerMasterView.xaml.cs +++ b/BeWo/View/Master/SchedulerMasterView.xaml.cs @@ -20,6 +20,8 @@ namespace BeWo.View.Master var scheduler = new NewSchedulerView(pIntervalStartDate, pAppointment); grid_root.Children.Add(scheduler); + + scheduler.OpenAppointmentFromHomePanel(); } } } \ No newline at end of file diff --git a/BeWo/app.config b/BeWo/app.config index 417b2e300..38e11e86f 100644 --- a/BeWo/app.config +++ b/BeWo/app.config @@ -13,17 +13,17 @@ - + - + - + diff --git a/Model/Changes_alle_fuer_neue_db.txt b/Model/Changes_alle_fuer_neue_db.txt index e3d460ee7..d23514ac3 100644 --- a/Model/Changes_alle_fuer_neue_db.txt +++ b/Model/Changes_alle_fuer_neue_db.txt @@ -2088,6 +2088,10 @@ PRIMARY KEY (`Oid`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=latin1; + + +#------------------------------------------------------------------------------------------------------------------------------------------------------------ + ALTER TABLE `aiconversationmessage` CHANGE COLUMN `Message` `Message` LONGTEXT NULL DEFAULT NULL ; @@ -2103,4 +2107,42 @@ DROP FOREIGN KEY `FK_CUSTOMERVERMITTLUNGARBEIT_VERMITTLUNGSGRUNDLAGE`, DROP FOREIGN KEY `FK_CUSTOMERVERMITTLUNGARBEIT_AUFTRAGSHERKUNFT`; ALTER TABLE `customervermittlungarbeit` DROP INDEX `FK_CUSTOMERVERMITTLUNGARBEIT_VERMITTLUNGSGRUNDLAGE` , -DROP INDEX `FK_CUSTOMERVERMITTLUNGARBEIT_AUFTRAGSHERKUNFT` ; \ No newline at end of file +DROP INDEX `FK_CUSTOMERVERMITTLUNGARBEIT_AUFTRAGSHERKUNFT` ; + + +ALTER TABLE `aipromptbausteinroutine` +ADD COLUMN `RoutineType` INT NULL DEFAULT NULL AFTER `ActionType`; + +UPDATE `aipromptbausteinprompt` SET `IsOwnsoftPrompt` = '0' WHERE (`PromptId` IS NULL) AND OID > 0; + +UPDATE `aipromptbausteinprompt` SET `IsOwnsoftPrompt` = '1' WHERE (`PromptId` IS NOT NULL) AND OID > 0; + + +ALTER TABLE `aiconversation` +CHANGE COLUMN `UIContext` `ActionType` INT NULL DEFAULT NULL ; + +UPDATE `aiconversation` +SET ActionType = 1; + + +CREATE TABLE `aipromptbausteinroutine2empfavorite` ( + `AiPromptbausteinRoutineOid` bigint NOT NULL, + `EmployeeOid` bigint NOT NULL, + PRIMARY KEY (`AiPromptbausteinRoutineOid`,`EmployeeOid`), + CONSTRAINT `FK_AIPROMPTBAUSTEINROUTINE2EMPFAV_AIPROMPT` FOREIGN KEY (`AiPromptbausteinRoutineOid`) REFERENCES `aipromptbausteinroutine` (`Oid`), + CONSTRAINT `FK_AIPROMPTBAUSTEINROUTINE2EMPFAV_APPUSER` FOREIGN KEY (`EmployeeOid`) REFERENCES `employee` (`Oid`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +ALTER TABLE `aipromptbausteinroutinestep` +ADD COLUMN `RoutineOid` BIGINT NULL AFTER `PromptReferenceVersion`, +ADD INDEX `FK_AIPROMPTROUTINESTEP_ROUTINE_idx` (`RoutineOid` ASC) VISIBLE; +; +ALTER TABLE `aipromptbausteinroutinestep` +ADD CONSTRAINT `FK_AIPROMPTROUTINESTEP_ROUTINE` + FOREIGN KEY (`RoutineOid`) + REFERENCES `aipromptbausteinroutine` (`Oid`) + ON DELETE CASCADE + ON UPDATE CASCADE; + +ALTER TABLE `aipromptbausteinroutine` +DROP COLUMN `IsFavorite`; \ No newline at end of file diff --git a/Service/Plugins/PluginLoader.cs b/Service/Plugins/PluginLoader.cs index 08f284b11..d284eada3 100644 --- a/Service/Plugins/PluginLoader.cs +++ b/Service/Plugins/PluginLoader.cs @@ -38,7 +38,7 @@ namespace BeWo.Service.Plugins //t = "1352143437"; // Sewo //t = "7107514623"; // BeWo Neuss //t = "9098141768"; // Fib e.V. Marburg - t = "1505148718"; // VSD Hamm + //t = "1505148718"; // VSD Hamm //t = "5926081834"; // Spektrum //t = "1378137009"; // BeWo Direkt //t = "3010479871"; // Aachener Verein @@ -70,7 +70,7 @@ namespace BeWo.Service.Plugins //t = "5351926758"; // Viva a Vida //t = "2215396183"; // Diakonie Remscheid Lennep //t = "5157599087"; // SHG Schwerte - t = "4526293996"; // Fortis + //t = "4526293996"; // Fortis //t = "3647969417"; // Caritas Bottrop //t = "3057313346"; // SSB Mainz //t = "6246287823"; // BeWo Alsdorf @@ -330,7 +330,7 @@ namespace BeWo.Service.Plugins //t = "5065709552"; // Biotop e.V. //t = "9094672461"; // Transkulturelles Betreuungsbüro (Toprak GmbH) //t = "9008813932"; // Aids Hilfe Giessen - t = "4052216789"; // Perspektiven e.V. + //t = "4052216789"; // Perspektiven e.V. //t = "7663765314"; // Christina Frommen (Frommen BeWo) //t = "5462295916"; // BeWo Dellbrueck //t = "2120989920"; // Sozialbüro Schüßler und Wilckens GbR @@ -442,6 +442,7 @@ namespace BeWo.Service.Plugins //t = "9999999999"; // Claude Stundenkontotest //t = "4341679073"; // Caritasverband für den Landkreis Aichach-Friedberg e.V. //t = "1996525562"; // HW Hilfswerk Inklusion und Teilhabe + t = "2348634192"; // Ravensburger Jugendhilfeverein e.V. return t; #else