Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -271,3 +271,4 @@ Web/Resgrid.WebCore/wwwroot/js/ng/styles.css
Web/Resgrid.WebCore/wwwroot/js/ng/*
Web/Resgrid.WebCore/wwwroot/lib/*
/Web/Resgrid.Web/wwwroot/lib
.dual-graph/
16 changes: 15 additions & 1 deletion Core/Resgrid.Model/AuditLogTypes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,20 @@ public enum AuditLogTypes
UdfFieldAdded,
UdfFieldUpdated,
UdfFieldRemoved,
UdfFieldValueSaved
UdfFieldValueSaved,
// Route Planning
RouteCreated,
RouteUpdated,
RouteDeleted,
RouteStarted,
RouteCompleted,
RouteCancelled,
RoutePaused,
RouteResumed,
RouteStopCheckedIn,
RouteStopCheckedOut,
RouteStopSkipped,
RouteDeviationDetected,
RouteDeviationAcknowledged
}
}
4 changes: 4 additions & 0 deletions Core/Resgrid.Model/Call.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ public class Call : IEntity

public DateTime? DeletedOn { get; set; }

public string IndoorMapZoneId { get; set; }

public string IndoorMapFloorId { get; set; }

[NotMapped]
[JsonIgnore]
public object IdValue
Expand Down
48 changes: 48 additions & 0 deletions Core/Resgrid.Model/CustomMapImport.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;

namespace Resgrid.Model
{
public class CustomMapImport : IEntity
{
public string CustomMapImportId { get; set; }

public string CustomMapId { get; set; }

public string CustomMapLayerId { get; set; }

public string SourceFileName { get; set; }

public int SourceFileType { get; set; }

public int Status { get; set; }

public string ErrorMessage { get; set; }

public string ImportedById { get; set; }

public DateTime ImportedOn { get; set; }

[NotMapped]
public string TableName => "CustomMapImports";

[NotMapped]
public string IdName => "CustomMapImportId";

[NotMapped]
public int IdType => 1;

[NotMapped]
[JsonIgnore]
public object IdValue
{
get { return CustomMapImportId; }
set { CustomMapImportId = (string)value; }
}

[NotMapped]
public IEnumerable<string> IgnoredProperties => new string[] { "IdValue", "IdType", "TableName", "IdName" };
}
}
12 changes: 12 additions & 0 deletions Core/Resgrid.Model/CustomMapImportFileType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
namespace Resgrid.Model
{
public enum CustomMapImportFileType
{
GeoJSON = 0,
Shapefile = 1,
KML = 2,
KMZ = 3,
WMS = 4,
WFS = 5
}
}
10 changes: 10 additions & 0 deletions Core/Resgrid.Model/CustomMapImportStatus.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace Resgrid.Model
{
public enum CustomMapImportStatus
{
Pending = 0,
Processing = 1,
Complete = 2,
Failed = 3
}
}
10 changes: 10 additions & 0 deletions Core/Resgrid.Model/CustomMapLayerType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace Resgrid.Model
{
public enum CustomMapLayerType
{
FloorPlan = 0,
Overlay = 1,
DataLayer = 2,
Infrastructure = 3
}
}
46 changes: 46 additions & 0 deletions Core/Resgrid.Model/CustomMapTile.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;

namespace Resgrid.Model
{
public class CustomMapTile : IEntity
{
public string CustomMapTileId { get; set; }

public string CustomMapLayerId { get; set; }

public int ZoomLevel { get; set; }

public int TileX { get; set; }

public int TileY { get; set; }

public byte[] TileData { get; set; }

public string TileContentType { get; set; }

public DateTime AddedOn { get; set; }

[NotMapped]
public string TableName => "CustomMapTiles";

[NotMapped]
public string IdName => "CustomMapTileId";

[NotMapped]
public int IdType => 1;

[NotMapped]
[JsonIgnore]
public object IdValue
{
get { return CustomMapTileId; }
set { CustomMapTileId = (string)value; }
}

[NotMapped]
public IEnumerable<string> IgnoredProperties => new string[] { "IdValue", "IdType", "TableName", "IdName" };
}
}
10 changes: 10 additions & 0 deletions Core/Resgrid.Model/CustomMapType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace Resgrid.Model
{
public enum CustomMapType
{
Indoor = 0,
Outdoor = 1,
Event = 2,
Custom = 3
}
}
8 changes: 4 additions & 4 deletions Core/Resgrid.Model/DepartmentNotification.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public string TranslateBefore(List<CustomState> customStates = null)
break;
case EventTypes.PersonnelStatusChanged:
if (string.IsNullOrWhiteSpace(BeforeData))
return "None";
return "Any";
if (BeforeData == "-1")
return "Any";
else
Expand Down Expand Up @@ -209,7 +209,7 @@ public string TranslateCurrent(List<CustomState> customStates = null)
{
case EventTypes.UnitStatusChanged:
if (string.IsNullOrWhiteSpace(CurrentData))
return "None";
return "Any";
if (CurrentData == "-1")
return "Any";
else
Expand Down Expand Up @@ -238,7 +238,7 @@ public string TranslateCurrent(List<CustomState> customStates = null)
break;
case EventTypes.PersonnelStaffingChanged:
if (string.IsNullOrWhiteSpace(CurrentData))
return "None";
return "Any";
if (CurrentData == "-1")
return "Any";
else
Expand Down Expand Up @@ -267,7 +267,7 @@ public string TranslateCurrent(List<CustomState> customStates = null)
break;
case EventTypes.PersonnelStatusChanged:
if (string.IsNullOrWhiteSpace(CurrentData))
return "None";
return "Any";
if (CurrentData == "-1")
return "Any";
else
Expand Down
70 changes: 70 additions & 0 deletions Core/Resgrid.Model/IndoorMap.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;

namespace Resgrid.Model
{
public class IndoorMap : IEntity
{
public string IndoorMapId { get; set; }

public int DepartmentId { get; set; }

public string Name { get; set; }

public string Description { get; set; }

public decimal CenterLatitude { get; set; }

public decimal CenterLongitude { get; set; }

public decimal BoundsNELat { get; set; }

public decimal BoundsNELon { get; set; }

public decimal BoundsSWLat { get; set; }

public decimal BoundsSWLon { get; set; }

public string DefaultFloorId { get; set; }

public bool IsDeleted { get; set; }

public string AddedById { get; set; }

public DateTime AddedOn { get; set; }

public string UpdatedById { get; set; }

public DateTime? UpdatedOn { get; set; }

public int MapType { get; set; }

public string BoundsGeoJson { get; set; }

public byte[] ThumbnailData { get; set; }

public string ThumbnailContentType { get; set; }

[NotMapped]
public string TableName => "IndoorMaps";

[NotMapped]
public string IdName => "IndoorMapId";

[NotMapped]
public int IdType => 1;

[NotMapped]
[JsonIgnore]
public object IdValue
{
get { return IndoorMapId; }
set { IndoorMapId = (string)value; }
}

[NotMapped]
public IEnumerable<string> IgnoredProperties => new string[] { "IdValue", "IdType", "TableName", "IdName" };
}
}
68 changes: 68 additions & 0 deletions Core/Resgrid.Model/IndoorMapFloor.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;

namespace Resgrid.Model
{
public class IndoorMapFloor : IEntity
{
public string IndoorMapFloorId { get; set; }

public string IndoorMapId { get; set; }

public string Name { get; set; }

public int FloorOrder { get; set; }

public byte[] ImageData { get; set; }

public string ImageContentType { get; set; }

public decimal? BoundsNELat { get; set; }

public decimal? BoundsNELon { get; set; }

public decimal? BoundsSWLat { get; set; }

public decimal? BoundsSWLon { get; set; }

public decimal Opacity { get; set; }

public int LayerType { get; set; }

public bool IsTiled { get; set; }

public int? TileMinZoom { get; set; }

public int? TileMaxZoom { get; set; }

public long? SourceFileSize { get; set; }

public string GeoJsonData { get; set; }

public bool IsDeleted { get; set; }

public DateTime AddedOn { get; set; }

[NotMapped]
public string TableName => "IndoorMapFloors";

[NotMapped]
public string IdName => "IndoorMapFloorId";

[NotMapped]
public int IdType => 1;

[NotMapped]
[JsonIgnore]
public object IdValue
{
get { return IndoorMapFloorId; }
set { IndoorMapFloorId = (string)value; }
}

[NotMapped]
public IEnumerable<string> IgnoredProperties => new string[] { "IdValue", "IdType", "TableName", "IdName" };
}
}
Loading
Loading