-
-
Notifications
You must be signed in to change notification settings - Fork 84
RIC-T39 More IC work #435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
RIC-T39 More IC work #435
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
90 changes: 90 additions & 0 deletions
90
Core/Resgrid.Model/IncidentCommand/IncidentCommandSummary.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,90 @@ | ||
| using System; | ||
|
|
||
| namespace Resgrid.Model | ||
| { | ||
| /// <summary> | ||
| /// List-card projection of an incident command for the IC app's incident list: identity, lifecycle timing, | ||
| /// resolved commander name, locations, and active resource counts. Not persisted (composed by the service). | ||
| /// </summary> | ||
| public class IncidentCommandSummary | ||
| { | ||
| public string IncidentCommandId { get; set; } | ||
|
|
||
| public int DepartmentId { get; set; } | ||
|
|
||
| public int CallId { get; set; } | ||
|
|
||
| /// <summary>Commander-supplied incident name; null when unnamed (UIs fall back to the call name).</summary> | ||
| public string Name { get; set; } | ||
|
|
||
| public string CallName { get; set; } | ||
|
|
||
| public string CallNumber { get; set; } | ||
|
|
||
| public string CallAddress { get; set; } | ||
|
|
||
| /// <summary>Maps to <see cref="IncidentCommandStatus"/>.</summary> | ||
| public int Status { get; set; } | ||
|
|
||
| public DateTime EstablishedOn { get; set; } | ||
|
|
||
| public DateTime? ClosedOn { get; set; } | ||
|
|
||
| public string CommanderUserId { get; set; } | ||
|
|
||
| /// <summary>Resolved commander full name (falls back to the user id when the profile is unavailable).</summary> | ||
| public string CommanderName { get; set; } | ||
|
|
||
| public string CommandPostLocationText { get; set; } | ||
|
|
||
| public string CommandPostLatitude { get; set; } | ||
|
|
||
| public string CommandPostLongitude { get; set; } | ||
|
|
||
| /// <summary>Active (unreleased) personnel assignments placed in a lane or staging.</summary> | ||
| public int AssignedPersonnelCount { get; set; } | ||
|
|
||
| /// <summary>Active (unreleased) unit assignments placed in a lane or staging.</summary> | ||
| public int AssignedUnitCount { get; set; } | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Field bag for <c>IIncidentCommandService.UpdateCommandInfoAsync</c>. Null members are left unchanged; | ||
| /// an empty string clears the stored value. Any location whose text is set while its coordinates are | ||
| /// blank is geocoded server-side on save. | ||
| /// </summary> | ||
| public class IncidentCommandInfoUpdate | ||
| { | ||
| public string Name { get; set; } | ||
|
|
||
| /// <summary>Corrected incident start time (UTC); null leaves the original EstablishedOn.</summary> | ||
| public DateTime? EstablishedOn { get; set; } | ||
|
|
||
| public DateTime? EstimatedEndOn { get; set; } | ||
|
|
||
| /// <summary>When true, a null <see cref="EstimatedEndOn"/> clears the stored value instead of leaving it.</summary> | ||
| public bool ClearEstimatedEndOn { get; set; } | ||
|
|
||
| public string ImportantInformation { get; set; } | ||
|
|
||
| public int? IcsLevel { get; set; } | ||
|
|
||
| public string CommandPostLocationText { get; set; } | ||
|
|
||
| public string CommandPostLatitude { get; set; } | ||
|
|
||
| public string CommandPostLongitude { get; set; } | ||
|
|
||
| public string StagingLocationText { get; set; } | ||
|
|
||
| public string StagingLatitude { get; set; } | ||
|
|
||
| public string StagingLongitude { get; set; } | ||
|
|
||
| public string RehabLocationText { get; set; } | ||
|
|
||
| public string RehabLatitude { get; set; } | ||
|
|
||
| public string RehabLongitude { get; set; } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| using System; | ||
| using System.Collections.Generic; | ||
| using System.ComponentModel.DataAnnotations.Schema; | ||
| using Newtonsoft.Json; | ||
|
|
||
| namespace Resgrid.Model | ||
| { | ||
| /// <summary> | ||
| /// A named tactical map for an incident — its own saved framing (center + zoom) and markup | ||
| /// (annotations reference it via <see cref="IncidentMapAnnotation.IncidentMapId"/>), with an optional | ||
| /// expiry. Lanes can attach one via <see cref="CommandStructureNode.LinkedMapId"/>. The incident's | ||
| /// MAIN map lives on <see cref="IncidentCommand"/> itself (MapCenter*/MapZoomLevel, null map id). | ||
| /// </summary> | ||
| public class IncidentMap : IEntity, IChangeTracked | ||
| { | ||
| public string IncidentMapId { get; set; } | ||
|
|
||
| public string IncidentCommandId { get; set; } | ||
|
|
||
| public int DepartmentId { get; set; } | ||
|
|
||
| public int CallId { get; set; } | ||
|
|
||
| public string Name { get; set; } | ||
|
|
||
| public string Description { get; set; } | ||
|
|
||
| public string CenterLatitude { get; set; } | ||
|
|
||
| public string CenterLongitude { get; set; } | ||
|
|
||
| /// <summary>Zoom level (0-22); null until the framing has been pinned.</summary> | ||
| public string ZoomLevel { get; set; } | ||
|
|
||
| /// <summary>Optional expiry after which the map is stale (kept, but flagged in UIs).</summary> | ||
| public DateTime? ExpiresOn { get; set; } | ||
|
|
||
| public string CreatedByUserId { get; set; } | ||
|
|
||
| public DateTime CreatedOn { get; set; } | ||
|
|
||
| public string UpdatedByUserId { get; set; } | ||
|
|
||
| public DateTime? UpdatedOn { get; set; } | ||
|
|
||
| /// <summary>Soft-delete tombstone so removals propagate to offline clients.</summary> | ||
| public DateTime? DeletedOn { get; set; } | ||
|
|
||
| /// <summary>Change cursor for offline delta sync + last-write-wins; stamped on every write.</summary> | ||
| public DateTime? ModifiedOn { get; set; } | ||
|
|
||
| [NotMapped] | ||
| public string TableName => "IncidentMaps"; | ||
|
|
||
| [NotMapped] | ||
| public string IdName => "IncidentMapId"; | ||
|
|
||
| [NotMapped] | ||
| public int IdType => 1; | ||
|
|
||
| [NotMapped] | ||
| [JsonIgnore] | ||
| public object IdValue | ||
| { | ||
| get { return IncidentMapId; } | ||
| set { IncidentMapId = (string)value; } | ||
| } | ||
|
|
||
| [NotMapped] | ||
| public IEnumerable<string> IgnoredProperties => new string[] { "IdValue", "IdType", "TableName", "IdName" }; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mutable collection exposure: the
Mapsproperty publicly exposes a mutableList<IncidentMap>, allowing callers to alter the underlying collection unexpectedly. Expose the collection asIReadOnlyList<IncidentMap>while keeping the internal mutable list for initialization.Kody rule violation: Use IReadOnlyList for immutable collections
Prompt for LLM
Talk to Kody by mentioning @kody
Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.