we compiled

This commit is contained in:
filipriec
2025-04-18 21:04:36 +02:00
parent d3fcb23e22
commit ef3ecfc73f
4 changed files with 13 additions and 8 deletions

View File

@@ -2,6 +2,7 @@
use crate::state::pages::form::FormState;
use crate::services::grpc_client::GrpcClient;
use crate::state::pages::canvas_state::CanvasState;
use anyhow::{anyhow, Result};
pub async fn handle_action(
action: &str,
@@ -10,7 +11,7 @@ pub async fn handle_action(
current_position: &mut u64,
total_count: u64,
ideal_cursor_column: &mut usize,
) -> Result<String, Box<dyn std::error::Error>> {
) -> Result<String> {
// TODO store unsaved changes without deleting form state values
// First check for unsaved changes in both cases
if form_state.has_unsaved_changes() {
@@ -84,6 +85,7 @@ pub async fn handle_action(
Ok("Already at last entry".into())
}
}
_ => Err("Unknown form action".into())
_ => Err(anyhow!("Unknown form action: {}", action))
}
}