diff --git a/src/OutlookAddin.Core/Services/MatchingService.cs b/src/OutlookAddin.Core/Services/MatchingService.cs index 190f28c..37aa8d7 100644 --- a/src/OutlookAddin.Core/Services/MatchingService.cs +++ b/src/OutlookAddin.Core/Services/MatchingService.cs @@ -75,7 +75,11 @@ namespace MarcusLaw.OutlookAddin.Core.Services var cases = new System.Collections.Generic.List(); try { - var list = await _client.ListCasesForContactAsync(contact.Id, 5, cancellationToken).ConfigureAwait(false); + // Pull up to 50 cases per contact so the sidebar can show the + // whole list, not just the 5 most recent. 50 is well below the + // EspoCRM default page limit and large enough for any realistic + // attorney/contact relationship. + var list = await _client.ListCasesForContactAsync(contact.Id, 50, cancellationToken).ConfigureAwait(false); cases.AddRange(list.List); } catch (Exception ex) diff --git a/src/OutlookAddin.UI/Converters/EntityTypeToHebrewConverter.cs b/src/OutlookAddin.UI/Converters/EntityTypeToHebrewConverter.cs index 3df04e6..dafff31 100644 --- a/src/OutlookAddin.UI/Converters/EntityTypeToHebrewConverter.cs +++ b/src/OutlookAddin.UI/Converters/EntityTypeToHebrewConverter.cs @@ -71,6 +71,45 @@ namespace MarcusLaw.OutlookAddin.UI.Converters } } + /// + /// Maps EspoCRM Case status values (English) to Hebrew labels. Unknown + /// values pass through unchanged so installs with custom statuses + /// still render correctly. + /// + public sealed class CaseStatusToHebrewConverter : IValueConverter + { + private static readonly Dictionary Map = + new Dictionary(StringComparer.OrdinalIgnoreCase) + { + ["New"] = "חדש", + ["Assigned"] = "הוקצה", + ["Pending"] = "ממתין", + ["In Progress"] = "בטיפול", + ["InProgress"] = "בטיפול", + ["Open"] = "פתוח", + ["Closed"] = "סגור", + ["Closed Lost"] = "סגור — אבד", + ["Closed Won"] = "סגור — נצח", + ["Rejected"] = "נדחה", + ["Duplicate"] = "כפילות", + ["On Hold"] = "מושהה", + ["OnHold"] = "מושהה", + ["Resolved"] = "טופל", + ["Cancelled"] = "בוטל", + ["Canceled"] = "בוטל" + }; + + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + var s = value as string; + if (string.IsNullOrWhiteSpace(s)) return string.Empty; + return Map.TryGetValue(s!, out var hebrew) ? hebrew : s!; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + => throw new NotSupportedException(); + } + /// /// Returns a small emoji marker per entity type to use next to the /// Hebrew label in group headers. diff --git a/src/OutlookAddin.UI/Views/ReadingPaneView.xaml b/src/OutlookAddin.UI/Views/ReadingPaneView.xaml index 0ee3904..075304d 100644 --- a/src/OutlookAddin.UI/Views/ReadingPaneView.xaml +++ b/src/OutlookAddin.UI/Views/ReadingPaneView.xaml @@ -1,11 +1,13 @@ + @@ -75,7 +77,7 @@ - + @@ -85,7 +87,8 @@ - +