feat(backend): add communication, tester, admin and middleman modules

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).
This commit is contained in:
Rafał Tyński
2026-10-04 03:49:45 +02:00
parent f4f3b3896a
commit fa1199539b
136 changed files with 2338 additions and 574 deletions
@@ -55,6 +55,30 @@ public sealed class GrantCallService : IGrantCallService
return rows.Count > 0 ? Map(rows[0]) : null;
}
public async Task<GrantCallResponse?> UpdateStatusAsync(
string grantCallId,
string status,
CancellationToken cancellationToken)
{
var (table, id) = SurrealRecordId.Split(grantCallId);
var response = await _client.RawQuery(
"UPDATE type::record($table, $id) SET status = $status; " +
$"SELECT {SelectFields} FROM type::record($table, $id) LIMIT 1;",
new Dictionary<string, object?>
{
["table"] = table,
["id"] = id,
["status"] = status,
},
cancellationToken);
response.EnsureAllOks();
var rows = response.GetValue<List<GrantCallRow>>(1) ?? [];
return rows.Count > 0 ? Map(rows[0]) : null;
}
private static GrantCallResponse Map(GrantCallRow row) => new(
row.Id,
row.Name,