b6624a924f
Replace the single-line ListBox with a DataGrid (case number, name,
court case number, status) so users disambiguate same-named cases
(e.g. two "שלומוב זויה" cases). Hydrates each search hit via
GET /Case/{id}?select=id,name,number,status,cCourtCaseNumber in
parallel so columns populate without an extra click. CourtCaseNumber
is mapped to the EspoCRM custom field cCourtCaseNumber.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
50 lines
1.8 KiB
C#
50 lines
1.8 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text.Json.Serialization;
|
|
using MarcusLaw.OutlookAddin.Core.Json;
|
|
|
|
namespace MarcusLaw.OutlookAddin.Core.Models
|
|
{
|
|
public sealed class CaseEntity
|
|
{
|
|
[JsonPropertyName("id")]
|
|
public string Id { get; set; } = string.Empty;
|
|
|
|
[JsonPropertyName("name")]
|
|
public string? Name { get; set; }
|
|
|
|
// EspoCRM serializes the case number as a JSON number on some
|
|
// installs (auto-increment column) and as a string on others
|
|
// (custom case-code formatter). Accept both.
|
|
[JsonPropertyName("number")]
|
|
[JsonConverter(typeof(FlexibleStringConverter))]
|
|
public string? Number { get; set; }
|
|
|
|
[JsonPropertyName("status")]
|
|
public string? Status { get; set; }
|
|
|
|
// Marcus-Law custom field on Case — court file/docket number.
|
|
// Field name guessed from EspoCRM "c-prefixed PascalCase" convention;
|
|
// adjust if the admin used a different name.
|
|
[JsonPropertyName("cCourtCaseNumber")]
|
|
[JsonConverter(typeof(FlexibleStringConverter))]
|
|
public string? CourtCaseNumber { get; set; }
|
|
|
|
[JsonPropertyName("accountId")]
|
|
public string? AccountId { get; set; }
|
|
|
|
[JsonPropertyName("contactsIds")]
|
|
public List<string> ContactsIds { get; set; } = new List<string>();
|
|
|
|
[JsonPropertyName("createdAt")]
|
|
public DateTimeOffset? CreatedAt { get; set; }
|
|
|
|
// Set by Marcus-Law's NetworkStorageIntegration hook on first
|
|
// Document save. Empty until a document has been written through
|
|
// EspoCRM. When empty we compute it client-side from number +
|
|
// primary contact name.
|
|
[JsonPropertyName("networkStorageFolderPath")]
|
|
public string? NetworkStorageFolderPath { get; set; }
|
|
}
|
|
}
|