From 9b601d88fb0d41442be6905d8369a2eea86c60a3 Mon Sep 17 00:00:00 2001 From: Shawn Jackson Date: Sun, 17 Aug 2025 11:26:35 -0700 Subject: [PATCH 1/4] CU-868f7n1u3 Adding in generic system level config for --- Core/Resgrid.Config/InfoConfig.cs | 38 +- Core/Resgrid.Config/SystemBehaviorConfig.cs | 5 + .../Controllers/v4/ConfigController.cs | 17 + .../v4/Configs/GetSystemConfigResult.cs | 40 + .../Resgrid.Web.Services.xml | 1095 +++++++++-------- Web/Resgrid.Web/wwwroot/js/ng/vendor.js | 262 ++-- 6 files changed, 793 insertions(+), 664 deletions(-) create mode 100644 Web/Resgrid.Web.Services/Models/v4/Configs/GetSystemConfigResult.cs diff --git a/Core/Resgrid.Config/InfoConfig.cs b/Core/Resgrid.Config/InfoConfig.cs index b5d2535a..72db87d8 100644 --- a/Core/Resgrid.Config/InfoConfig.cs +++ b/Core/Resgrid.Config/InfoConfig.cs @@ -1,4 +1,6 @@ -namespace Resgrid.Config +using System.Collections.Generic; + +namespace Resgrid.Config { public static class InfoConfig { @@ -21,5 +23,39 @@ public static class InfoConfig public static string RelayAppKey = "RelayAppKey"; public static string EmailProcessorKey = "EmailProcessorKey"; + + public static List Locations = new List() + { + new ResgridSystemLocation() + { + Name = "US-West", + DisplayName = "Resgrid North America", + LocationInfo = + "This is the Resgrid system hosted in the Western United States (private datacenter). This system services most Resgrid customers.", + IsDefault = true, + ApiUrl = "https://api.resgrid.com", + AllowsFreeAccounts = true + }, + new ResgridSystemLocation() + { + Name = "EU-Central", + DisplayName = "Resgrid Europe", + LocationInfo = + "This is the Resgrid system hosted in Central Europe (on OVH). This system services Resgrid customers in the European Union to help with data compliance requirements.", + IsDefault = false, + ApiUrl = "https://api.eu.resgrid.com", + AllowsFreeAccounts = false + } + }; + } + + public class ResgridSystemLocation + { + public string Name { get; set; } + public string DisplayName { get; set; } + public string LocationInfo { get; set; } + public bool IsDefault { get; set; } + public string ApiUrl { get; set; } + public bool AllowsFreeAccounts { get; set; } } } diff --git a/Core/Resgrid.Config/SystemBehaviorConfig.cs b/Core/Resgrid.Config/SystemBehaviorConfig.cs index 4617a35f..24e75cd1 100644 --- a/Core/Resgrid.Config/SystemBehaviorConfig.cs +++ b/Core/Resgrid.Config/SystemBehaviorConfig.cs @@ -185,6 +185,11 @@ public static class SystemBehaviorConfig /// public static string BlogUrl = "https://blog.resgrid.com"; + /// + /// Sets the name of the location this Resgrid system is running in + /// + public static string LocationName = "US-West"; + public static string GetEnvPrefix() { switch (Environment) diff --git a/Web/Resgrid.Web.Services/Controllers/v4/ConfigController.cs b/Web/Resgrid.Web.Services/Controllers/v4/ConfigController.cs index 9ace215d..dd281646 100644 --- a/Web/Resgrid.Web.Services/Controllers/v4/ConfigController.cs +++ b/Web/Resgrid.Web.Services/Controllers/v4/ConfigController.cs @@ -24,6 +24,23 @@ public ConfigController() } #endregion Members and Constructors + /// + /// Gets the system config + /// + /// + [HttpGet("GetSystemConfig")] + [ProducesResponseType(StatusCodes.Status200OK)] + public async Task> GetSystemConfig() + { + var result = new GetSystemConfigResult(); + + result.PageSize = 1; + result.Status = ResponseHelper.Success; + ResponseHelper.PopulateV4ResponseData(result); + + return result; + } + /// /// Gets the config values for a key /// diff --git a/Web/Resgrid.Web.Services/Models/v4/Configs/GetSystemConfigResult.cs b/Web/Resgrid.Web.Services/Models/v4/Configs/GetSystemConfigResult.cs new file mode 100644 index 00000000..126edadb --- /dev/null +++ b/Web/Resgrid.Web.Services/Models/v4/Configs/GetSystemConfigResult.cs @@ -0,0 +1,40 @@ +using System.Collections.Generic; +using Resgrid.Config; + +namespace Resgrid.Web.Services.Models.v4.Configs +{ + /// + /// Gets Configuration Information for the Resgrid System + /// + public class GetSystemConfigResult : StandardApiResponseV4Base + { + /// + /// Response Data + /// + public GetSystemConfigResultData Data { get; set; } + + /// + /// Default constructor + /// + public GetSystemConfigResult() + { + Data = new GetSystemConfigResultData(); + } + } + + /// + /// Information about the Resgrid System + /// + public class GetSystemConfigResultData + { + /// + /// Resgrid Datacenter Locations + /// + public List Locations { get; set; } + + public GetSystemConfigResultData() + { + Locations = InfoConfig.Locations; + } + } +} diff --git a/Web/Resgrid.Web.Services/Resgrid.Web.Services.xml b/Web/Resgrid.Web.Services/Resgrid.Web.Services.xml index 3ffa17a0..a8f76899 100644 --- a/Web/Resgrid.Web.Services/Resgrid.Web.Services.xml +++ b/Web/Resgrid.Web.Services/Resgrid.Web.Services.xml @@ -2425,6 +2425,52 @@ Is the user a group admin + + + UserId (GUID/UUID) of the User to set. This field will be ignored if the input is used on a + function that is setting status for the current user. + + + + + The state/staffing level of the user to set for the user. + + + + + Note for the staffing level + + + + + The result object for a state/staffing level request. + + + + + The UserId GUID/UUID for the user state/staffing level being return + + + + + The full name of the user for the state/staffing level being returned + + + + + The current staffing level (state) type for the user + + + + + The timestamp of the last state/staffing level. This is converted UTC to the departments, or users, TimeZone. + + + + + Staffing note for the User's staffing + + Input data to add a staffing schedule in the Resgrid system @@ -2530,52 +2576,6 @@ Note for this staffing schedule - - - UserId (GUID/UUID) of the User to set. This field will be ignored if the input is used on a - function that is setting status for the current user. - - - - - The state/staffing level of the user to set for the user. - - - - - Note for the staffing level - - - - - The result object for a state/staffing level request. - - - - - The UserId GUID/UUID for the user state/staffing level being return - - - - - The full name of the user for the state/staffing level being returned - - - - - The current staffing level (state) type for the user - - - - - The timestamp of the last state/staffing level. This is converted UTC to the departments, or users, TimeZone. - - - - - Staffing note for the User's staffing - - A resrouce in the system this could be a user or unit @@ -3349,6 +3349,12 @@ Generic configuration api endpoints + + + Gets the system config + + + Gets the config values for a key @@ -5540,6 +5546,31 @@ Analytics Host + + + Gets Configuration Information for the Resgrid System + + + + + Response Data + + + + + Default constructor + + + + + Information about the Resgrid System + + + + + Resgrid Datacenter Locations + + Gets the notes for a contact @@ -6535,184 +6566,349 @@ Identifier of the new npte - + - A GPS location for a point in time of a specificed person + The result of getting all personnel filters for the system - + - PersonId of the person that the location is for + The Id value of the filter - + - The timestamp of the location in UTC + The type of the filter - + - GPS Latitude of the Person + The filters name - + - GPS Longitude of the Person + Result containing all the data required to populate the New Call form - + - GPS Latitude\Longitude Accuracy of the Person + Response Data - + - GPS Altitude of the Person + Result that contains all the options available to filter personnel against compatible Resgrid APIs - + - GPS Altitude Accuracy of the Person + Response Data - + - GPS Speed of the Person + Result containing all the data required to populate the New Call form - + - GPS Heading of the Person + Response Data - + - A unit location in the Resgrid system + Information about a User - + - Response Data + The UserId GUID/UUID for the user - + - The information about a specific unit's location + DepartmentId of the deparment the user belongs to - + - Id of the Person + Department specificed ID number for this user - + - The Timestamp for the location in UTC + The Users First Name - + - GPS Latitude of the Person + The Users Last Name - + - GPS Longitude of the Person + The Users Email Address - + - GPS Latitude\Longitude Accuracy of the Person + The Users Mobile Telephone Number - + - GPS Altitude of the Person + GroupId the user is assigned to (0 for no group) - + - GPS Altitude Accuracy of the Person + Name of the group the user is assigned to - + - GPS Speed of the Person + Enumeration/List of roles the user currently holds - + - GPS Heading of the Person + The current action/status type for the user - + - The result of getting the current staffing for a user + The current action/status string for the user - + - Response Data + The current action/status color hex string for the user - + - Information about a User staffing + The timestamp of the last action. This is converted UTC to the departments, or users, TimeZone. - + - The UserId GUID/UUID for the user status being return + The current action/status destination id for the user - + - DepartmentId of the deparment the user belongs to + The current action/status destination name for the user - + - The current staffing type for the user + The current staffing level (state) type for the user - + - The timestamp of the last staffing. This is converted UTC version of the timestamp. + The current staffing level (state) string for the user - + - The timestamp of the last staffing. This is converted UTC to the departments, or users, TimeZone. + The current staffing level (state) color hex string for the user - + - Note for this staffing + The timestamp of the last state/staffing level. This is converted UTC to the departments, or users, TimeZone. - + - Saves (sets) and Personnel Staffing in the system, for a single user + Users last known location - + - UnitId of the apparatus that the state is being set for + Sorting weight for the user - + - The UnitStateType of the Unit + A GPS location for a point in time of a specificed person - + - The timestamp of the status event in UTC + PersonId of the person that the location is for - + - The timestamp of the status event in the local time of the device + The timestamp of the location in UTC + + + + + GPS Latitude of the Person + + + + + GPS Longitude of the Person + + + + + GPS Latitude\Longitude Accuracy of the Person + + + + + GPS Altitude of the Person + + + + + GPS Altitude Accuracy of the Person + + + + + GPS Speed of the Person + + + + + GPS Heading of the Person + + + + + A unit location in the Resgrid system + + + + + Response Data + + + + + The information about a specific unit's location + + + + + Id of the Person + + + + + The Timestamp for the location in UTC + + + + + GPS Latitude of the Person + + + + + GPS Longitude of the Person + + + + + GPS Latitude\Longitude Accuracy of the Person + + + + + GPS Altitude of the Person + + + + + GPS Altitude Accuracy of the Person + + + + + GPS Speed of the Person + + + + + GPS Heading of the Person + + + + + The result of getting the current staffing for a user + + + + + Response Data + + + + + Information about a User staffing + + + + + The UserId GUID/UUID for the user status being return + + + + + DepartmentId of the deparment the user belongs to + + + + + The current staffing type for the user + + + + + The timestamp of the last staffing. This is converted UTC version of the timestamp. + + + + + The timestamp of the last staffing. This is converted UTC to the departments, or users, TimeZone. + + + + + Note for this staffing + + + + + Saves (sets) and Personnel Staffing in the system, for a single user + + + + + UnitId of the apparatus that the state is being set for + + + + + The UnitStateType of the Unit + + + + + The timestamp of the status event in UTC + + + + + The timestamp of the status event in the local time of the device @@ -7010,282 +7206,117 @@ Response Data - + - The result of getting all personnel filters for the system + Result containing all the data required to populate the New Call form - + - The Id value of the filter + Response Data - + - The type of the filter + Details of a protocol - + - The filters name + Protocol id - + - Result containing all the data required to populate the New Call form + Department id - + - Response Data + Name of the Protocol - + - Result that contains all the options available to filter personnel against compatible Resgrid APIs + Protocol code - + - Response Data + This this protocol disabled - + - Result containing all the data required to populate the New Call form + Protocol description - + - Response Data + Text of the protocol - + - Information about a User + UTC date and time when the Protocol was created - + - The UserId GUID/UUID for the user + UserId of the user who created the protocol - + - DepartmentId of the deparment the user belongs to + UTC timestamp of when the Protocol was updated - + - Department specificed ID number for this user + Minimum triggering Weight of the Protocol - + - The Users First Name + UserId that last updated the Protocol - + - The Users Last Name + Triggers used to activate this Protocol - + - The Users Email Address + Attachments for this Protocol - + - The Users Mobile Telephone Number + Questions used to determine if this Protocol needs to be used or not - + - GroupId the user is assigned to (0 for no group) + State type - + - Name of the group the user is assigned to + Result containing all the data required to populate the New Call form - + - Enumeration/List of roles the user currently holds + Response Data - + - The current action/status type for the user + A role in the Resgrid system - - - The current action/status string for the user - - - - - The current action/status color hex string for the user - - - - - The timestamp of the last action. This is converted UTC to the departments, or users, TimeZone. - - - - - The current action/status destination id for the user - - - - - The current action/status destination name for the user - - - - - The current staffing level (state) type for the user - - - - - The current staffing level (state) string for the user - - - - - The current staffing level (state) color hex string for the user - - - - - The timestamp of the last state/staffing level. This is converted UTC to the departments, or users, TimeZone. - - - - - Users last known location - - - - - Sorting weight for the user - - - - - Result containing all the data required to populate the New Call form - - - - - Response Data - - - - - Details of a protocol - - - - - Protocol id - - - - - Department id - - - - - Name of the Protocol - - - - - Protocol code - - - - - This this protocol disabled - - - - - Protocol description - - - - - Text of the protocol - - - - - UTC date and time when the Protocol was created - - - - - UserId of the user who created the protocol - - - - - UTC timestamp of when the Protocol was updated - - - - - Minimum triggering Weight of the Protocol - - - - - UserId that last updated the Protocol - - - - - Triggers used to activate this Protocol - - - - - Attachments for this Protocol - - - - - Questions used to determine if this Protocol needs to be used or not - - - - - State type - - - - - Result containing all the data required to populate the New Call form - - - - - Response Data - - - - - A role in the Resgrid system - - - + Response Data @@ -8086,518 +8117,518 @@ Default constructor - + - Depicts a result after saving a unit status + Result that contains all the options available to filter units against compatible Resgrid APIs - + Response Data - + - Object inputs for setting a users Status/Action. If this object is used in an operation that sets - a status for the current user the UserId value in this object will be ignored. + A unit in the Resgrid system - + - UnitId of the apparatus that the state is being set for + Response Data - + - The UnitStateType of the Unit + The information about a specific unit - + - The Call/Station the unit is responding to + Id of the Unit - + - The timestamp of the status event in UTC + The Id of the department the unit is under - + - The timestamp of the status event in the local time of the device + Name of the Unit - + - User provided note for this event + Department assigned type for the unit - + - GPS Latitude of the Unit + Department assigned type id for the unit - + - GPS Longitude of the Unit + Custom Statuses Set Id - + - GPS Latitude\Longitude Accuracy of the Unit + Station Id of the station housing the unit (0 means no station) - + - GPS Altitude of the Unit + Name of the station the unit is under - + - GPS Altitude Accuracy of the Unit + Vehicle Identification Number for the unit - + - GPS Speed of the Unit + Plate Number for the Unit - + - GPS Heading of the Unit + Is the unit 4-Wheel drive - + - The event id used for queuing on mobile applications + Does the unit require a special permit to drive - + - The accountability roles filed for this event + Id number of the units current destionation (0 means no destination) - + - Role filled by a User on a Unit for an event + The current status/state of the Unit - + - Id of the locally stored event + The Timestamp of the status - + - Local Event Id + The units current Latitude - + - UserId of the user filling the role + The units current Longitude - + - RoleId of the role being filled + Current user provide status note - + - The name of the Role + Unit role information for roles on a unit - + - Depicts a unit status in the Resgrid system. + Unit Role Id - + - Response Data + User Id of the user in the role (could be null) - + - Depicts a unit's status + Name of the Role - + - Unit Id + Name of the user in the role (could be null) - + - Units Name + Multiple Unit infos Result - + - The Type of the Unit + Response Data - + - Units current Status (State) + Default constructor - + - CSS for status (for display) + The information about a specific unit - + - CSS Style for status (for display) + Id of the Unit - + - Timestamp of this Unit State + The Id of the department the unit is under - + - Timestamp in Utc of this Unit State + Name of the Unit - + - Destination Id (Station or Call) + Department assigned type for the unit - + - Name of the Desination (Call or Station) + Department assigned type id for the unit - + - Note for the State + Custom Statuses Set Id - + - Latitude + Station Id of the station housing the unit (0 means no station) - + - Longitude + Name of the station the unit is under - + - Name of the Group the Unit is in + Vehicle Identification Number for the unit - + - Id of the Group the Unit is in + Plate Number for the Unit - + - Unit statuses (states) + Is the unit 4-Wheel drive - + - Response Data + Does the unit require a special permit to drive - + - Default constructor + Id number of the units current destination (0 means no destination) - + - Result that contains all the options available to filter units against compatible Resgrid APIs + Name of the units current destination (0 means no destination) - + - Response Data + The current status/state of the Unit - + - A unit in the Resgrid system + The current status/state of the Unit as a name - + - Response Data + The current status/state of the Unit color - + - The information about a specific unit + The Timestamp of the status - + - Id of the Unit + The Timestamp of the status in UTC/GMT - + - The Id of the department the unit is under + The units current Latitude - + - Name of the Unit + The units current Longitude - + - Department assigned type for the unit + Current user provide status note - + - Department assigned type id for the unit + Units Roles - + - Custom Statuses Set Id + Multiple Units Result - + - Station Id of the station housing the unit (0 means no station) + Response Data - + - Name of the station the unit is under + Default constructor - + - Vehicle Identification Number for the unit + Depicts a result after saving a unit status - + - Plate Number for the Unit + Response Data - + - Is the unit 4-Wheel drive + Object inputs for setting a users Status/Action. If this object is used in an operation that sets + a status for the current user the UserId value in this object will be ignored. - + - Does the unit require a special permit to drive + UnitId of the apparatus that the state is being set for - + - Id number of the units current destionation (0 means no destination) + The UnitStateType of the Unit - + - The current status/state of the Unit + The Call/Station the unit is responding to - + - The Timestamp of the status + The timestamp of the status event in UTC - + - The units current Latitude + The timestamp of the status event in the local time of the device - + - The units current Longitude + User provided note for this event - + - Current user provide status note + GPS Latitude of the Unit - + - Unit role information for roles on a unit + GPS Longitude of the Unit - + - Unit Role Id + GPS Latitude\Longitude Accuracy of the Unit - + - User Id of the user in the role (could be null) + GPS Altitude of the Unit - + - Name of the Role + GPS Altitude Accuracy of the Unit - + - Name of the user in the role (could be null) + GPS Speed of the Unit - + - Multiple Unit infos Result + GPS Heading of the Unit - + - Response Data + The event id used for queuing on mobile applications - + - Default constructor + The accountability roles filed for this event - + - The information about a specific unit + Role filled by a User on a Unit for an event - + - Id of the Unit + Id of the locally stored event - + - The Id of the department the unit is under + Local Event Id - + - Name of the Unit + UserId of the user filling the role - + - Department assigned type for the unit + RoleId of the role being filled - + - Department assigned type id for the unit + The name of the Role - + - Custom Statuses Set Id + Depicts a unit status in the Resgrid system. - + - Station Id of the station housing the unit (0 means no station) + Response Data - + - Name of the station the unit is under + Depicts a unit's status - + - Vehicle Identification Number for the unit + Unit Id - + - Plate Number for the Unit + Units Name - + - Is the unit 4-Wheel drive + The Type of the Unit - + - Does the unit require a special permit to drive + Units current Status (State) - + - Id number of the units current destination (0 means no destination) + CSS for status (for display) - + - Name of the units current destination (0 means no destination) + CSS Style for status (for display) - + - The current status/state of the Unit + Timestamp of this Unit State - + - The current status/state of the Unit as a name + Timestamp in Utc of this Unit State - + - The current status/state of the Unit color + Destination Id (Station or Call) - + - The Timestamp of the status + Name of the Desination (Call or Station) - + - The Timestamp of the status in UTC/GMT + Note for the State - + - The units current Latitude + Latitude - + - The units current Longitude + Longitude - + - Current user provide status note + Name of the Group the Unit is in - + - Units Roles + Id of the Group the Unit is in - + - Multiple Units Result + Unit statuses (states) - + Response Data - + Default constructor diff --git a/Web/Resgrid.Web/wwwroot/js/ng/vendor.js b/Web/Resgrid.Web/wwwroot/js/ng/vendor.js index b627adf0..56ab1840 100644 --- a/Web/Resgrid.Web/wwwroot/js/ng/vendor.js +++ b/Web/Resgrid.Web/wwwroot/js/ng/vendor.js @@ -15290,6 +15290,59 @@ function getHours(dirtyDate) { /***/ }), +/***/ 8355: +/*!*******************************************************!*\ + !*** ./node_modules/date-fns/esm/getISOWeek/index.js ***! + \*******************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ getISOWeek) +/* harmony export */ }); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../toDate/index.js */ 9103); +/* harmony import */ var _startOfISOWeek_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../startOfISOWeek/index.js */ 5556); +/* harmony import */ var _startOfISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../startOfISOWeekYear/index.js */ 2781); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_lib/requiredArgs/index.js */ 4507); + + + + +var MILLISECONDS_IN_WEEK = 604800000; + +/** + * @name getISOWeek + * @category ISO Week Helpers + * @summary Get the ISO week of the given date. + * + * @description + * Get the ISO week of the given date. + * + * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date + * + * @param {Date|Number} date - the given date + * @returns {Number} the ISO week + * @throws {TypeError} 1 argument required + * + * @example + * // Which week of the ISO-week numbering year is 2 January 2005? + * const result = getISOWeek(new Date(2005, 0, 2)) + * //=> 53 + */ +function getISOWeek(dirtyDate) { + (0,_lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(1, arguments); + var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__["default"])(dirtyDate); + var diff = (0,_startOfISOWeek_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(date).getTime() - (0,_startOfISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_3__["default"])(date).getTime(); + + // Round the number of days to the nearest integer + // because the number of milliseconds in a week is not constant + // (e.g. it's different in the week of the daylight saving time clock shift) + return Math.round(diff / MILLISECONDS_IN_WEEK) + 1; +} + +/***/ }), + /***/ 8446: /*!***********************************************************!*\ !*** ./node_modules/date-fns/esm/getISOWeekYear/index.js ***! @@ -15350,59 +15403,6 @@ function getISOWeekYear(dirtyDate) { /***/ }), -/***/ 8355: -/*!*******************************************************!*\ - !*** ./node_modules/date-fns/esm/getISOWeek/index.js ***! - \*******************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ getISOWeek) -/* harmony export */ }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../toDate/index.js */ 9103); -/* harmony import */ var _startOfISOWeek_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../startOfISOWeek/index.js */ 5556); -/* harmony import */ var _startOfISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../startOfISOWeekYear/index.js */ 2781); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_lib/requiredArgs/index.js */ 4507); - - - - -var MILLISECONDS_IN_WEEK = 604800000; - -/** - * @name getISOWeek - * @category ISO Week Helpers - * @summary Get the ISO week of the given date. - * - * @description - * Get the ISO week of the given date. - * - * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date - * - * @param {Date|Number} date - the given date - * @returns {Number} the ISO week - * @throws {TypeError} 1 argument required - * - * @example - * // Which week of the ISO-week numbering year is 2 January 2005? - * const result = getISOWeek(new Date(2005, 0, 2)) - * //=> 53 - */ -function getISOWeek(dirtyDate) { - (0,_lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(1, arguments); - var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__["default"])(dirtyDate); - var diff = (0,_startOfISOWeek_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(date).getTime() - (0,_startOfISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_3__["default"])(date).getTime(); - - // Round the number of days to the nearest integer - // because the number of milliseconds in a week is not constant - // (e.g. it's different in the week of the daylight saving time clock shift) - return Math.round(diff / MILLISECONDS_IN_WEEK) + 1; -} - -/***/ }), - /***/ 351: /*!*******************************************************!*\ !*** ./node_modules/date-fns/esm/getMinutes/index.js ***! @@ -16031,96 +16031,96 @@ function startOfDay(dirtyDate) { /***/ }), -/***/ 2781: -/*!***************************************************************!*\ - !*** ./node_modules/date-fns/esm/startOfISOWeekYear/index.js ***! - \***************************************************************/ +/***/ 5556: +/*!***********************************************************!*\ + !*** ./node_modules/date-fns/esm/startOfISOWeek/index.js ***! + \***********************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ startOfISOWeekYear) +/* harmony export */ "default": () => (/* binding */ startOfISOWeek) /* harmony export */ }); -/* harmony import */ var _getISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../getISOWeekYear/index.js */ 8446); -/* harmony import */ var _startOfISOWeek_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../startOfISOWeek/index.js */ 5556); +/* harmony import */ var _startOfWeek_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../startOfWeek/index.js */ 9935); /* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_lib/requiredArgs/index.js */ 4507); - /** - * @name startOfISOWeekYear - * @category ISO Week-Numbering Year Helpers - * @summary Return the start of an ISO week-numbering year for the given date. + * @name startOfISOWeek + * @category ISO Week Helpers + * @summary Return the start of an ISO week for the given date. * * @description - * Return the start of an ISO week-numbering year, - * which always starts 3 days before the year's first Thursday. + * Return the start of an ISO week for the given date. * The result will be in the local timezone. * * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date * * @param {Date|Number} date - the original date - * @returns {Date} the start of an ISO week-numbering year + * @returns {Date} the start of an ISO week * @throws {TypeError} 1 argument required * * @example - * // The start of an ISO week-numbering year for 2 July 2005: - * const result = startOfISOWeekYear(new Date(2005, 6, 2)) - * //=> Mon Jan 03 2005 00:00:00 + * // The start of an ISO week for 2 September 2014 11:55:00: + * const result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0)) + * //=> Mon Sep 01 2014 00:00:00 */ -function startOfISOWeekYear(dirtyDate) { +function startOfISOWeek(dirtyDate) { (0,_lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(1, arguments); - var year = (0,_getISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_1__["default"])(dirtyDate); - var fourthOfJanuary = new Date(0); - fourthOfJanuary.setFullYear(year, 0, 4); - fourthOfJanuary.setHours(0, 0, 0, 0); - var date = (0,_startOfISOWeek_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(fourthOfJanuary); - return date; + return (0,_startOfWeek_index_js__WEBPACK_IMPORTED_MODULE_1__["default"])(dirtyDate, { + weekStartsOn: 1 + }); } /***/ }), -/***/ 5556: -/*!***********************************************************!*\ - !*** ./node_modules/date-fns/esm/startOfISOWeek/index.js ***! - \***********************************************************/ +/***/ 2781: +/*!***************************************************************!*\ + !*** ./node_modules/date-fns/esm/startOfISOWeekYear/index.js ***! + \***************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ startOfISOWeek) +/* harmony export */ "default": () => (/* binding */ startOfISOWeekYear) /* harmony export */ }); -/* harmony import */ var _startOfWeek_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../startOfWeek/index.js */ 9935); +/* harmony import */ var _getISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../getISOWeekYear/index.js */ 8446); +/* harmony import */ var _startOfISOWeek_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../startOfISOWeek/index.js */ 5556); /* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_lib/requiredArgs/index.js */ 4507); + /** - * @name startOfISOWeek - * @category ISO Week Helpers - * @summary Return the start of an ISO week for the given date. + * @name startOfISOWeekYear + * @category ISO Week-Numbering Year Helpers + * @summary Return the start of an ISO week-numbering year for the given date. * * @description - * Return the start of an ISO week for the given date. + * Return the start of an ISO week-numbering year, + * which always starts 3 days before the year's first Thursday. * The result will be in the local timezone. * * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date * * @param {Date|Number} date - the original date - * @returns {Date} the start of an ISO week + * @returns {Date} the start of an ISO week-numbering year * @throws {TypeError} 1 argument required * * @example - * // The start of an ISO week for 2 September 2014 11:55:00: - * const result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0)) - * //=> Mon Sep 01 2014 00:00:00 + * // The start of an ISO week-numbering year for 2 July 2005: + * const result = startOfISOWeekYear(new Date(2005, 6, 2)) + * //=> Mon Jan 03 2005 00:00:00 */ -function startOfISOWeek(dirtyDate) { +function startOfISOWeekYear(dirtyDate) { (0,_lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(1, arguments); - return (0,_startOfWeek_index_js__WEBPACK_IMPORTED_MODULE_1__["default"])(dirtyDate, { - weekStartsOn: 1 - }); + var year = (0,_getISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_1__["default"])(dirtyDate); + var fourthOfJanuary = new Date(0); + fourthOfJanuary.setFullYear(year, 0, 4); + fourthOfJanuary.setHours(0, 0, 0, 0); + var date = (0,_startOfISOWeek_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(fourthOfJanuary); + return date; } /***/ }), @@ -72371,7 +72371,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony export */ "ɵPRIMARY_HTTP_BACKEND": () => (/* binding */ PRIMARY_HTTP_BACKEND), /* harmony export */ "ɵwithHttpTransferCache": () => (/* binding */ withHttpTransferCache) /* harmony export */ }); -/* harmony import */ var G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ 9204); +/* harmony import */ var _Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ 9204); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/core */ 7580); /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs */ 1536); /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rxjs */ 7498); @@ -73894,7 +73894,7 @@ class FetchBackend { } doRequest(request, signal, observer) { var _this = this; - return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { const init = _this.createRequestInit(request); let response; try { @@ -73948,7 +73948,7 @@ class FetchBackend { // Perform response processing outside of Angular zone to // ensure no excessive change detection runs are executed // Here calling the async ReadableStreamDefaultReader.read() is responsible for triggering CD - yield _this.ngZone.runOutsideAngular( /*#__PURE__*/(0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + yield _this.ngZone.runOutsideAngular( /*#__PURE__*/(0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { while (true) { const { done, @@ -75984,7 +75984,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony export */ "ɵɵvalidateIframeAttribute": () => (/* binding */ ɵɵvalidateIframeAttribute), /* harmony export */ "ɵɵviewQuery": () => (/* binding */ ɵɵviewQuery) /* harmony export */ }); -/* harmony import */ var G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ 9204); +/* harmony import */ var _Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ 9204); /* harmony import */ var _angular_core_primitives_signals__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core/primitives/signals */ 5689); /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs */ 3119); /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rxjs */ 2842); @@ -109664,7 +109664,7 @@ class ChangeDetectionSchedulerImpl { */ raceTimeoutAndRequestAnimationFrame() { var _this = this; - return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { const timeout = new Promise(resolve => setTimeout(resolve)); const rAF = typeof _global['requestAnimationFrame'] === 'function' ? new Promise(resolve => requestAnimationFrame(() => resolve())) : null; yield Promise.race([timeout, rAF]); @@ -123074,7 +123074,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony export */ WindowRef: () => (/* binding */ WindowRef), /* harmony export */ directives: () => (/* binding */ directives) /* harmony export */ }); -/* harmony import */ var G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ 9204); +/* harmony import */ var _Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ 9204); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ 7580); /* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @angular/common/http */ 6443); /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rxjs */ 521); @@ -123888,7 +123888,7 @@ class StorageService { } read(key) { var _this = this; - return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { if (_this.storageProvider) { return yield _this.storageProvider.read(key); } @@ -123904,7 +123904,7 @@ class StorageService { } write(key, value) { var _this2 = this; - return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { if (_this2.storageProvider) { return yield _this2.storageProvider.write(key, value); } @@ -123913,7 +123913,7 @@ class StorageService { } remove(key) { var _this3 = this; - return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { if (_this3.storageProvider) { return yield _this3.storageProvider.remove(key); } @@ -123922,7 +123922,7 @@ class StorageService { } clear() { var _this4 = this; - return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { if (_this4.storageProvider) { return yield _this4.storageProvider.clear(); } @@ -123994,7 +123994,7 @@ class AuthService { } logout() { var _this5 = this; - return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { _this5.updateState({ profile: undefined, tokens: undefined @@ -124028,7 +124028,7 @@ class AuthService { } storeToken(tokens) { var _this6 = this; - return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { _this6.logger.logDebug('storing tokens'); const previousTokens = yield _this6.retrieveTokens(); if (previousTokens != null && tokens.refresh_token == null) { @@ -124039,7 +124039,7 @@ class AuthService { } retrieveTokens() { var _this7 = this; - return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { var tokens = yield _this7.storageService.read('auth-tokens'); if (tokens) { return JSON.parse(tokens); @@ -124049,7 +124049,7 @@ class AuthService { } removeToken() { var _this8 = this; - return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { yield _this8.storageService.remove('auth-tokens'); })(); } @@ -124197,7 +124197,7 @@ class HttpsRequestInterceptor { } addAuthHeader(request) { var _this9 = this; - return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { const tokens = yield _this9.authService.retrieveTokens(); if (tokens) { const dupReq = request.clone({ @@ -124261,7 +124261,7 @@ class CacheService { } initalize() { var _this10 = this; - return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { if (_this10.cacheProvider) { return yield _this10.cacheProvider.initialize(); } else { @@ -124274,7 +124274,7 @@ class CacheService { } put(data) { var _this11 = this; - return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { if (_this11.cacheProvider) { data.cacheSavedOn = new Date(); const expiresOn = new Date(); @@ -124285,7 +124285,7 @@ class CacheService { } get(key) { var _this12 = this; - return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { if (_this12.cacheProvider) { try { const data = yield _this12.cacheProvider.get(key); @@ -124317,7 +124317,7 @@ class CacheService { } delete(key) { var _this13 = this; - return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { if (_this13.cacheProvider) { yield _this13.cacheProvider.delete(key); } @@ -124325,7 +124325,7 @@ class CacheService { } putHttpResponse(cacheKey, cacheTime, response) { var _this14 = this; - return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { if (_this14.cacheProvider) { const expiresOn = new Date(); expiresOn.setMinutes(expiresOn.getMinutes() + cacheTime); @@ -124335,7 +124335,7 @@ class CacheService { } getHttpResponse(key) { var _this15 = this; - return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { if (_this15.cacheProvider) { const data = yield _this15.cacheProvider.get(key); if (data && data.length > 0) { @@ -124348,7 +124348,7 @@ class CacheService { } deleteHttpResponse(key) { var _this16 = this; - return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { if (_this16.cacheProvider) { yield _this16.cacheProvider.delete(key); } @@ -124594,7 +124594,7 @@ class LiveKitService { } connect(room) { var _this17 = this; - return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { const simulcast = false; const dynacast = true; // optimize publishing bandwidth and CPU for published tracks const forceTURN = false; @@ -124631,7 +124631,7 @@ class LiveKitService { } connectToRoom(url, token, roomOptions, connectOptions, shouldPublish) { var _this18 = this; - return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { _this18.room = new livekit_client__WEBPACK_IMPORTED_MODULE_2__.Room(roomOptions); const startTime = Date.now(); yield _this18.room.prepareConnection(url, token); @@ -124641,7 +124641,7 @@ class LiveKitService { that.participantConnected(that, participant); }).on(livekit_client__WEBPACK_IMPORTED_MODULE_2__.RoomEvent.Disconnected, that.handleRoomDisconnect).on(livekit_client__WEBPACK_IMPORTED_MODULE_2__.RoomEvent.DataReceived, that.handleData).on(livekit_client__WEBPACK_IMPORTED_MODULE_2__.RoomEvent.ParticipantDisconnected, participant => { that.renderParticipant(participant, true); - }).on(livekit_client__WEBPACK_IMPORTED_MODULE_2__.RoomEvent.Reconnected, /*#__PURE__*/(0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {})).on(livekit_client__WEBPACK_IMPORTED_MODULE_2__.RoomEvent.LocalTrackPublished, pub => { + }).on(livekit_client__WEBPACK_IMPORTED_MODULE_2__.RoomEvent.Reconnected, /*#__PURE__*/(0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {})).on(livekit_client__WEBPACK_IMPORTED_MODULE_2__.RoomEvent.LocalTrackPublished, pub => { const track = pub.track; if (track instanceof livekit_client__WEBPACK_IMPORTED_MODULE_2__.LocalAudioTrack) { const { @@ -124680,7 +124680,7 @@ class LiveKitService { }).on(livekit_client__WEBPACK_IMPORTED_MODULE_2__.RoomEvent.TrackUnsubscribed, (_, pub, participant) => { _this18.renderParticipant(participant); //this.renderScreenShare(this.room); - }).on(livekit_client__WEBPACK_IMPORTED_MODULE_2__.RoomEvent.SignalConnected, /*#__PURE__*/(0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + }).on(livekit_client__WEBPACK_IMPORTED_MODULE_2__.RoomEvent.SignalConnected, /*#__PURE__*/(0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { const signalConnectionTime = Date.now() - startTime; // speed up publishing by starting to publish before it's fully connected // publishing is accepted as soon as signal connection has established @@ -124954,7 +124954,7 @@ class LiveKitService { } toggleAudio(mute) { var _this19 = this; - return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { if (!_this19.room) return false; yield _this19.room.localParticipant.setMicrophoneEnabled(!mute); return _this19.room.localParticipant.isMicrophoneEnabled; @@ -124962,7 +124962,7 @@ class LiveKitService { } toggleVideo(disableCamera) { var _this20 = this; - return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { if (!_this20.room) return false; yield _this20.room.localParticipant.setCameraEnabled(!disableCamera); // Donno why, leaving here for now @@ -124972,7 +124972,7 @@ class LiveKitService { } disconnect() { var _this21 = this; - return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { if (_this21.room) { yield _this21.room.disconnect(); } @@ -124996,9 +124996,9 @@ class LiveKitService { } handleDevicesChanged() { var _this22 = this; - return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { Promise.all(Object.keys(_this22.elementMapping).map( /*#__PURE__*/function () { - var _ref3 = (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (id) { + var _ref3 = (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (id) { const kind = _this22.elementMapping[id]; if (!kind) { return; @@ -125107,7 +125107,7 @@ class VoiceFooterComponent { ngOnDestroy() {} toggleTransmitting() { var _this23 = this; - return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { if (_this23.isTransmitting) { yield _this23.stopTransmitting(); } else { @@ -125117,20 +125117,20 @@ class VoiceFooterComponent { } startTransmitting() { var _this24 = this; - return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { _this24.isTransmitting = yield _this24.livekitService.toggleAudio(false); })(); } stopTransmitting() { var _this25 = this; - return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { _this25.isTransmitting = yield _this25.livekitService.toggleAudio(true); })(); } stopTransmittingLeave() {} onChannelChange(room) { var _this26 = this; - return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { if (room.id === '') { yield _this26.livekitService.disconnect(); } else { @@ -128197,7 +128197,7 @@ class RealtimeGeolocationService { } start() { var _this27 = this; - return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { console.log('SignalR Channel Start()'); _this27.retryCount = 0; if (!_this27.started) { From 5884a7552c54d7eaffd473e1c57b86c3780dbe0d Mon Sep 17 00:00:00 2001 From: Shawn Jackson Date: Sun, 17 Aug 2025 12:17:12 -0700 Subject: [PATCH 2/4] CU-868f7n1u3 Minor change to system location name. --- Core/Resgrid.Config/InfoConfig.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/Resgrid.Config/InfoConfig.cs b/Core/Resgrid.Config/InfoConfig.cs index 72db87d8..70f51f12 100644 --- a/Core/Resgrid.Config/InfoConfig.cs +++ b/Core/Resgrid.Config/InfoConfig.cs @@ -29,7 +29,7 @@ public static class InfoConfig new ResgridSystemLocation() { Name = "US-West", - DisplayName = "Resgrid North America", + DisplayName = "Resgrid North America (Global)", LocationInfo = "This is the Resgrid system hosted in the Western United States (private datacenter). This system services most Resgrid customers.", IsDefault = true, From 1321fa256d887d915a61f0d3175a7e9a834990bd Mon Sep 17 00:00:00 2001 From: Shawn Jackson Date: Wed, 27 Aug 2025 09:45:27 -0700 Subject: [PATCH 3/4] CU-8687aj3gt Bug fixes for Novu send paths. --- Core/Resgrid.Config/ChatConfig.cs | 8 +- .../Services/ICommunicationService.cs | 4 +- Core/Resgrid.Services/CalendarService.cs | 6 +- .../OttawaKingstonTorontoTemplate.cs | 98 +- Core/Resgrid.Services/CommunicationService.cs | 8 +- Core/Resgrid.Services/PushService.cs | 5 +- .../NovuProvider.cs | 1 + .../Resgrid.Web.Services.xml | 1086 ++++++++--------- Web/Resgrid.Web/wwwroot/js/ng/vendor.js | 262 ++-- .../Logic/BroadcastMessageLogic.cs | 11 +- 10 files changed, 769 insertions(+), 720 deletions(-) diff --git a/Core/Resgrid.Config/ChatConfig.cs b/Core/Resgrid.Config/ChatConfig.cs index e5aa6cec..eefa92a4 100644 --- a/Core/Resgrid.Config/ChatConfig.cs +++ b/Core/Resgrid.Config/ChatConfig.cs @@ -10,10 +10,10 @@ public static class ChatConfig public static string NovuApplicationId = ""; public static string NovuSecretKey = ""; - public static string NovuUnitFcmProviderId = ""; - public static string NovuUnitApnsProviderId = ""; - public static string NovuResponderFcmProviderId = ""; - public static string NovuResponderApnsProviderId = ""; + public static string NovuUnitFcmProviderId = "firebase-cloud-messaging-7Z5wHFPpQ"; + public static string NovuUnitApnsProviderId = "unit-apns"; + public static string NovuResponderFcmProviderId = "respond-firebase-cloud-messaging"; + public static string NovuResponderApnsProviderId = "respond-apns"; public static string NovuDispatchUnitWorkflowId = "unit-dispatch"; public static string NovuDispatchUserWorkflowId = "user-dispatch"; public static string NovuMessageUserWorkflowId = "user-message"; diff --git a/Core/Resgrid.Model/Services/ICommunicationService.cs b/Core/Resgrid.Model/Services/ICommunicationService.cs index 801c60b7..a758e599 100644 --- a/Core/Resgrid.Model/Services/ICommunicationService.cs +++ b/Core/Resgrid.Model/Services/ICommunicationService.cs @@ -19,7 +19,7 @@ public interface ICommunicationService /// The profile. /// Task<System.Boolean>. Task SendMessageAsync(Message message, string sendersName, string departmentNumber, int departmentId, - UserProfile profile = null); + UserProfile profile = null, Department department = null); /// /// Sends the call asynchronous. @@ -110,6 +110,6 @@ Task SendTextMessageAsync(string userId, string title, string message, int /// The profile. /// Task<System.Boolean>. Task SendCalendarAsync(string userId, int departmentId, string message, string departmentNumber, - string title = "Notification", UserProfile profile = null); + string title = "Notification", UserProfile profile = null, Department department = null); } } diff --git a/Core/Resgrid.Services/CalendarService.cs b/Core/Resgrid.Services/CalendarService.cs index 568e0bfd..9f6016ae 100644 --- a/Core/Resgrid.Services/CalendarService.cs +++ b/Core/Resgrid.Services/CalendarService.cs @@ -469,7 +469,7 @@ public async Task NotifyNewCalendarItemAsync(CalendarItem calendarItem) // Notify the entire department foreach (var profile in profiles) { - await _communicationService.SendCalendarAsync(profile.Key, calendarItem.DepartmentId, message, departmentNumber, title, profile.Value); + await _communicationService.SendCalendarAsync(profile.Key, calendarItem.DepartmentId, message, departmentNumber, title, profile.Value, department); } } else @@ -487,9 +487,9 @@ public async Task NotifyNewCalendarItemAsync(CalendarItem calendarItem) foreach (var member in group.Members) { if (profiles.ContainsKey(member.UserId)) - await _communicationService.SendNotificationAsync(member.UserId, calendarItem.DepartmentId, message, departmentNumber, department, title, profiles[member.UserId]); + await _communicationService.SendCalendarAsync(member.UserId, calendarItem.DepartmentId, message, departmentNumber, title, profiles[member.UserId], department); else - await _communicationService.SendNotificationAsync(member.UserId, calendarItem.DepartmentId, message, departmentNumber, department, title, null); + await _communicationService.SendCalendarAsync(member.UserId, calendarItem.DepartmentId, message, departmentNumber, title, null, department); } } } diff --git a/Core/Resgrid.Services/CallEmailTemplates/OttawaKingstonTorontoTemplate.cs b/Core/Resgrid.Services/CallEmailTemplates/OttawaKingstonTorontoTemplate.cs index b19f78ae..0e03e435 100644 --- a/Core/Resgrid.Services/CallEmailTemplates/OttawaKingstonTorontoTemplate.cs +++ b/Core/Resgrid.Services/CallEmailTemplates/OttawaKingstonTorontoTemplate.cs @@ -49,48 +49,84 @@ public async Task GenerateCall(CallEmail email, string managingUser, List< if (String.IsNullOrEmpty(email.Subject)) return null; - string[] sections = email.TextBody.Split(new[] {" ALPHA 512 "}, StringSplitOptions.None); - string[] sectionOneParts = sections[0].Split(new[] {" "}, StringSplitOptions.None); - - Call c = new Call(); - c.Notes = email.TextBody; - c.Name = sections[1].Trim(); - c.LoggedOn = DateTime.UtcNow; - c.Priority = priority; - c.ReportingUserId = managingUser; - c.Dispatches = new Collection(); - c.CallSource = (int)CallSources.EmailImport; - c.SourceIdentifier = email.MessageId; - c.NatureOfCall = sections[1].Trim(); - c.IncidentNumber = sectionOneParts[0].Trim(); - c.ExternalIdentifier = sectionOneParts[0].Trim(); - - if (users != null && users.Any()) + try { - foreach (var u in users) + string[] sections = email.TextBody.Split(new[] { " ALPHA 512 " }, StringSplitOptions.None); + string[] sectionOneParts = sections[0].Split(new[] { " " }, StringSplitOptions.None); + + Call c = new Call(); + c.Notes = email.TextBody; + c.Name = sections[1].Trim(); + c.LoggedOn = DateTime.UtcNow; + c.Priority = priority; + c.ReportingUserId = managingUser; + c.Dispatches = new Collection(); + c.CallSource = (int)CallSources.EmailImport; + c.SourceIdentifier = email.MessageId; + c.NatureOfCall = sections[1].Trim(); + c.IncidentNumber = sectionOneParts[0].Trim(); + c.ExternalIdentifier = sectionOneParts[0].Trim(); + + if (users != null && users.Any()) { - CallDispatch cd = new CallDispatch(); - cd.UserId = u.UserId; + foreach (var u in users) + { + CallDispatch cd = new CallDispatch(); + cd.UserId = u.UserId; - c.Dispatches.Add(cd); + c.Dispatches.Add(cd); + } } - } - // Search for an active call - if (activeCalls != null && activeCalls.Any()) + // Search for an active call + if (activeCalls != null && activeCalls.Any()) + { + var activeCall = activeCalls.FirstOrDefault(x => x.IncidentNumber == c.IncidentNumber); + + if (activeCall != null) + { + activeCall.Notes = c.Notes; + activeCall.LastDispatchedOn = DateTime.UtcNow; + + return activeCall; + } + } + + return c; + } + catch (Exception ex) { - var activeCall = activeCalls.FirstOrDefault(x => x.IncidentNumber == c.IncidentNumber); + Call c = new Call(); + c.Name = email.Subject; + c.NatureOfCall = $"ERROR PROCESSING DISPATCH EMAIL, Unprocessed email body: {email.TextBody}"; - if (activeCall != null) + if (users != null && users.Any()) { - activeCall.Notes = c.Notes; - activeCall.LastDispatchedOn = DateTime.UtcNow; + foreach (var u in users) + { + CallDispatch cd = new CallDispatch(); + cd.UserId = u.UserId; - return activeCall; + c.Dispatches.Add(cd); + } } - } - return c; + // Search for an active call + if (activeCalls != null && activeCalls.Any()) + { + var activeCall = activeCalls.FirstOrDefault(x => x.IncidentNumber == c.IncidentNumber); + + if (activeCall != null) + { + activeCall.Notes = c.Notes; + activeCall.LastDispatchedOn = DateTime.UtcNow; + + return activeCall; + } + } + + return c; + } } } } diff --git a/Core/Resgrid.Services/CommunicationService.cs b/Core/Resgrid.Services/CommunicationService.cs index 68a0d3e6..bba50d9b 100644 --- a/Core/Resgrid.Services/CommunicationService.cs +++ b/Core/Resgrid.Services/CommunicationService.cs @@ -39,7 +39,7 @@ public CommunicationService(ISmsService smsService, IEmailService emailService, _userStateService = userStateService; } - public async Task SendMessageAsync(Message message, string sendersName, string departmentNumber, int departmentId, UserProfile profile = null) + public async Task SendMessageAsync(Message message, string sendersName, string departmentNumber, int departmentId, UserProfile profile = null, Department department = null) { if (Config.SystemBehaviorConfig.DoNotBroadcast && !Config.SystemBehaviorConfig.BypassDoNotBroadcastDepartments.Contains(departmentId)) return false; @@ -79,6 +79,7 @@ public async Task SendMessageAsync(Message message, string sendersName, st { var spm = new StandardPushMessage(); spm.MessageId = message.MessageId; + spm.DepartmentCode = department?.Code; if (message.SystemGenerated) spm.SubTitle = "Msg from System"; @@ -124,6 +125,7 @@ public async Task SendCallAsync(Call call, CallDispatch dispatch, string d spc.Priority = call.Priority; spc.ActiveCallCount = 1; spc.DepartmentId = departmentId; + spc.DepartmentCode = call.Department?.Code; if (call.CallPriority != null && !String.IsNullOrWhiteSpace(call.CallPriority.Color)) { @@ -335,7 +337,7 @@ public async Task SendNotificationAsync(string userId, int departmentId, s return true; } - public async Task SendCalendarAsync(string userId, int departmentId, string message, string departmentNumber, string title = "Notification", UserProfile profile = null) + public async Task SendCalendarAsync(string userId, int departmentId, string message, string departmentNumber, string title = "Notification", UserProfile profile = null, Department department = null) { if (Config.SystemBehaviorConfig.DoNotBroadcast && !Config.SystemBehaviorConfig.BypassDoNotBroadcastDepartments.Contains(departmentId)) return false; @@ -364,6 +366,7 @@ public async Task SendCalendarAsync(string userId, int departmentId, strin var spm = new StandardPushMessage(); spm.Title = "Calendar"; spm.SubTitle = $"{title} {message}"; + spm.DepartmentCode = null; try { @@ -467,6 +470,7 @@ public async Task SendTroubleAlertAsync(TroubleAlertEvent troubleAlertEven spc.Priority = (int)CallPriority.Emergency; spc.ActiveCallCount = 1; spc.DepartmentId = departmentId; + spc.DepartmentCode = call.Department?.Code; string subTitle = String.Empty; if (!String.IsNullOrWhiteSpace(unitAddress)) diff --git a/Core/Resgrid.Services/PushService.cs b/Core/Resgrid.Services/PushService.cs index e74684d0..191a1548 100644 --- a/Core/Resgrid.Services/PushService.cs +++ b/Core/Resgrid.Services/PushService.cs @@ -112,7 +112,8 @@ public async Task PushMessage(StandardPushMessage message, string userId, try { - await _novuProvider.SendUserMessage(message.Title, message.SubTitle, userId, message.DepartmentCode, string.Format("M{0}", message.MessageId), null); + if (!string.IsNullOrWhiteSpace(message.DepartmentCode)) + await _novuProvider.SendUserMessage(message.Title, message.SubTitle, userId, message.DepartmentCode, string.Format("M{0}", message.MessageId), null); } catch (Exception ex) { @@ -143,7 +144,7 @@ public async Task PushNotification(StandardPushMessage message, string use } try { - await _novuProvider.SendUserMessage(message.Title, message.SubTitle, userId, message.DepartmentCode, string.Format("N{0}", message.MessageId), null); + await _novuProvider.SendUserNotification(message.Title, message.SubTitle, userId, message.DepartmentCode, string.Format("N{0}", message.MessageId), null); } catch (Exception ex) { diff --git a/Providers/Resgrid.Providers.Messaging/NovuProvider.cs b/Providers/Resgrid.Providers.Messaging/NovuProvider.cs index 21854657..948b3857 100644 --- a/Providers/Resgrid.Providers.Messaging/NovuProvider.cs +++ b/Providers/Resgrid.Providers.Messaging/NovuProvider.cs @@ -231,6 +231,7 @@ private async Task SendNotification(string title, string body, string reci { subject = title, body = body, + id = eventCode }, overrides = new { diff --git a/Web/Resgrid.Web.Services/Resgrid.Web.Services.xml b/Web/Resgrid.Web.Services/Resgrid.Web.Services.xml index a8f76899..7b1d9f63 100644 --- a/Web/Resgrid.Web.Services/Resgrid.Web.Services.xml +++ b/Web/Resgrid.Web.Services/Resgrid.Web.Services.xml @@ -2425,52 +2425,6 @@ Is the user a group admin - - - UserId (GUID/UUID) of the User to set. This field will be ignored if the input is used on a - function that is setting status for the current user. - - - - - The state/staffing level of the user to set for the user. - - - - - Note for the staffing level - - - - - The result object for a state/staffing level request. - - - - - The UserId GUID/UUID for the user state/staffing level being return - - - - - The full name of the user for the state/staffing level being returned - - - - - The current staffing level (state) type for the user - - - - - The timestamp of the last state/staffing level. This is converted UTC to the departments, or users, TimeZone. - - - - - Staffing note for the User's staffing - - Input data to add a staffing schedule in the Resgrid system @@ -2576,6 +2530,52 @@ Note for this staffing schedule + + + UserId (GUID/UUID) of the User to set. This field will be ignored if the input is used on a + function that is setting status for the current user. + + + + + The state/staffing level of the user to set for the user. + + + + + Note for the staffing level + + + + + The result object for a state/staffing level request. + + + + + The UserId GUID/UUID for the user state/staffing level being return + + + + + The full name of the user for the state/staffing level being returned + + + + + The current staffing level (state) type for the user + + + + + The timestamp of the last state/staffing level. This is converted UTC to the departments, or users, TimeZone. + + + + + Staffing note for the User's staffing + + A resrouce in the system this could be a user or unit @@ -6566,374 +6566,209 @@ Identifier of the new npte - + - The result of getting all personnel filters for the system + A GPS location for a point in time of a specificed person - + - The Id value of the filter + PersonId of the person that the location is for - + - The type of the filter + The timestamp of the location in UTC - + - The filters name + GPS Latitude of the Person - + - Result containing all the data required to populate the New Call form + GPS Longitude of the Person - + - Response Data + GPS Latitude\Longitude Accuracy of the Person - + - Result that contains all the options available to filter personnel against compatible Resgrid APIs + GPS Altitude of the Person - + - Response Data + GPS Altitude Accuracy of the Person - + - Result containing all the data required to populate the New Call form + GPS Speed of the Person - + - Response Data + GPS Heading of the Person - + - Information about a User + A unit location in the Resgrid system - + - The UserId GUID/UUID for the user + Response Data - + - DepartmentId of the deparment the user belongs to + The information about a specific unit's location - + - Department specificed ID number for this user + Id of the Person - + - The Users First Name + The Timestamp for the location in UTC - + - The Users Last Name + GPS Latitude of the Person - + - The Users Email Address + GPS Longitude of the Person - + - The Users Mobile Telephone Number + GPS Latitude\Longitude Accuracy of the Person - + - GroupId the user is assigned to (0 for no group) + GPS Altitude of the Person - + - Name of the group the user is assigned to + GPS Altitude Accuracy of the Person - + - Enumeration/List of roles the user currently holds + GPS Speed of the Person - + - The current action/status type for the user + GPS Heading of the Person - + - The current action/status string for the user + The result of getting the current staffing for a user - + - The current action/status color hex string for the user + Response Data - + - The timestamp of the last action. This is converted UTC to the departments, or users, TimeZone. + Information about a User staffing - + - The current action/status destination id for the user + The UserId GUID/UUID for the user status being return - + - The current action/status destination name for the user + DepartmentId of the deparment the user belongs to - + - The current staffing level (state) type for the user + The current staffing type for the user - + - The current staffing level (state) string for the user + The timestamp of the last staffing. This is converted UTC version of the timestamp. - + - The current staffing level (state) color hex string for the user + The timestamp of the last staffing. This is converted UTC to the departments, or users, TimeZone. - + - The timestamp of the last state/staffing level. This is converted UTC to the departments, or users, TimeZone. + Note for this staffing - + - Users last known location + Saves (sets) and Personnel Staffing in the system, for a single user - + - Sorting weight for the user + UnitId of the apparatus that the state is being set for - + - A GPS location for a point in time of a specificed person + The UnitStateType of the Unit - + - PersonId of the person that the location is for + The timestamp of the status event in UTC - + - The timestamp of the location in UTC + The timestamp of the status event in the local time of the device - + - GPS Latitude of the Person + User provided note for this event - + - GPS Longitude of the Person + The event id used for queuing on mobile applications - + - GPS Latitude\Longitude Accuracy of the Person + Depicts a result after saving a person status - + - GPS Altitude of the Person + Response Data - + - GPS Altitude Accuracy of the Person - - - - - GPS Speed of the Person - - - - - GPS Heading of the Person - - - - - A unit location in the Resgrid system - - - - - Response Data - - - - - The information about a specific unit's location - - - - - Id of the Person - - - - - The Timestamp for the location in UTC - - - - - GPS Latitude of the Person - - - - - GPS Longitude of the Person - - - - - GPS Latitude\Longitude Accuracy of the Person - - - - - GPS Altitude of the Person - - - - - GPS Altitude Accuracy of the Person - - - - - GPS Speed of the Person - - - - - GPS Heading of the Person - - - - - The result of getting the current staffing for a user - - - - - Response Data - - - - - Information about a User staffing - - - - - The UserId GUID/UUID for the user status being return - - - - - DepartmentId of the deparment the user belongs to - - - - - The current staffing type for the user - - - - - The timestamp of the last staffing. This is converted UTC version of the timestamp. - - - - - The timestamp of the last staffing. This is converted UTC to the departments, or users, TimeZone. - - - - - Note for this staffing - - - - - Saves (sets) and Personnel Staffing in the system, for a single user - - - - - UnitId of the apparatus that the state is being set for - - - - - The UnitStateType of the Unit - - - - - The timestamp of the status event in UTC - - - - - The timestamp of the status event in the local time of the device - - - - - User provided note for this event - - - - - The event id used for queuing on mobile applications - - - - - Depicts a result after saving a person status - - - - - Response Data - - - - - Saves (sets) and Personnel Status in the system, for a single user + Saves (sets) and Personnel Status in the system, for a single user @@ -7206,119 +7041,284 @@ Response Data - + - Result containing all the data required to populate the New Call form + The result of getting all personnel filters for the system - + - Response Data + The Id value of the filter - + - Details of a protocol + The type of the filter - + - Protocol id + The filters name - + - Department id + Result containing all the data required to populate the New Call form - + - Name of the Protocol + Response Data - + - Protocol code + Result that contains all the options available to filter personnel against compatible Resgrid APIs - + - This this protocol disabled + Response Data - + - Protocol description + Result containing all the data required to populate the New Call form - + - Text of the protocol + Response Data - + - UTC date and time when the Protocol was created + Information about a User - + - UserId of the user who created the protocol + The UserId GUID/UUID for the user - + - UTC timestamp of when the Protocol was updated + DepartmentId of the deparment the user belongs to - + - Minimum triggering Weight of the Protocol + Department specificed ID number for this user - + - UserId that last updated the Protocol + The Users First Name - + - Triggers used to activate this Protocol + The Users Last Name - + - Attachments for this Protocol + The Users Email Address - + - Questions used to determine if this Protocol needs to be used or not + The Users Mobile Telephone Number - + - State type + GroupId the user is assigned to (0 for no group) - + - Result containing all the data required to populate the New Call form + Name of the group the user is assigned to - + - Response Data + Enumeration/List of roles the user currently holds - + - A role in the Resgrid system + The current action/status type for the user - + - Response Data + The current action/status string for the user + + + + + The current action/status color hex string for the user + + + + + The timestamp of the last action. This is converted UTC to the departments, or users, TimeZone. + + + + + The current action/status destination id for the user + + + + + The current action/status destination name for the user + + + + + The current staffing level (state) type for the user + + + + + The current staffing level (state) string for the user + + + + + The current staffing level (state) color hex string for the user + + + + + The timestamp of the last state/staffing level. This is converted UTC to the departments, or users, TimeZone. + + + + + Users last known location + + + + + Sorting weight for the user + + + + + Result containing all the data required to populate the New Call form + + + + + Response Data + + + + + Details of a protocol + + + + + Protocol id + + + + + Department id + + + + + Name of the Protocol + + + + + Protocol code + + + + + This this protocol disabled + + + + + Protocol description + + + + + Text of the protocol + + + + + UTC date and time when the Protocol was created + + + + + UserId of the user who created the protocol + + + + + UTC timestamp of when the Protocol was updated + + + + + Minimum triggering Weight of the Protocol + + + + + UserId that last updated the Protocol + + + + + Triggers used to activate this Protocol + + + + + Attachments for this Protocol + + + + + Questions used to determine if this Protocol needs to be used or not + + + + + State type + + + + + Result containing all the data required to populate the New Call form + + + + + Response Data + + + + + A role in the Resgrid system + + + + + Response Data @@ -8117,518 +8117,518 @@ Default constructor - + - Result that contains all the options available to filter units against compatible Resgrid APIs + Depicts a result after saving a unit status - + Response Data - + - A unit in the Resgrid system + Object inputs for setting a users Status/Action. If this object is used in an operation that sets + a status for the current user the UserId value in this object will be ignored. - + - Response Data + UnitId of the apparatus that the state is being set for - + - The information about a specific unit + The UnitStateType of the Unit - + - Id of the Unit + The Call/Station the unit is responding to - + - The Id of the department the unit is under + The timestamp of the status event in UTC - + - Name of the Unit + The timestamp of the status event in the local time of the device - + - Department assigned type for the unit + User provided note for this event - + - Department assigned type id for the unit + GPS Latitude of the Unit - + - Custom Statuses Set Id + GPS Longitude of the Unit - + - Station Id of the station housing the unit (0 means no station) + GPS Latitude\Longitude Accuracy of the Unit - + - Name of the station the unit is under + GPS Altitude of the Unit - + - Vehicle Identification Number for the unit + GPS Altitude Accuracy of the Unit - + - Plate Number for the Unit + GPS Speed of the Unit - + - Is the unit 4-Wheel drive + GPS Heading of the Unit - + - Does the unit require a special permit to drive + The event id used for queuing on mobile applications - + - Id number of the units current destionation (0 means no destination) + The accountability roles filed for this event - + - The current status/state of the Unit + Role filled by a User on a Unit for an event - + - The Timestamp of the status + Id of the locally stored event - + - The units current Latitude + Local Event Id - + - The units current Longitude + UserId of the user filling the role - + - Current user provide status note + RoleId of the role being filled - + - Unit role information for roles on a unit + The name of the Role - + - Unit Role Id + Depicts a unit status in the Resgrid system. - + - User Id of the user in the role (could be null) + Response Data - + - Name of the Role + Depicts a unit's status - + - Name of the user in the role (could be null) + Unit Id - + - Multiple Unit infos Result + Units Name - + - Response Data + The Type of the Unit - + - Default constructor + Units current Status (State) - + - The information about a specific unit + CSS for status (for display) - + - Id of the Unit + CSS Style for status (for display) - + - The Id of the department the unit is under + Timestamp of this Unit State - + - Name of the Unit + Timestamp in Utc of this Unit State - + - Department assigned type for the unit + Destination Id (Station or Call) - + - Department assigned type id for the unit + Name of the Desination (Call or Station) - + - Custom Statuses Set Id + Note for the State - + - Station Id of the station housing the unit (0 means no station) + Latitude - + - Name of the station the unit is under + Longitude - + - Vehicle Identification Number for the unit + Name of the Group the Unit is in - + - Plate Number for the Unit + Id of the Group the Unit is in - + - Is the unit 4-Wheel drive + Unit statuses (states) - + - Does the unit require a special permit to drive + Response Data - + - Id number of the units current destination (0 means no destination) + Default constructor - + - Name of the units current destination (0 means no destination) + Result that contains all the options available to filter units against compatible Resgrid APIs - + - The current status/state of the Unit + Response Data - + - The current status/state of the Unit as a name + A unit in the Resgrid system - + - The current status/state of the Unit color + Response Data - + - The Timestamp of the status + The information about a specific unit - + - The Timestamp of the status in UTC/GMT + Id of the Unit - + - The units current Latitude + The Id of the department the unit is under - + - The units current Longitude + Name of the Unit - + - Current user provide status note + Department assigned type for the unit - + - Units Roles + Department assigned type id for the unit - + - Multiple Units Result + Custom Statuses Set Id - + - Response Data + Station Id of the station housing the unit (0 means no station) - + - Default constructor + Name of the station the unit is under - + - Depicts a result after saving a unit status + Vehicle Identification Number for the unit - + - Response Data + Plate Number for the Unit - + - Object inputs for setting a users Status/Action. If this object is used in an operation that sets - a status for the current user the UserId value in this object will be ignored. + Is the unit 4-Wheel drive - + - UnitId of the apparatus that the state is being set for + Does the unit require a special permit to drive - + - The UnitStateType of the Unit + Id number of the units current destionation (0 means no destination) - + - The Call/Station the unit is responding to + The current status/state of the Unit - + - The timestamp of the status event in UTC + The Timestamp of the status - + - The timestamp of the status event in the local time of the device + The units current Latitude - + - User provided note for this event + The units current Longitude - + - GPS Latitude of the Unit + Current user provide status note - + - GPS Longitude of the Unit + Unit role information for roles on a unit - + - GPS Latitude\Longitude Accuracy of the Unit + Unit Role Id - + - GPS Altitude of the Unit + User Id of the user in the role (could be null) - + - GPS Altitude Accuracy of the Unit + Name of the Role - + - GPS Speed of the Unit + Name of the user in the role (could be null) - + - GPS Heading of the Unit + Multiple Unit infos Result - + - The event id used for queuing on mobile applications + Response Data - + - The accountability roles filed for this event + Default constructor - + - Role filled by a User on a Unit for an event + The information about a specific unit - + - Id of the locally stored event + Id of the Unit - + - Local Event Id + The Id of the department the unit is under - + - UserId of the user filling the role + Name of the Unit - + - RoleId of the role being filled + Department assigned type for the unit - + - The name of the Role + Department assigned type id for the unit - + - Depicts a unit status in the Resgrid system. + Custom Statuses Set Id - + - Response Data + Station Id of the station housing the unit (0 means no station) - + - Depicts a unit's status + Name of the station the unit is under - + - Unit Id + Vehicle Identification Number for the unit - + - Units Name + Plate Number for the Unit - + - The Type of the Unit + Is the unit 4-Wheel drive - + - Units current Status (State) + Does the unit require a special permit to drive - + - CSS for status (for display) + Id number of the units current destination (0 means no destination) - + - CSS Style for status (for display) + Name of the units current destination (0 means no destination) - + - Timestamp of this Unit State + The current status/state of the Unit - + - Timestamp in Utc of this Unit State + The current status/state of the Unit as a name - + - Destination Id (Station or Call) + The current status/state of the Unit color - + - Name of the Desination (Call or Station) + The Timestamp of the status - + - Note for the State + The Timestamp of the status in UTC/GMT - + - Latitude + The units current Latitude - + - Longitude + The units current Longitude - + - Name of the Group the Unit is in + Current user provide status note - + - Id of the Group the Unit is in + Units Roles - + - Unit statuses (states) + Multiple Units Result - + Response Data - + Default constructor diff --git a/Web/Resgrid.Web/wwwroot/js/ng/vendor.js b/Web/Resgrid.Web/wwwroot/js/ng/vendor.js index 56ab1840..b627adf0 100644 --- a/Web/Resgrid.Web/wwwroot/js/ng/vendor.js +++ b/Web/Resgrid.Web/wwwroot/js/ng/vendor.js @@ -15290,59 +15290,6 @@ function getHours(dirtyDate) { /***/ }), -/***/ 8355: -/*!*******************************************************!*\ - !*** ./node_modules/date-fns/esm/getISOWeek/index.js ***! - \*******************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ getISOWeek) -/* harmony export */ }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../toDate/index.js */ 9103); -/* harmony import */ var _startOfISOWeek_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../startOfISOWeek/index.js */ 5556); -/* harmony import */ var _startOfISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../startOfISOWeekYear/index.js */ 2781); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_lib/requiredArgs/index.js */ 4507); - - - - -var MILLISECONDS_IN_WEEK = 604800000; - -/** - * @name getISOWeek - * @category ISO Week Helpers - * @summary Get the ISO week of the given date. - * - * @description - * Get the ISO week of the given date. - * - * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date - * - * @param {Date|Number} date - the given date - * @returns {Number} the ISO week - * @throws {TypeError} 1 argument required - * - * @example - * // Which week of the ISO-week numbering year is 2 January 2005? - * const result = getISOWeek(new Date(2005, 0, 2)) - * //=> 53 - */ -function getISOWeek(dirtyDate) { - (0,_lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(1, arguments); - var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__["default"])(dirtyDate); - var diff = (0,_startOfISOWeek_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(date).getTime() - (0,_startOfISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_3__["default"])(date).getTime(); - - // Round the number of days to the nearest integer - // because the number of milliseconds in a week is not constant - // (e.g. it's different in the week of the daylight saving time clock shift) - return Math.round(diff / MILLISECONDS_IN_WEEK) + 1; -} - -/***/ }), - /***/ 8446: /*!***********************************************************!*\ !*** ./node_modules/date-fns/esm/getISOWeekYear/index.js ***! @@ -15403,6 +15350,59 @@ function getISOWeekYear(dirtyDate) { /***/ }), +/***/ 8355: +/*!*******************************************************!*\ + !*** ./node_modules/date-fns/esm/getISOWeek/index.js ***! + \*******************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ getISOWeek) +/* harmony export */ }); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../toDate/index.js */ 9103); +/* harmony import */ var _startOfISOWeek_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../startOfISOWeek/index.js */ 5556); +/* harmony import */ var _startOfISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../startOfISOWeekYear/index.js */ 2781); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_lib/requiredArgs/index.js */ 4507); + + + + +var MILLISECONDS_IN_WEEK = 604800000; + +/** + * @name getISOWeek + * @category ISO Week Helpers + * @summary Get the ISO week of the given date. + * + * @description + * Get the ISO week of the given date. + * + * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date + * + * @param {Date|Number} date - the given date + * @returns {Number} the ISO week + * @throws {TypeError} 1 argument required + * + * @example + * // Which week of the ISO-week numbering year is 2 January 2005? + * const result = getISOWeek(new Date(2005, 0, 2)) + * //=> 53 + */ +function getISOWeek(dirtyDate) { + (0,_lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(1, arguments); + var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__["default"])(dirtyDate); + var diff = (0,_startOfISOWeek_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(date).getTime() - (0,_startOfISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_3__["default"])(date).getTime(); + + // Round the number of days to the nearest integer + // because the number of milliseconds in a week is not constant + // (e.g. it's different in the week of the daylight saving time clock shift) + return Math.round(diff / MILLISECONDS_IN_WEEK) + 1; +} + +/***/ }), + /***/ 351: /*!*******************************************************!*\ !*** ./node_modules/date-fns/esm/getMinutes/index.js ***! @@ -16031,96 +16031,96 @@ function startOfDay(dirtyDate) { /***/ }), -/***/ 5556: -/*!***********************************************************!*\ - !*** ./node_modules/date-fns/esm/startOfISOWeek/index.js ***! - \***********************************************************/ +/***/ 2781: +/*!***************************************************************!*\ + !*** ./node_modules/date-fns/esm/startOfISOWeekYear/index.js ***! + \***************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ startOfISOWeek) +/* harmony export */ "default": () => (/* binding */ startOfISOWeekYear) /* harmony export */ }); -/* harmony import */ var _startOfWeek_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../startOfWeek/index.js */ 9935); +/* harmony import */ var _getISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../getISOWeekYear/index.js */ 8446); +/* harmony import */ var _startOfISOWeek_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../startOfISOWeek/index.js */ 5556); /* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_lib/requiredArgs/index.js */ 4507); + /** - * @name startOfISOWeek - * @category ISO Week Helpers - * @summary Return the start of an ISO week for the given date. + * @name startOfISOWeekYear + * @category ISO Week-Numbering Year Helpers + * @summary Return the start of an ISO week-numbering year for the given date. * * @description - * Return the start of an ISO week for the given date. + * Return the start of an ISO week-numbering year, + * which always starts 3 days before the year's first Thursday. * The result will be in the local timezone. * * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date * * @param {Date|Number} date - the original date - * @returns {Date} the start of an ISO week + * @returns {Date} the start of an ISO week-numbering year * @throws {TypeError} 1 argument required * * @example - * // The start of an ISO week for 2 September 2014 11:55:00: - * const result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0)) - * //=> Mon Sep 01 2014 00:00:00 + * // The start of an ISO week-numbering year for 2 July 2005: + * const result = startOfISOWeekYear(new Date(2005, 6, 2)) + * //=> Mon Jan 03 2005 00:00:00 */ -function startOfISOWeek(dirtyDate) { +function startOfISOWeekYear(dirtyDate) { (0,_lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(1, arguments); - return (0,_startOfWeek_index_js__WEBPACK_IMPORTED_MODULE_1__["default"])(dirtyDate, { - weekStartsOn: 1 - }); + var year = (0,_getISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_1__["default"])(dirtyDate); + var fourthOfJanuary = new Date(0); + fourthOfJanuary.setFullYear(year, 0, 4); + fourthOfJanuary.setHours(0, 0, 0, 0); + var date = (0,_startOfISOWeek_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(fourthOfJanuary); + return date; } /***/ }), -/***/ 2781: -/*!***************************************************************!*\ - !*** ./node_modules/date-fns/esm/startOfISOWeekYear/index.js ***! - \***************************************************************/ +/***/ 5556: +/*!***********************************************************!*\ + !*** ./node_modules/date-fns/esm/startOfISOWeek/index.js ***! + \***********************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ startOfISOWeekYear) +/* harmony export */ "default": () => (/* binding */ startOfISOWeek) /* harmony export */ }); -/* harmony import */ var _getISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../getISOWeekYear/index.js */ 8446); -/* harmony import */ var _startOfISOWeek_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../startOfISOWeek/index.js */ 5556); +/* harmony import */ var _startOfWeek_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../startOfWeek/index.js */ 9935); /* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_lib/requiredArgs/index.js */ 4507); - /** - * @name startOfISOWeekYear - * @category ISO Week-Numbering Year Helpers - * @summary Return the start of an ISO week-numbering year for the given date. + * @name startOfISOWeek + * @category ISO Week Helpers + * @summary Return the start of an ISO week for the given date. * * @description - * Return the start of an ISO week-numbering year, - * which always starts 3 days before the year's first Thursday. + * Return the start of an ISO week for the given date. * The result will be in the local timezone. * * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date * * @param {Date|Number} date - the original date - * @returns {Date} the start of an ISO week-numbering year + * @returns {Date} the start of an ISO week * @throws {TypeError} 1 argument required * * @example - * // The start of an ISO week-numbering year for 2 July 2005: - * const result = startOfISOWeekYear(new Date(2005, 6, 2)) - * //=> Mon Jan 03 2005 00:00:00 + * // The start of an ISO week for 2 September 2014 11:55:00: + * const result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0)) + * //=> Mon Sep 01 2014 00:00:00 */ -function startOfISOWeekYear(dirtyDate) { +function startOfISOWeek(dirtyDate) { (0,_lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(1, arguments); - var year = (0,_getISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_1__["default"])(dirtyDate); - var fourthOfJanuary = new Date(0); - fourthOfJanuary.setFullYear(year, 0, 4); - fourthOfJanuary.setHours(0, 0, 0, 0); - var date = (0,_startOfISOWeek_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(fourthOfJanuary); - return date; + return (0,_startOfWeek_index_js__WEBPACK_IMPORTED_MODULE_1__["default"])(dirtyDate, { + weekStartsOn: 1 + }); } /***/ }), @@ -72371,7 +72371,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony export */ "ɵPRIMARY_HTTP_BACKEND": () => (/* binding */ PRIMARY_HTTP_BACKEND), /* harmony export */ "ɵwithHttpTransferCache": () => (/* binding */ withHttpTransferCache) /* harmony export */ }); -/* harmony import */ var _Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ 9204); +/* harmony import */ var G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ 9204); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/core */ 7580); /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs */ 1536); /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rxjs */ 7498); @@ -73894,7 +73894,7 @@ class FetchBackend { } doRequest(request, signal, observer) { var _this = this; - return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { const init = _this.createRequestInit(request); let response; try { @@ -73948,7 +73948,7 @@ class FetchBackend { // Perform response processing outside of Angular zone to // ensure no excessive change detection runs are executed // Here calling the async ReadableStreamDefaultReader.read() is responsible for triggering CD - yield _this.ngZone.runOutsideAngular( /*#__PURE__*/(0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + yield _this.ngZone.runOutsideAngular( /*#__PURE__*/(0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { while (true) { const { done, @@ -75984,7 +75984,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony export */ "ɵɵvalidateIframeAttribute": () => (/* binding */ ɵɵvalidateIframeAttribute), /* harmony export */ "ɵɵviewQuery": () => (/* binding */ ɵɵviewQuery) /* harmony export */ }); -/* harmony import */ var _Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ 9204); +/* harmony import */ var G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ 9204); /* harmony import */ var _angular_core_primitives_signals__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core/primitives/signals */ 5689); /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs */ 3119); /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rxjs */ 2842); @@ -109664,7 +109664,7 @@ class ChangeDetectionSchedulerImpl { */ raceTimeoutAndRequestAnimationFrame() { var _this = this; - return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { const timeout = new Promise(resolve => setTimeout(resolve)); const rAF = typeof _global['requestAnimationFrame'] === 'function' ? new Promise(resolve => requestAnimationFrame(() => resolve())) : null; yield Promise.race([timeout, rAF]); @@ -123074,7 +123074,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony export */ WindowRef: () => (/* binding */ WindowRef), /* harmony export */ directives: () => (/* binding */ directives) /* harmony export */ }); -/* harmony import */ var _Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ 9204); +/* harmony import */ var G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ 9204); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ 7580); /* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @angular/common/http */ 6443); /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rxjs */ 521); @@ -123888,7 +123888,7 @@ class StorageService { } read(key) { var _this = this; - return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { if (_this.storageProvider) { return yield _this.storageProvider.read(key); } @@ -123904,7 +123904,7 @@ class StorageService { } write(key, value) { var _this2 = this; - return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { if (_this2.storageProvider) { return yield _this2.storageProvider.write(key, value); } @@ -123913,7 +123913,7 @@ class StorageService { } remove(key) { var _this3 = this; - return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { if (_this3.storageProvider) { return yield _this3.storageProvider.remove(key); } @@ -123922,7 +123922,7 @@ class StorageService { } clear() { var _this4 = this; - return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { if (_this4.storageProvider) { return yield _this4.storageProvider.clear(); } @@ -123994,7 +123994,7 @@ class AuthService { } logout() { var _this5 = this; - return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { _this5.updateState({ profile: undefined, tokens: undefined @@ -124028,7 +124028,7 @@ class AuthService { } storeToken(tokens) { var _this6 = this; - return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { _this6.logger.logDebug('storing tokens'); const previousTokens = yield _this6.retrieveTokens(); if (previousTokens != null && tokens.refresh_token == null) { @@ -124039,7 +124039,7 @@ class AuthService { } retrieveTokens() { var _this7 = this; - return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { var tokens = yield _this7.storageService.read('auth-tokens'); if (tokens) { return JSON.parse(tokens); @@ -124049,7 +124049,7 @@ class AuthService { } removeToken() { var _this8 = this; - return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { yield _this8.storageService.remove('auth-tokens'); })(); } @@ -124197,7 +124197,7 @@ class HttpsRequestInterceptor { } addAuthHeader(request) { var _this9 = this; - return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { const tokens = yield _this9.authService.retrieveTokens(); if (tokens) { const dupReq = request.clone({ @@ -124261,7 +124261,7 @@ class CacheService { } initalize() { var _this10 = this; - return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { if (_this10.cacheProvider) { return yield _this10.cacheProvider.initialize(); } else { @@ -124274,7 +124274,7 @@ class CacheService { } put(data) { var _this11 = this; - return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { if (_this11.cacheProvider) { data.cacheSavedOn = new Date(); const expiresOn = new Date(); @@ -124285,7 +124285,7 @@ class CacheService { } get(key) { var _this12 = this; - return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { if (_this12.cacheProvider) { try { const data = yield _this12.cacheProvider.get(key); @@ -124317,7 +124317,7 @@ class CacheService { } delete(key) { var _this13 = this; - return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { if (_this13.cacheProvider) { yield _this13.cacheProvider.delete(key); } @@ -124325,7 +124325,7 @@ class CacheService { } putHttpResponse(cacheKey, cacheTime, response) { var _this14 = this; - return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { if (_this14.cacheProvider) { const expiresOn = new Date(); expiresOn.setMinutes(expiresOn.getMinutes() + cacheTime); @@ -124335,7 +124335,7 @@ class CacheService { } getHttpResponse(key) { var _this15 = this; - return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { if (_this15.cacheProvider) { const data = yield _this15.cacheProvider.get(key); if (data && data.length > 0) { @@ -124348,7 +124348,7 @@ class CacheService { } deleteHttpResponse(key) { var _this16 = this; - return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { if (_this16.cacheProvider) { yield _this16.cacheProvider.delete(key); } @@ -124594,7 +124594,7 @@ class LiveKitService { } connect(room) { var _this17 = this; - return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { const simulcast = false; const dynacast = true; // optimize publishing bandwidth and CPU for published tracks const forceTURN = false; @@ -124631,7 +124631,7 @@ class LiveKitService { } connectToRoom(url, token, roomOptions, connectOptions, shouldPublish) { var _this18 = this; - return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { _this18.room = new livekit_client__WEBPACK_IMPORTED_MODULE_2__.Room(roomOptions); const startTime = Date.now(); yield _this18.room.prepareConnection(url, token); @@ -124641,7 +124641,7 @@ class LiveKitService { that.participantConnected(that, participant); }).on(livekit_client__WEBPACK_IMPORTED_MODULE_2__.RoomEvent.Disconnected, that.handleRoomDisconnect).on(livekit_client__WEBPACK_IMPORTED_MODULE_2__.RoomEvent.DataReceived, that.handleData).on(livekit_client__WEBPACK_IMPORTED_MODULE_2__.RoomEvent.ParticipantDisconnected, participant => { that.renderParticipant(participant, true); - }).on(livekit_client__WEBPACK_IMPORTED_MODULE_2__.RoomEvent.Reconnected, /*#__PURE__*/(0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {})).on(livekit_client__WEBPACK_IMPORTED_MODULE_2__.RoomEvent.LocalTrackPublished, pub => { + }).on(livekit_client__WEBPACK_IMPORTED_MODULE_2__.RoomEvent.Reconnected, /*#__PURE__*/(0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {})).on(livekit_client__WEBPACK_IMPORTED_MODULE_2__.RoomEvent.LocalTrackPublished, pub => { const track = pub.track; if (track instanceof livekit_client__WEBPACK_IMPORTED_MODULE_2__.LocalAudioTrack) { const { @@ -124680,7 +124680,7 @@ class LiveKitService { }).on(livekit_client__WEBPACK_IMPORTED_MODULE_2__.RoomEvent.TrackUnsubscribed, (_, pub, participant) => { _this18.renderParticipant(participant); //this.renderScreenShare(this.room); - }).on(livekit_client__WEBPACK_IMPORTED_MODULE_2__.RoomEvent.SignalConnected, /*#__PURE__*/(0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + }).on(livekit_client__WEBPACK_IMPORTED_MODULE_2__.RoomEvent.SignalConnected, /*#__PURE__*/(0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { const signalConnectionTime = Date.now() - startTime; // speed up publishing by starting to publish before it's fully connected // publishing is accepted as soon as signal connection has established @@ -124954,7 +124954,7 @@ class LiveKitService { } toggleAudio(mute) { var _this19 = this; - return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { if (!_this19.room) return false; yield _this19.room.localParticipant.setMicrophoneEnabled(!mute); return _this19.room.localParticipant.isMicrophoneEnabled; @@ -124962,7 +124962,7 @@ class LiveKitService { } toggleVideo(disableCamera) { var _this20 = this; - return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { if (!_this20.room) return false; yield _this20.room.localParticipant.setCameraEnabled(!disableCamera); // Donno why, leaving here for now @@ -124972,7 +124972,7 @@ class LiveKitService { } disconnect() { var _this21 = this; - return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { if (_this21.room) { yield _this21.room.disconnect(); } @@ -124996,9 +124996,9 @@ class LiveKitService { } handleDevicesChanged() { var _this22 = this; - return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { Promise.all(Object.keys(_this22.elementMapping).map( /*#__PURE__*/function () { - var _ref3 = (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (id) { + var _ref3 = (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (id) { const kind = _this22.elementMapping[id]; if (!kind) { return; @@ -125107,7 +125107,7 @@ class VoiceFooterComponent { ngOnDestroy() {} toggleTransmitting() { var _this23 = this; - return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { if (_this23.isTransmitting) { yield _this23.stopTransmitting(); } else { @@ -125117,20 +125117,20 @@ class VoiceFooterComponent { } startTransmitting() { var _this24 = this; - return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { _this24.isTransmitting = yield _this24.livekitService.toggleAudio(false); })(); } stopTransmitting() { var _this25 = this; - return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { _this25.isTransmitting = yield _this25.livekitService.toggleAudio(true); })(); } stopTransmittingLeave() {} onChannelChange(room) { var _this26 = this; - return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { if (room.id === '') { yield _this26.livekitService.disconnect(); } else { @@ -128197,7 +128197,7 @@ class RealtimeGeolocationService { } start() { var _this27 = this; - return (0,_Volumes_USBSSD_dev_Resgrid_Core_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + return (0,G_Resgrid_Resgrid_Web_Resgrid_Web_Areas_User_Apps_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { console.log('SignalR Channel Start()'); _this27.retryCount = 0; if (!_this27.started) { diff --git a/Workers/Resgrid.Workers.Framework/Logic/BroadcastMessageLogic.cs b/Workers/Resgrid.Workers.Framework/Logic/BroadcastMessageLogic.cs index db9c7f6f..fd19df32 100644 --- a/Workers/Resgrid.Workers.Framework/Logic/BroadcastMessageLogic.cs +++ b/Workers/Resgrid.Workers.Framework/Logic/BroadcastMessageLogic.cs @@ -60,10 +60,12 @@ public static async Task ProcessMessageQueueItem(MessageQueueItem mqi) if (mqi.Profiles != null) { var sendingToProfile = mqi.Profiles.FirstOrDefault(x => x.UserId == mqi.Message.ReceivingUserId); + var departmentService = Bootstrapper.GetKernel().Resolve(); + var department = await departmentService.GetDepartmentByIdAsync(mqi.DepartmentId); if (sendingToProfile != null) { - await _communicationService.SendMessageAsync(mqi.Message, name, mqi.DepartmentTextNumber, mqi.DepartmentId, sendingToProfile); + await _communicationService.SendMessageAsync(mqi.Message, name, mqi.DepartmentTextNumber, mqi.DepartmentId, sendingToProfile, department); } else { @@ -72,11 +74,16 @@ public static async Task ProcessMessageQueueItem(MessageQueueItem mqi) if (sender != null) name = sender.FullName.AsFirstNameLastName; + + //TODO: What to do here, I don't know why this path is empty. -SJ } } } else if (mqi.Message.MessageRecipients != null && mqi.Message.MessageRecipients.Any()) { + var departmentService = Bootstrapper.GetKernel().Resolve(); + var department = await departmentService.GetDepartmentByIdAsync(mqi.DepartmentId); + foreach (var recipient in mqi.Message.MessageRecipients) { var sendingToProfile = mqi.Profiles.FirstOrDefault(x => x.UserId == recipient.UserId); @@ -84,7 +91,7 @@ public static async Task ProcessMessageQueueItem(MessageQueueItem mqi) if (sendingToProfile != null) { - await _communicationService.SendMessageAsync(mqi.Message, name, mqi.DepartmentTextNumber, mqi.DepartmentId, sendingToProfile); + await _communicationService.SendMessageAsync(mqi.Message, name, mqi.DepartmentTextNumber, mqi.DepartmentId, sendingToProfile, department); } } } From 2da2fb9a5c21ac0aa947ee58f1a7e2050ba3f6e2 Mon Sep 17 00:00:00 2001 From: Shawn Jackson Date: Wed, 27 Aug 2025 10:45:08 -0700 Subject: [PATCH 4/4] CU-8687aj3gt PR 240 fixes --- Core/Resgrid.Services/PushService.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Core/Resgrid.Services/PushService.cs b/Core/Resgrid.Services/PushService.cs index 191a1548..244b84b9 100644 --- a/Core/Resgrid.Services/PushService.cs +++ b/Core/Resgrid.Services/PushService.cs @@ -144,7 +144,8 @@ public async Task PushNotification(StandardPushMessage message, string use } try { - await _novuProvider.SendUserNotification(message.Title, message.SubTitle, userId, message.DepartmentCode, string.Format("N{0}", message.MessageId), null); + if (!string.IsNullOrWhiteSpace(message.DepartmentCode)) + await _novuProvider.SendUserNotification(message.Title, message.SubTitle, userId, message.DepartmentCode, string.Format("N{0}", message.MessageId), null); } catch (Exception ex) {