From 7614ef482d6d6becbf5cac7f67e6eb7220bddfe2 Mon Sep 17 00:00:00 2001 From: Jeppe Bundgaard Date: Mon, 23 Feb 2026 19:44:29 +0100 Subject: [PATCH] Add force enable/disable machine actions to ActionSettingsWheelButton - Implemented new actions for force enabling and disabling machines in `ActionSettingsWheelButton.vue`. - Display success message on login in `LoginForm.vue` and handle reload with delay. - Adjusted form input handling and error/success message display across auth-related components and forms. - Included form ID attributes and improved message visibility for user feedback. --- .../buttons/ActionSettingsWheelButton.vue | 38 ++++++++++ .../superuser/tables/departmentLanesTable.vue | 61 --------------- .../forms/auth/LoginEmployeeForm.vue | 8 +- src/components/forms/auth/LoginForm.vue | 24 ++++-- .../forms/auth/SubuserLoginForm.vue | 14 ++-- src/views/pages/auth/CustomerCreationPage.vue | 74 +++++++++++++------ .../auth/PasswordResetConfirmationPage.vue | 8 +- src/views/pages/auth/PasswordResetPage.vue | 12 +-- 8 files changed, 131 insertions(+), 108 deletions(-) diff --git a/src/components/displays/buttons/ActionSettingsWheelButton.vue b/src/components/displays/buttons/ActionSettingsWheelButton.vue index 901ec7e3..54af1cb4 100644 --- a/src/components/displays/buttons/ActionSettingsWheelButton.vue +++ b/src/components/displays/buttons/ActionSettingsWheelButton.vue @@ -339,6 +339,28 @@ const defaultActions = computed(() => { return !!props.department_lane_id && SessionUser.canAccessSuperUser(); }, }, + { + icon: 'fas fa-play', + label: t('superuser.department_lane.force_enable_machine'), + template: 'success', + clickAction: () => { + return SessionUser.objects.department_lanes.functions.forceEnableMachine(props.department_lane_id); + }, + showFunction: () => { + return !!props.department_lane_id && SessionUser.canAccessSuperUser(); + }, + }, + { + icon: 'fas fa-stop', + label: t('superuser.department_lane.force_disable_machine'), + template: 'danger', + clickAction: () => { + return SessionUser.objects.department_lanes.functions.forceDisableMachine(props.department_lane_id); + }, + showFunction: () => { + return !!props.department_lane_id && SessionUser.canAccessSuperUser(); + }, + }, /** Orders actions */ { label: SessionUser.functions.ucFirst(SessionUser.objects.orders.meta.labels.single), @@ -728,6 +750,22 @@ const defaultActions = computed(() => { icon="fas fa-external-link-alt" :click-action="() => SessionUser.functions.redirectTo.superUser('/department/lanes/' + props.department_lane_id, true)" /> + + + +