diff --git a/Manager.Interfaces/DTO/SectionDTO.cs b/Manager.Interfaces/DTO/SectionDTO.cs index d3dfbd1..0067687 100644 --- a/Manager.Interfaces/DTO/SectionDTO.cs +++ b/Manager.Interfaces/DTO/SectionDTO.cs @@ -21,5 +21,10 @@ namespace Manager.Interfaces.DTO public DateTime dateCreation { get; set; } // == Include section type info public int order { get; set; } // Order to show public string instanceId { get; set; } + public string latitude { get; set; } // MyVisit - Use to launch automatic content when current location is near + public string longitude { get; set; } // MyVisit - Use to launch automatic content when current location is near + public int? meterZoneGPS { get; set; } // MyVisit - Nbr of meters of the zone to launch content + public bool isBeacon { get; set; } // MyVisit - True if section use beacon, false otherwise + public string beaconId { get; set; } // MyVisit - Beacon' identifier } } diff --git a/Manager.Interfaces/DTO/SubSection/ArticleDTO.cs b/Manager.Interfaces/DTO/SubSection/ArticleDTO.cs index 64c6830..2145a3e 100644 --- a/Manager.Interfaces/DTO/SubSection/ArticleDTO.cs +++ b/Manager.Interfaces/DTO/SubSection/ArticleDTO.cs @@ -8,7 +8,6 @@ namespace Manager.Interfaces.DTO public class ArticleDTO { public List content { get; set; } - public string qrCode { get; set; } // MyVisit - QR code identifier int ? String ? public bool isContentTop { get; set; } // MyVisit - True if content is displayed at top, false otherwise public List audioIds { get; set; } public bool isReadAudioAuto { get; set; } // MyVisit - True for audio play when open the article / false otherwise diff --git a/Manager.Interfaces/Models/Section.cs b/Manager.Interfaces/Models/Section.cs index 8f5149c..8ec6d02 100644 --- a/Manager.Interfaces/Models/Section.cs +++ b/Manager.Interfaces/Models/Section.cs @@ -65,6 +65,21 @@ namespace Manager.Interfaces.Models [BsonRequired] public string InstanceId { get; set; } + [BsonElement("IsBeacon")] + public bool IsBeacon { get; set; } + + [BsonElement("BeaconId")] + public string BeaconId { get; set; } + + [BsonElement("Latitude")] + public string Latitude { get; set; } + + [BsonElement("Longitude")] + public string Longitude { get; set; } + + [BsonElement("MeterZoneGPS")] + public int? MeterZoneGPS { get; set; } + public SectionDTO ToDTO() { return new SectionDTO() @@ -83,6 +98,11 @@ namespace Manager.Interfaces.Models data = Data, dateCreation = DateCreation, instanceId = InstanceId, + isBeacon = IsBeacon, + beaconId = BeaconId, + latitude = Latitude, + longitude = Longitude, + meterZoneGPS = MeterZoneGPS, }; } } diff --git a/ManagerService/Controllers/ConfigurationController.cs b/ManagerService/Controllers/ConfigurationController.cs index 057c37e..f7e9453 100644 --- a/ManagerService/Controllers/ConfigurationController.cs +++ b/ManagerService/Controllers/ConfigurationController.cs @@ -463,6 +463,11 @@ namespace ManagerService.Controllers newSection.ParentId = section.parentId; newSection.Data = section.data; newSection.DateCreation = section.dateCreation; + newSection.IsBeacon = section.isBeacon; + newSection.BeaconId = section.beaconId; + newSection.Latitude = section.latitude; + newSection.Longitude = section.longitude; + newSection.MeterZoneGPS = section.meterZoneGPS; if (newSection.ImageId != null) { diff --git a/ManagerService/Controllers/SectionController.cs b/ManagerService/Controllers/SectionController.cs index c599ac3..f0eb641 100644 --- a/ManagerService/Controllers/SectionController.cs +++ b/ManagerService/Controllers/SectionController.cs @@ -266,6 +266,12 @@ namespace ManagerService.Controllers section.Title = new List(); section.Description = new List(); section.Order = _sectionService.GetAllFromConfiguration(newSection.configurationId).Count; + section.IsBeacon = newSection.isBeacon; + section.BeaconId = newSection.beaconId; + section.Latitude = newSection.latitude; + section.Longitude = newSection.longitude; + section.MeterZoneGPS = newSection.meterZoneGPS; + // Preparation List languages = _configuration.GetSection("SupportedLanguages").Get>(); @@ -490,6 +496,11 @@ namespace ManagerService.Controllers section.IsSubSection = updatedSection.isSubSection; section.ParentId = updatedSection.parentId; section.Data = updatedSection.data; + section.IsBeacon = updatedSection.isBeacon; + section.BeaconId = updatedSection.beaconId; + section.Latitude = updatedSection.latitude; + section.Longitude = updatedSection.longitude; + section.MeterZoneGPS = updatedSection.meterZoneGPS; Section sectionModified = _sectionService.Update(updatedSection.id, section);