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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 1 addition & 0 deletions Core/Resgrid.Config/ChatConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ public static class ChatConfig

public static string NovuUnitFcmProviderId = "";
public static string NovuResponderFcmProviderId = "";
public static string NovuDispatchUnitWorkflowId = "unit-dispatch";
}
}
3 changes: 3 additions & 0 deletions Core/Resgrid.Config/TelemetryConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@
public static class TelemetryConfig
{
public static string Exporter = "";

public static string PostHogUrl = "";
public static string PostHogApiKey = "";
}
}
69 changes: 69 additions & 0 deletions Core/Resgrid.Localization/Areas/User/Contacts/Contacts.en.resx
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,12 @@
<data name="CompanyNamePlaceholder" xml:space="preserve">
<value>Organization or Location Name</value>
</data>
<data name="ContactDetails" xml:space="preserve">
<value>Contact Details</value>
</data>
<data name="ContactInformation" xml:space="preserve">
<value>Contact Information</value>
</data>
<data name="ContactsHeader" xml:space="preserve">
<value>Contacts</value>
</data>
Expand Down Expand Up @@ -414,4 +420,67 @@
<data name="WebsitePlaceholder" xml:space="preserve">
<value>Contact website Url</value>
</data>
<data name="AdditionalInfo" xml:space="preserve">
<value>Additional Info</value>
</data>
<data name="CreatedOn" xml:space="preserve">
<value>Created On</value>
</data>
<data name="CreatedBy" xml:space="preserve">
<value>Created By</value>
</data>
<data name="ContactType" xml:space="preserve">
<value>Contact Type</value>
</data>
<data name="MailingAddressHeader" xml:space="preserve">
<value>Mailing Address</value>
</data>
<data name="LocationDetails" xml:space="preserve">
<value>Location Info</value>
</data>
<data name="SocialsInfo" xml:space="preserve">
<value>Socials</value>
</data>
<data name="NoNotesFound" xml:space="preserve">
<value>No Notes have been entered for this Contact</value>
</data>
<data name="AddNewNote" xml:space="preserve">
<value>Add Note</value>
</data>
<data name="NoteTitle" xml:space="preserve">
<value>Note Title</value>
</data>
<data name="NoteContent" xml:space="preserve">
<value>Note Content</value>
</data>
<data name="NoteType" xml:space="preserve">
<value>Note Type</value>
</data>
<data name="ExpiresOn" xml:space="preserve">
<value>Expires On</value>
</data>
<data name="LeaveBlankForNoExpiration" xml:space="preserve">
<value>Leave Expired On blank or empty for no Expiration.</value>
</data>
<data name="ShouldAlert" xml:space="preserve">
<value>Should Note Alert</value>
</data>
<data name="ShouldAlertInfo" xml:space="preserve">
<value>If checked this note will appear when a new call is created for this contact. </value>
</data>
<data name="SaveNote" xml:space="preserve">
<value>Add Note</value>
</data>
<data name="FilterBy" xml:space="preserve">
<value>Filter By</value>
</data>
<data name="LoadingNotes" xml:space="preserve">
<value>Loading Notes</value>
</data>
<data name="SearchNotes" xml:space="preserve">
<value>Search Notes</value>
</data>
<data name="EditContact" xml:space="preserve">
<value>Edit Contact</value>
</data>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -279,4 +279,34 @@
<data name="UnitTypesHeader" xml:space="preserve">
<value>Unit Types</value>
</data>
<data name="ContactNoteTypesHeader" xml:space="preserve">
<value>Contact Note Types</value>
</data>
<data name="NewContactNoteTypesHeader" xml:space="preserve">
<value>Add New Contact Note Type</value>
</data>
<data name="NewContactNoteTypes" xml:space="preserve">
<value>New Contact Note Type</value>
</data>
<data name="ContactNoteTypesName" xml:space="preserve">
<value>Contact Note Type Name</value>
</data>
<data name="DeleteContactNoteTypesWarning" xml:space="preserve">
<value>Are you sure you want to delete the contact note type with the name of?</value>
</data>
<data name="ContactNoteTypeNameLabel" xml:space="preserve">
<value>Contact Note Type Name</value>
</data>
<data name="ContactNoteTypeNameText" xml:space="preserve">
<value>The Name of the Contact Note Type</value>
</data>
<data name="ContactNoteTypeColorLabel" xml:space="preserve">
<value>Contact Note Type Color</value>
</data>
<data name="EditContactNoteTypeHeader" xml:space="preserve">
<value>Edit Contact Note Type</value>
</data>
<data name="NewContactNoteTypeHeader" xml:space="preserve">
<value>New Contact Note Type</value>
</data>
</root>
5 changes: 4 additions & 1 deletion Core/Resgrid.Model/AuditLogTypes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ public enum AuditLogTypes
ContactRemoved,
ContactCategoryAdded,
ContactCategoryEdited,
ContactCategoryRemoved
ContactCategoryRemoved,
ContactNoteTypeAdded,
ContactNoteTypeEdited,
ContactNoteTypeRemoved
}
}
5 changes: 4 additions & 1 deletion Core/Resgrid.Model/ContactNote.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ public class ContactNote : IEntity

public string EditedByUserId { get; set; }

[NotMapped]
public ContactNoteType NoteType { get; set; }

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

Expand All @@ -57,6 +60,6 @@ public object IdValue
}

[NotMapped]
public IEnumerable<string> IgnoredProperties => new string[] { "IdValue", "IdType", "TableName", "IdName" };
public IEnumerable<string> IgnoredProperties => new string[] { "IdValue", "IdType", "TableName", "IdName", "NoteType" };
}
}
1 change: 1 addition & 0 deletions Core/Resgrid.Model/Messages/StandardPushCall.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ public class StandardPushCall
public int ActiveCallCount { get; set; }
public string Color { get; set; }
public int? DepartmentId { get; set; }
public string DepartmentCode { get; set; }
}
}
5 changes: 4 additions & 1 deletion Core/Resgrid.Model/Providers/Models/INovuProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ namespace Resgrid.Model.Providers;
public interface INovuProvider
{
Task<bool> CreateUserSubscriber(string userId, string code, int departmentId, string email, string firstName, string lastName);
Task<bool> CreateUnitSubscriber(int unitId, string code, int departmentId, string unitName);
Task<bool> CreateUnitSubscriber(int unitId, string code, int departmentId, string unitName, string deviceId);
Task<bool> UpdateUserSubscriberFcm(string userId, string code, string token);
Task<bool> UpdateUnitSubscriberFcm(int unitId, string code, string token);

Task<bool> SendUnitDispatch(string title, string body, int unitId, string depCode, string eventCode, string type,
bool enableCustomSounds, int count, string color);

}
8 changes: 8 additions & 0 deletions Core/Resgrid.Model/Repositories/ICallsRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,13 @@ public interface ICallsRepository: IRepository<Call>
/// <param name="departmentId">The department identifier.</param>
/// <returns>Task&lt;IEnumerable&lt;Call&gt;&gt;.</returns>
Task<IEnumerable<Call>> GetAllNonDispatchedScheduledCallsByDepartmentIdAsync(int departmentId);

/// <summary>
/// Gets all calls by department and contact asynchronous.
/// </summary>
/// <param name="contactId">The contact identifier.</param>
/// <param name="departmentId">The department identifier.</param>
/// <returns>Task&lt;IEnumerable&lt;Call&gt;&gt;.</returns>
Task<IEnumerable<Call>> GetAllCallsByContactIdAsync(string contactId, int departmentId);
}
}
2 changes: 1 addition & 1 deletion Core/Resgrid.Model/Repositories/IContactNotesRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ namespace Resgrid.Model.Repositories
/// <seealso cref="Resgrid.Model.Repositories.IRepository{Resgrid.Model.ContactNote}" />
public interface IContactNotesRepository : IRepository<ContactNote>
{

Task<IEnumerable<ContactNote>> GetContactNotesByContactIdAsync(string contactId);
}
}
95 changes: 69 additions & 26 deletions Core/Resgrid.Model/Resgrid.Model.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,75 @@
<Configurations>Debug;Release;Docker</Configurations>
</PropertyGroup>
<ItemGroup>
<EmbeddedResource Include="..\..\Web\Resgrid.WebCore\wwwroot\audio\caf\Emergency_call.caf" Link="Audio\Emergency_call.caf" />
<EmbeddedResource Include="..\..\Web\Resgrid.WebCore\wwwroot\audio\caf\High_call.caf" Link="Audio\High_call.caf" />
<EmbeddedResource Include="..\..\Web\Resgrid.WebCore\wwwroot\audio\caf\Low_call.caf" Link="Audio\Low_call.caf" />
<EmbeddedResource Include="..\..\Web\Resgrid.WebCore\wwwroot\audio\caf\Medium_call.caf" Link="Audio\Medium_call.caf" />
<EmbeddedResource Include="..\..\Web\Resgrid.WebCore\wwwroot\audio\wav\Call_closed.wav" Link="Audio\Call_closed.wav" />
<EmbeddedResource Include="..\..\Web\Resgrid.WebCore\wwwroot\audio\wav\Call_updated.wav" Link="Audio\Call_updated.wav" />
<EmbeddedResource Include="..\..\Web\Resgrid.WebCore\wwwroot\audio\wav\Emergency_call.wav" Link="Audio\Emergency_call.wav" />
<EmbeddedResource Include="..\..\Web\Resgrid.WebCore\wwwroot\audio\wav\High_call.wav" Link="Audio\High_call.wav" />
<EmbeddedResource Include="..\..\Web\Resgrid.WebCore\wwwroot\audio\wav\Low_call.wav" Link="Audio\Low_call.wav" />
<EmbeddedResource Include="..\..\Web\Resgrid.WebCore\wwwroot\audio\wav\Medium_call.wav" Link="Audio\Medium_call.wav" />
<EmbeddedResource Include="..\..\Web\Resgrid.WebCore\wwwroot\audio\wav\New_Call.wav" Link="Audio\New_Call.wav" />
<EmbeddedResource Include="..\..\Web\Resgrid.WebCore\wwwroot\audio\wav\New_Chat.wav" Link="Audio\New_Chat.wav" />
<EmbeddedResource Include="..\..\Web\Resgrid.WebCore\wwwroot\audio\wav\New_Message.wav" Link="Audio\New_Message.wav" />
<EmbeddedResource Include="..\..\Web\Resgrid.WebCore\wwwroot\audio\wav\New_shift.wav" Link="Audio\New_shift.wav" />
<EmbeddedResource Include="..\..\Web\Resgrid.WebCore\wwwroot\audio\wav\New_Training.wav" Link="Audio\New_Training.wav" />
<EmbeddedResource Include="..\..\Web\Resgrid.WebCore\wwwroot\audio\wav\Notification.wav" Link="Audio\Notification.wav" />
<EmbeddedResource Include="..\..\Web\Resgrid.WebCore\wwwroot\audio\wav\Personnel_Staffing_Updated.wav" Link="Audio\Personnel_Staffing_Updated.wav" />
<EmbeddedResource Include="..\..\Web\Resgrid.WebCore\wwwroot\audio\wav\Personnel_Status_Updated.wav" Link="Audio\Personnel_Status_Updated.wav" />
<EmbeddedResource Include="..\..\Web\Resgrid.WebCore\wwwroot\audio\wav\Trouble_Alert_emergency_.wav" Link="Audio\Trouble_Alert_emergency_.wav" />
<EmbeddedResource Include="..\..\Web\Resgrid.WebCore\wwwroot\audio\wav\Unit_Notice.wav" Link="Audio\Unit_Notice.wav" />
<EmbeddedResource Include="..\..\Web\Resgrid.WebCore\wwwroot\audio\wav\Unit_Status_Updated.wav" Link="Audio\Unit_Status_Updated.wav" />
<EmbeddedResource Include="..\..\Web\Resgrid.WebCore\wwwroot\audio\wav\Upcoming_shift.wav" Link="Audio\Upcoming_shift.wav" />
<EmbeddedResource Include="..\..\Web\Resgrid.WebCore\wwwroot\audio\wav\Upcoming_Training.wav" Link="Audio\Upcoming_Training.wav" />
</ItemGroup>
<ItemGroup>
<Folder Include="Audio\" />
<EmbeddedResource Include="..\..\Web\Resgrid.Web\wwwroot\audio\caf\Emergency_call.caf">
<Link>Audio\Emergency_call.caf</Link>
</EmbeddedResource>
<EmbeddedResource Include="..\..\Web\Resgrid.Web\wwwroot\audio\caf\High_call.caf">
<Link>Audio\High_call.caf</Link>
</EmbeddedResource>
<EmbeddedResource Include="..\..\Web\Resgrid.Web\wwwroot\audio\caf\Low_call.caf">
<Link>Audio\Low_call.caf</Link>
</EmbeddedResource>
<EmbeddedResource Include="..\..\Web\Resgrid.Web\wwwroot\audio\caf\Medium_call.caf">
<Link>Audio\Medium_call.caf</Link>
</EmbeddedResource>
<EmbeddedResource Include="..\..\Web\Resgrid.Web\wwwroot\audio\wav\Call_closed.wav">
<Link>Audio\Call_closed.wav</Link>
</EmbeddedResource>
<EmbeddedResource Include="..\..\Web\Resgrid.Web\wwwroot\audio\wav\Call_updated.wav">
<Link>Audio\Call_updated.wav</Link>
</EmbeddedResource>
<EmbeddedResource Include="..\..\Web\Resgrid.Web\wwwroot\audio\wav\Emergency_call.wav">
<Link>Audio\Emergency_call.wav</Link>
</EmbeddedResource>
<EmbeddedResource Include="..\..\Web\Resgrid.Web\wwwroot\audio\wav\High_call.wav">
<Link>Audio\High_call.wav</Link>
</EmbeddedResource>
<EmbeddedResource Include="..\..\Web\Resgrid.Web\wwwroot\audio\wav\Low_call.wav">
<Link>Audio\Low_call.wav</Link>
</EmbeddedResource>
<EmbeddedResource Include="..\..\Web\Resgrid.Web\wwwroot\audio\wav\Medium_call.wav">
<Link>Audio\Medium_call.wav</Link>
</EmbeddedResource>
<EmbeddedResource Include="..\..\Web\Resgrid.Web\wwwroot\audio\wav\New_Call.wav">
<Link>Audio\New_Call.wav</Link>
</EmbeddedResource>
<EmbeddedResource Include="..\..\Web\Resgrid.Web\wwwroot\audio\wav\New_Chat.wav">
<Link>Audio\New_Chat.wav</Link>
</EmbeddedResource>
<EmbeddedResource Include="..\..\Web\Resgrid.Web\wwwroot\audio\wav\New_Message.wav">
<Link>Audio\New_Message.wav</Link>
</EmbeddedResource>
<EmbeddedResource Include="..\..\Web\Resgrid.Web\wwwroot\audio\wav\New_shift.wav">
<Link>Audio\New_shift.wav</Link>
</EmbeddedResource>
<EmbeddedResource Include="..\..\Web\Resgrid.Web\wwwroot\audio\wav\New_Training.wav">
<Link>Audio\New_Training.wav</Link>
</EmbeddedResource>
<EmbeddedResource Include="..\..\Web\Resgrid.Web\wwwroot\audio\wav\Notification.wav">
<Link>Audio\Notification.wav</Link>
</EmbeddedResource>
<EmbeddedResource Include="..\..\Web\Resgrid.Web\wwwroot\audio\wav\Personnel_Staffing_Updated.wav">
<Link>Audio\Personnel_Staffing_Updated.wav</Link>
</EmbeddedResource>
<EmbeddedResource Include="..\..\Web\Resgrid.Web\wwwroot\audio\wav\Personnel_Status_Updated.wav">
<Link>Audio\Personnel_Status_Updated.wav</Link>
</EmbeddedResource>
<EmbeddedResource Include="..\..\Web\Resgrid.Web\wwwroot\audio\wav\Trouble_Alert_emergency_.wav">
<Link>Audio\Trouble_Alert_emergency_.wav</Link>
</EmbeddedResource>
<EmbeddedResource Include="..\..\Web\Resgrid.Web\wwwroot\audio\wav\Unit_Notice.wav">
<Link>Audio\Unit_Notice.wav</Link>
</EmbeddedResource>
<EmbeddedResource Include="..\..\Web\Resgrid.Web\wwwroot\audio\wav\Unit_Status_Updated.wav">
<Link>Audio\Unit_Status_Updated.wav</Link>
</EmbeddedResource>
<EmbeddedResource Include="..\..\Web\Resgrid.Web\wwwroot\audio\wav\Upcoming_shift.wav">
<Link>Audio\Upcoming_shift.wav</Link>
</EmbeddedResource>
<EmbeddedResource Include="..\..\Web\Resgrid.Web\wwwroot\audio\wav\Upcoming_Training.wav">
<Link>Audio\Upcoming_Training.wav</Link>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="..\..\Common\Resgrid-PubPriv-KeyFile.snk" Link="Resgrid-PubPriv-KeyFile.snk" />
Expand Down
8 changes: 8 additions & 0 deletions Core/Resgrid.Model/Services/IAuthorizationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -318,5 +318,13 @@ public interface IAuthorizationService
Task<bool> CanUserViewUnitLocationViaMatrixAsync(int unitToView, string userId, int departmentId);

Task<bool> CanUserViewAllPeopleAsync(string userId, int departmentId);

Task<bool> CanUserDeleteContactNoteTypeAsync(string userId, string contactNoteTypeId);

Task<bool> CanUserEditContactNoteTypeAsync(string userId, string contactNoteTypeId);

Task<bool> CanUserDeleteContactAsync(string userId, int departmentId);

Task<bool> CanUserAddOrEditContactAsync(string userId, int departmentId);
}
}
2 changes: 2 additions & 0 deletions Core/Resgrid.Model/Services/ICallsService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -408,5 +408,7 @@ Task<bool> ClearGroupForDispatchesAsync(int departmentGroupId,
Task<List<CallReference>> GetChildCallsForCallAsync(int callId);

Task<bool> DeleteCallReferenceAsync(CallReference callReference, CancellationToken cancellationToken = default(CancellationToken));

Task<List<Call>> GetCallsByContactIdAsync(string contactId, int departmentId);
}
}
13 changes: 13 additions & 0 deletions Core/Resgrid.Model/Services/IContactsService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

namespace Resgrid.Model.Services
{
/// <summary>
/// Interface for managing contacts, contact categories, contact notes and contact note types within a department.
/// Provides methods for CRUD operations and retrieval of contact-related data.
/// </summary>
public interface IContactsService
{
Task<List<Contact>> GetAllContactsForDepartmentAsync(int departmentId);
Expand All @@ -13,5 +17,14 @@ public interface IContactsService
Task<ContactCategory> SaveContactCategoryAsync(ContactCategory category, CancellationToken cancellationToken = default(CancellationToken));
Task<ContactCategory> GetContactCategoryByIdAsync(string contactCategoryId);
Task<bool> DeleteContactCategoryAsync(ContactCategory contactCategory, CancellationToken cancellationToken = default(CancellationToken));
Task<Contact> GetContactByIdAsync(string contactId);
Task<List<ContactNote>> GetContactNotesByContactIdAsync(string contactId, int departmentId, bool getDeleted = false);
Task<List<ContactNoteType>> GetContactNoteTypesByDepartmentIdAsync(int departmentId);
Task<ContactNoteType> SaveContactNoteTypeAsync(ContactNoteType type, CancellationToken cancellationToken = default(CancellationToken));
Task<ContactNoteType> GetContactNoteTypeByIdAsync(string contactNoteTypeId);
Task<bool> DoesContactNoteTypeAlreadyExistAsync(int departmentId, string noteTypeText);
Task<bool> DeleteContactNoteTypeAsync(ContactNoteType type, CancellationToken cancellationToken = default(CancellationToken));
Task<ContactNote> SaveContactNoteAsync(ContactNote note, CancellationToken cancellationToken = default(CancellationToken));
Task<bool> DeleteContactAsync(string contactId, string userId, int departmentId, string ipAddress, string userAgent, CancellationToken cancellationToken = default(CancellationToken));
}
}
Loading
Loading