Facility location: click-to-pick Neshan map + 'my current location'
- RegisterFacility: '📍 موقعیت فعلی من' (browser geolocation, always available) + Neshan Leaflet map (click/drag marker → fills lat/lng) when a Neshan web key is set; graceful fallback to manual coords without a key - AppSetting.NeshanMapKey configured in /Admin/Settings (Google Maps is blocked in Iran); migration - Verified: location button + inputs render always; map + SDK render once the key is saved Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -36,6 +36,7 @@ public class SettingsModel : PageModel
|
||||
[BindProperty] public string? SmsApiKey { get; set; }
|
||||
[BindProperty] public string? SmsTemplate { get; set; }
|
||||
[BindProperty] public string? SmsSender { get; set; }
|
||||
[BindProperty] public string? NeshanMapKey { get; set; }
|
||||
[TempData] public string? Saved { get; set; }
|
||||
|
||||
public async Task OnGetAsync()
|
||||
@@ -64,6 +65,7 @@ public class SettingsModel : PageModel
|
||||
SmsApiKey = s.SmsApiKey;
|
||||
SmsTemplate = s.SmsTemplate;
|
||||
SmsSender = s.SmsSender;
|
||||
NeshanMapKey = s.NeshanMapKey;
|
||||
}
|
||||
|
||||
public async Task<IActionResult> OnPostAsync()
|
||||
@@ -93,6 +95,7 @@ public class SettingsModel : PageModel
|
||||
SmsApiKey = SmsApiKey,
|
||||
SmsTemplate = SmsTemplate,
|
||||
SmsSender = SmsSender,
|
||||
NeshanMapKey = NeshanMapKey,
|
||||
});
|
||||
Saved = "تنظیمات ذخیره شد.";
|
||||
return RedirectToPage();
|
||||
|
||||
Reference in New Issue
Block a user