Implement step 17 modules: threads/messages, notifications with automation (submission.created, idea.created, grant_call.opened), innovation test feedback, admin panel (submissions, verify, metrics, grant call status), Middleman adaptation and partnerships. Split multi-type files into one type per file and replace object-valued dictionaries with string-valued maps in data contracts (migrations 0006/0007).
23 lines
658 B
C#
23 lines
658 B
C#
using TarninaHub.Domain.Enums;
|
|
|
|
namespace TarninaHub.Application.Mappings;
|
|
|
|
public static class PartnershipStatusWire
|
|
{
|
|
public static string ToWire(this PartnershipStatus status) => status switch
|
|
{
|
|
PartnershipStatus.Proposed => "proposed",
|
|
PartnershipStatus.Active => "active",
|
|
PartnershipStatus.Closed => "closed",
|
|
_ => "proposed",
|
|
};
|
|
|
|
public static PartnershipStatus? Parse(string? value) => value?.Trim().ToLowerInvariant() switch
|
|
{
|
|
"proposed" => PartnershipStatus.Proposed,
|
|
"active" => PartnershipStatus.Active,
|
|
"closed" => PartnershipStatus.Closed,
|
|
_ => null,
|
|
};
|
|
}
|