update JobsViewModel
This commit is contained in:
@@ -5,7 +5,8 @@
|
||||
"Bash(git add .)",
|
||||
"Bash(git commit -m \"$(cat <<''EOF''\nInitial commit: FieldLogger MAUI app with Maglink BLE support\n\nAdded Maglink RTK GNSS receiver integration with correct BLE UUIDs and device name filtering (ML-* prefix).\n\n🤖 Generated with [Claude Code](https://claude.com/claude-code)\n\nCo-Authored-By: Claude <noreply@anthropic.com>\nEOF\n)\")",
|
||||
"Read(//d/maglink/**)",
|
||||
"Bash(git add -A)"
|
||||
"Bash(git add -A)",
|
||||
"Bash(git commit -m \"$(cat <<''EOF''\nAdd Debug page and fix BLE communication issues\n\nMajor changes:\n- Added Debug tab with real-time message logging and hex viewer\n- Implemented timed data logging ($UMTDL command) per API v1.3\n- Fixed BLE message parsing to handle notifications without line endings\n- Added Schema 2 support (22-field timed logging packets)\n- Updated Maglink BLE UUIDs (fff0/fff1/fff2)\n- Added connection timeout (10s) to prevent hanging on unavailable devices\n- Added connection status display and manual push-button logging trigger\n- Improved retry logging with attempt numbers and delays\n- Added console window allocation for Windows debug output\n- Added BLE disconnect on app close\n\nBug fixes:\n- Fixed device name filtering for Maglink (ML-* prefix)\n- Fixed RtkGps enum reference in DeviceScanViewModel\n- Fixed DebugMessage namespace (moved to Models)\n\n🤖 Generated with [Claude Code](https://claude.com/claude-code)\n\nCo-Authored-By: Claude <noreply@anthropic.com>\nEOF\n)\")"
|
||||
],
|
||||
"deny": [],
|
||||
"ask": []
|
||||
|
||||
@@ -65,14 +65,34 @@ public sealed partial class JobsViewModel : ObservableObject
|
||||
[RelayCommand]
|
||||
private async Task NewJobAsync()
|
||||
{
|
||||
var name = await Shell.Current.DisplayPromptAsync("New Job", "Job name:",
|
||||
placeholder: $"Job {DateTime.Now:yyyy-MM-dd}");
|
||||
if (string.IsNullOrWhiteSpace(name))
|
||||
return;
|
||||
try
|
||||
{
|
||||
Console.WriteLine("NewJobAsync: Starting...");
|
||||
var name = await Shell.Current.DisplayPromptAsync("New Job", "Job name:",
|
||||
placeholder: $"Job {DateTime.Now:yyyy-MM-dd}");
|
||||
Console.WriteLine($"NewJobAsync: User entered: '{name}'");
|
||||
|
||||
var job = await _database.CreateJobAsync(name.Trim());
|
||||
_settings.ActiveJobId = job.Id;
|
||||
await RefreshAsync();
|
||||
if (string.IsNullOrWhiteSpace(name))
|
||||
{
|
||||
Console.WriteLine("NewJobAsync: Name was empty, cancelling");
|
||||
return;
|
||||
}
|
||||
|
||||
Console.WriteLine($"NewJobAsync: Creating job '{name.Trim()}'");
|
||||
var job = await _database.CreateJobAsync(name.Trim());
|
||||
Console.WriteLine($"NewJobAsync: Job created with ID {job.Id}");
|
||||
|
||||
_settings.ActiveJobId = job.Id;
|
||||
Console.WriteLine($"NewJobAsync: Set active job to {job.Id}");
|
||||
|
||||
await RefreshAsync();
|
||||
Console.WriteLine("NewJobAsync: Refresh complete");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"NewJobAsync: ERROR - {ex.Message}");
|
||||
Console.WriteLine($"NewJobAsync: Stack trace - {ex.StackTrace}");
|
||||
}
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
|
||||
2
run.bat
Normal file
2
run.bat
Normal file
@@ -0,0 +1,2 @@
|
||||
@echo off
|
||||
dotnet build FieldLogger/FieldLogger.csproj -f net9.0-windows10.0.19041.0 -t:Run
|
||||
Reference in New Issue
Block a user