chore: lint
This commit is contained in:
@@ -20,8 +20,8 @@ interface RobotWorkflow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
interface RobotEditOptions {
|
interface RobotEditOptions {
|
||||||
name: string;
|
name: string;
|
||||||
limit?: number;
|
limit?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ScheduleConfig {
|
interface ScheduleConfig {
|
||||||
@@ -106,25 +106,25 @@ export const RobotEditModal = ({ isOpen, handleStart, handleClose, initialSettin
|
|||||||
if (!robot) return;
|
if (!robot) return;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const payload = {
|
const payload = {
|
||||||
name: robot.recording_meta.name,
|
name: robot.recording_meta.name,
|
||||||
limit: robot.recording.workflow[0]?.what[0]?.args?.[0]?.limit,
|
limit: robot.recording.workflow[0]?.what[0]?.args?.[0]?.limit,
|
||||||
};
|
};
|
||||||
|
|
||||||
const success = await updateRecording(robot.recording_meta.id, payload);
|
const success = await updateRecording(robot.recording_meta.id, payload);
|
||||||
|
|
||||||
if (success) {
|
if (success) {
|
||||||
notify('success', 'Robot updated successfully.');
|
notify('success', 'Robot updated successfully.');
|
||||||
handleStart(robot); // Inform parent about the updated robot
|
handleStart(robot); // Inform parent about the updated robot
|
||||||
handleClose(); // Close the modal
|
handleClose(); // Close the modal
|
||||||
|
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
} else {
|
} else {
|
||||||
notify('error', 'Failed to update the robot. Please try again.');
|
notify('error', 'Failed to update the robot. Please try again.');
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
notify('error', 'An error occurred while updating the robot.');
|
notify('error', 'An error occurred while updating the robot.');
|
||||||
console.error('Error updating robot:', error);
|
console.error('Error updating robot:', error);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user