hardcoded adresar to general form
This commit is contained in:
@@ -24,8 +24,6 @@ pub async fn handle_core_action(
|
||||
auth_client: &mut AuthClient,
|
||||
terminal: &mut TerminalCore,
|
||||
app_state: &mut AppState,
|
||||
current_position: &mut u64,
|
||||
total_count: u64,
|
||||
) -> Result<EventOutcome> {
|
||||
match action {
|
||||
"save" => {
|
||||
@@ -36,8 +34,6 @@ pub async fn handle_core_action(
|
||||
let save_outcome = form_save(
|
||||
form_state,
|
||||
grpc_client,
|
||||
current_position,
|
||||
total_count,
|
||||
).await.context("Register save action failed")?;
|
||||
let message = match save_outcome {
|
||||
SaveOutcome::NoChange => "No changes to save.".to_string(),
|
||||
@@ -58,8 +54,6 @@ pub async fn handle_core_action(
|
||||
let save_outcome = form_save(
|
||||
form_state,
|
||||
grpc_client,
|
||||
current_position,
|
||||
total_count,
|
||||
).await?;
|
||||
match save_outcome {
|
||||
SaveOutcome::NoChange => "No changes to save.".to_string(),
|
||||
@@ -81,8 +75,6 @@ pub async fn handle_core_action(
|
||||
let message = form_revert(
|
||||
form_state,
|
||||
grpc_client,
|
||||
current_position,
|
||||
total_count,
|
||||
).await.context("Form revert x action failed")?;
|
||||
Ok(EventOutcome::Ok(message))
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ pub async fn handle_edit_event(
|
||||
// TODO: Implement common actions for AddLogic if needed
|
||||
format!("Action '{}' not implemented for Add Logic in edit mode.", action)
|
||||
} else { // Assuming Form view
|
||||
let outcome = form_e::execute_common_action(action, form_state, grpc_client, current_position, total_count).await?;
|
||||
let outcome = form_e::execute_common_action(action, form_state, grpc_client).await?;
|
||||
match outcome {
|
||||
EventOutcome::Ok(msg) | EventOutcome::DataSaved(_, msg) => msg,
|
||||
_ => format!("Unexpected outcome from common action: {:?}", outcome),
|
||||
|
||||
@@ -129,8 +129,6 @@ impl EventHandler {
|
||||
admin_state: &mut AdminState,
|
||||
buffer_state: &mut BufferState,
|
||||
app_state: &mut AppState,
|
||||
total_count: u64,
|
||||
current_position: &mut u64,
|
||||
) -> Result<EventOutcome> {
|
||||
let mut current_mode = ModeManager::derive_mode(app_state, self, admin_state);
|
||||
|
||||
@@ -484,8 +482,6 @@ impl EventHandler {
|
||||
&mut self.auth_client,
|
||||
terminal,
|
||||
app_state,
|
||||
current_position,
|
||||
total_count,
|
||||
)
|
||||
.await;
|
||||
}
|
||||
@@ -503,8 +499,8 @@ impl EventHandler {
|
||||
&mut admin_state.add_table_state,
|
||||
&mut admin_state.add_logic_state,
|
||||
&mut self.key_sequence_tracker,
|
||||
current_position,
|
||||
total_count,
|
||||
form_state.current_position,
|
||||
form_state.total_count,
|
||||
grpc_client,
|
||||
&mut self.command_message,
|
||||
&mut self.edit_mode_cooldown,
|
||||
@@ -545,8 +541,8 @@ impl EventHandler {
|
||||
&mut admin_state.add_table_state,
|
||||
&mut admin_state.add_logic_state,
|
||||
&mut self.key_sequence_tracker,
|
||||
current_position,
|
||||
total_count,
|
||||
form_state.current_position,
|
||||
form_state.total_count,
|
||||
grpc_client,
|
||||
&mut self.command_message,
|
||||
&mut self.edit_mode_cooldown,
|
||||
@@ -570,8 +566,6 @@ impl EventHandler {
|
||||
&mut self.auth_client,
|
||||
terminal,
|
||||
app_state,
|
||||
current_position,
|
||||
total_count,
|
||||
)
|
||||
.await;
|
||||
}
|
||||
@@ -587,8 +581,6 @@ impl EventHandler {
|
||||
register_state,
|
||||
admin_state,
|
||||
&mut self.ideal_cursor_column,
|
||||
current_position,
|
||||
total_count,
|
||||
grpc_client,
|
||||
app_state,
|
||||
)
|
||||
@@ -677,8 +669,6 @@ impl EventHandler {
|
||||
grpc_client,
|
||||
command_handler,
|
||||
terminal,
|
||||
current_position,
|
||||
total_count,
|
||||
)
|
||||
.await?;
|
||||
self.command_mode = false;
|
||||
|
||||
Reference in New Issue
Block a user