diff --git a/AlgoTecture.TelegramBot/Controllers/MainController.cs b/AlgoTecture.TelegramBot/Controllers/MainController.cs
index 5a71a46..c2b709b 100644
--- a/AlgoTecture.TelegramBot/Controllers/MainController.cs
+++ b/AlgoTecture.TelegramBot/Controllers/MainController.cs
@@ -133,12 +133,12 @@ public async Task PressToManageContract()
}
[Action]
- private async Task PressAddressToRentButton(string geoAdminFeatureId)
+ private async Task PressAddressToRentButton(TelegramToAddressModel telegramToAddressModel)
{
var chatId = Context.GetSafeChatId();
if (!chatId.HasValue) return;
- var targetAddress = _telegramToAddressResolver.TryGetAddressListByChatId(chatId.Value).FirstOrDefault(x => x.FeatureId == geoAdminFeatureId);
+ var targetAddress = _telegramToAddressResolver.TryGetAddressListByChatId(chatId.Value).FirstOrDefault(x => x.FeatureId == telegramToAddressModel.FeatureId);
var targetSpace = await _spaceGetter.GetByCoordinates(targetAddress.latitude, targetAddress.longitude);
@@ -146,9 +146,10 @@ private async Task PressAddressToRentButton(string geoAdminFeatureId)
if (targetSpace == null)
{
- var formattedGeoAdminFeatureId = !string.IsNullOrEmpty(geoAdminFeatureId) ? geoAdminFeatureId.Split('_')[0] : string.Empty;
+ var formattedGeoAdminFeatureId = !string.IsNullOrEmpty(telegramToAddressModel.FeatureId) ? telegramToAddressModel.FeatureId.Split('_')[0] : string.Empty;
PushL("This space will soon be available for rent. Go to space properties or /start to try again");
- var urlToAddressProperties = $"https://algotecture.io/webapi-qrcode/spacePropertyPage?featureId={formattedGeoAdminFeatureId}";
+
+ var urlToAddressProperties = $"https://algotecture.io/webapi-qrcode/spacePropertyPage?featureId={formattedGeoAdminFeatureId}&label={telegramToAddressModel.Address}";
RowButton("Go to space properties", urlToAddressProperties);
await SendOrUpdate();
}
@@ -194,7 +195,7 @@ private async Task EnterAddress()
Address = label.label
};
telegramToAddressList.Add(telegramToAddressModel);
- RowButton(label.label, Q(PressAddressToRentButton, label.featureId));
+ RowButton(label.label, Q(PressAddressToRentButton, telegramToAddressModel));
}
if (!labels.Any())
diff --git a/AlgoTecture.WebApi.QrCode/Models/GeoAdminBuildingViewModel.cs b/AlgoTecture.WebApi.QrCode/Models/GeoAdminBuildingViewModel.cs
new file mode 100644
index 0000000..2ae4e57
--- /dev/null
+++ b/AlgoTecture.WebApi.QrCode/Models/GeoAdminBuildingViewModel.cs
@@ -0,0 +1,26 @@
+namespace AlgoTecture.WebApi.QrCode.Models;
+
+public class GeoAdminBuildingViewModel
+{
+ public string BuildingYear { get; set; }
+
+ public string BuildingCategory { get; set; }
+
+ public string BuildingClass { get; set; }
+
+ public string BuildingName { get; set; }
+
+ public string Levels { get; set; }
+
+ public string Area { get; set; }
+
+ public string FloorArea { get; set; }
+
+ public string Flats { get; set; }
+
+ public string PlaceName { get; set; }
+
+ public string MunicipalityId { get; set; }
+
+ public string MunicipalityName { get; set; }
+}
\ No newline at end of file
diff --git a/AlgoTecture.WebApi.QrCode/Pages/SpacePropertyPage.cshtml b/AlgoTecture.WebApi.QrCode/Pages/SpacePropertyPage.cshtml
index 53425de..7448681 100644
--- a/AlgoTecture.WebApi.QrCode/Pages/SpacePropertyPage.cshtml
+++ b/AlgoTecture.WebApi.QrCode/Pages/SpacePropertyPage.cshtml
@@ -4,22 +4,22 @@
ViewData["Title"] = "Home page";
}
@{
- - Municipality Name: @Model.GeoAdminBuilding.MunicipalityName
- - Municipality Id: @Model.GeoAdminBuilding.MunicipalityId
- - Place Name: @Model.GeoAdminBuilding.PlaceName
- - Building Name: @Model.GeoAdminBuilding.BuildingName
- - Building Year: @Model.GeoAdminBuilding.BuildingYear
- - Building Category: @Model.GeoAdminBuilding.BuildingCategory
- - Building Class: @Model.GeoAdminBuilding.BuildingClass
- - Levels: @Model.GeoAdminBuilding.Levels
- - Area: @Model.GeoAdminBuilding.Area
- - Floor Area: @Model.GeoAdminBuilding.FloorArea
- - Flats: @Model.GeoAdminBuilding.Flats
+ - Municipality Name: @Model.GeoAdminBuildingView.MunicipalityName
+ - Municipality Id: @Model.GeoAdminBuildingView.MunicipalityId
+ - Place Name: @Model.GeoAdminBuildingView.PlaceName
+ - Building Name: @Model.GeoAdminBuildingView.BuildingName
+ - Building Year: @Model.GeoAdminBuildingView.BuildingYear
+ - Building Category: @Model.GeoAdminBuildingView.BuildingCategory
+ - Building Class: @Model.GeoAdminBuildingView.BuildingClass
+ - Levels: @Model.GeoAdminBuildingView.Levels
+ - Area: @Model.GeoAdminBuildingView.Area
+ - Floor Area: @Model.GeoAdminBuildingView.FloorArea
+ - Flats: @Model.GeoAdminBuildingView.Flats