Keep vehicle actions in wheel menu
This commit is contained in:
+29
-41
@@ -485,14 +485,7 @@ const permissions = computed(() => graphPayload.value?.permissions || {});
|
||||
const selectedNode = computed(() => flowNodes.value.find((node) => node.id === selectedNodeId.value) || null);
|
||||
const selectedNodeKind = computed(() => selectedNode.value?.data?.kind || "");
|
||||
const editableNodeKinds = ["question", "condition", "task", "action", "lane"];
|
||||
const managedInspectorNodeKinds = [
|
||||
"runtime_checkpoint",
|
||||
"vehicle_type",
|
||||
"machine_type",
|
||||
"edge_gateway",
|
||||
"relay_binding",
|
||||
"relay",
|
||||
];
|
||||
const managedInspectorNodeKinds = ["runtime_checkpoint", "vehicle_type", "machine_type", "edge_gateway", "relay_binding", "relay"];
|
||||
const isSelectedEditable = computed(() => editableNodeKinds.includes(selectedNodeKind.value));
|
||||
const isSelectedManaged = computed(() => managedInspectorNodeKinds.includes(selectedNodeKind.value));
|
||||
const canDeleteSelected = computed(() =>
|
||||
@@ -805,9 +798,9 @@ const requiredScopeComplete = computed(
|
||||
const scopeGuideCanApply = computed(
|
||||
() => hasLaneScopeValue(scopeGuideDraft.value.lane_id) && hasVehicleScopeValue(scopeGuideDraft.value.vehicle_type_id)
|
||||
);
|
||||
const showScopeGuide = computed(
|
||||
() => Boolean(graphPayload.value) && (!requiredScopeComplete.value || isScopeGuideManuallyOpen.value)
|
||||
);
|
||||
const showScopeGuide = computed(() => (
|
||||
Boolean(graphPayload.value) && (!requiredScopeComplete.value || isScopeGuideManuallyOpen.value)
|
||||
));
|
||||
const isScopeGuideBlocking = computed(() => !requiredScopeComplete.value);
|
||||
const scopeGuideStatusText = computed(() => {
|
||||
if (!lookupRows("lanes").length) {
|
||||
@@ -867,9 +860,9 @@ const selectedSimulatorVehicleTypeRow = computed(() => {
|
||||
lookupRows("vehicle_types").find((vehicleType) => vehicleTypeMatchesFilter(vehicleType, selectedValue)) || null
|
||||
);
|
||||
});
|
||||
const selectedSimulatorVehicleTypeId = computed(() =>
|
||||
const selectedSimulatorVehicleTypeId = computed(() => (
|
||||
selectedSimulatorVehicleTypeRow.value ? parseNullableInt(selectedSimulatorVehicleTypeRow.value.id) : null
|
||||
);
|
||||
));
|
||||
const simulatorScopeSummary = computed(() => ({
|
||||
lane: selectedSimulatorLaneId.value ? labelFor("lanes", selectedSimulatorLaneId.value) : "Select lane",
|
||||
vehicleType:
|
||||
@@ -2325,15 +2318,13 @@ const hideSimulatorCustomerResults = () => {
|
||||
}, 200);
|
||||
};
|
||||
|
||||
const simulatorStorageKey = computed(() =>
|
||||
[
|
||||
"selfserve_studio_simulator",
|
||||
"v1",
|
||||
departmentId.value || 0,
|
||||
normalizeScopeValue(filters.value.lane_id) || "lane",
|
||||
normalizeScopeValue(filters.value.vehicle_type_id) || "vehicle",
|
||||
].join(":")
|
||||
);
|
||||
const simulatorStorageKey = computed(() => [
|
||||
"selfserve_studio_simulator",
|
||||
"v1",
|
||||
departmentId.value || 0,
|
||||
normalizeScopeValue(filters.value.lane_id) || "lane",
|
||||
normalizeScopeValue(filters.value.vehicle_type_id) || "vehicle",
|
||||
].join(":"));
|
||||
|
||||
const readSimulatorStorage = () => {
|
||||
if (typeof window === "undefined") {
|
||||
@@ -3047,9 +3038,9 @@ const selectedTaskId = computed(() =>
|
||||
: null
|
||||
);
|
||||
|
||||
const selectedTaskAttachments = computed(() =>
|
||||
const selectedTaskAttachments = computed(() => (
|
||||
selectedNodeKind.value === "task" ? taskAttachmentList(inspectorForm.value) : []
|
||||
);
|
||||
));
|
||||
|
||||
const inspectorTaskDynamicImageTask = computed(() => {
|
||||
if (selectedNodeKind.value !== "task") {
|
||||
@@ -3621,9 +3612,10 @@ const simulatorDynamicImageThumbPosition = computed(() =>
|
||||
getSelfServeDynamicImageThumbPosition(simulatorPreviewTasks.value)
|
||||
);
|
||||
|
||||
const simulatorDynamicImageCurrentStep = computed(() =>
|
||||
getSelfServeCompletedDynamicImageStep(simulatorPreviewTasks.value, simulatorCompletedTasks.value)
|
||||
);
|
||||
const simulatorDynamicImageCurrentStep = computed(() => getSelfServeCompletedDynamicImageStep(
|
||||
simulatorPreviewTasks.value,
|
||||
simulatorCompletedTasks.value
|
||||
));
|
||||
|
||||
const hasSimulatorDynamicImageContext = computed(
|
||||
() => simulatorDynamicImageButtons.value.length > 0 || simulatorDynamicImageThumbPosition.value !== null
|
||||
@@ -4864,16 +4856,15 @@ const deleteVirtualBinding = (entry) =>
|
||||
role: entry?.binding?.role,
|
||||
});
|
||||
|
||||
const deleteSelectedVirtualBinding = () =>
|
||||
deleteVirtualBinding({
|
||||
binding: {
|
||||
id: inspectorForm.value.id,
|
||||
gateway_key: inspectorForm.value.gateway_key,
|
||||
role: inspectorForm.value.role,
|
||||
},
|
||||
gatewayId: inspectorForm.value.gateway_key,
|
||||
relayId: inspectorForm.value.relay_id,
|
||||
});
|
||||
const deleteSelectedVirtualBinding = () => deleteVirtualBinding({
|
||||
binding: {
|
||||
id: inspectorForm.value.id,
|
||||
gateway_key: inspectorForm.value.gateway_key,
|
||||
role: inspectorForm.value.role,
|
||||
},
|
||||
gatewayId: inspectorForm.value.gateway_key,
|
||||
relayId: inspectorForm.value.relay_id,
|
||||
});
|
||||
|
||||
const resetVirtualHardware = () => applyVirtualHardwareOperation("reset");
|
||||
|
||||
@@ -7335,10 +7326,7 @@ onBeforeUnmount(() => {
|
||||
</div>
|
||||
<h4>{{ data.label }}</h4>
|
||||
<dl class="studio-node-facts">
|
||||
<div>
|
||||
<dt>Scope</dt>
|
||||
<dd>{{ nodeScopeLabel(data) }}</dd>
|
||||
</div>
|
||||
<div><dt>Scope</dt><dd>{{ nodeScopeLabel(data) }}</dd></div>
|
||||
<div>
|
||||
<dt>Visibility</dt>
|
||||
<dd>{{ conditionGateLabel(data) }}</dd>
|
||||
|
||||
@@ -6,7 +6,7 @@ const root = process.cwd();
|
||||
const vehiclesTableSource = readFileSync(join(root, "src/components/displays/user/vehicles/vehiclesTable.vue"), "utf8");
|
||||
|
||||
describe("user vehicles actions visibility contract", () => {
|
||||
it("renders vehicle row actions directly so they are fully visible on the page", () => {
|
||||
expect(vehiclesTableSource).toContain(':displayActionsDirectly="true"');
|
||||
it("keeps vehicle row actions in the wheel menu instead of rendering directly", () => {
|
||||
expect(vehiclesTableSource).toContain(':displayActionsDirectly="false"');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user