Remove "force nearest department" superuser controls and update related logic in MyWashStart.vue.

This commit is contained in:
Jeppe Bundgaard
2026-01-20 15:44:34 +01:00
parent e29813e1a3
commit b828fb9c77
@@ -1040,17 +1040,6 @@ const onClickDepartmentName = () => {
<template>
<UserDashboardPageWrapper title="Start Wash" subtitle="Vælg et af dine køretøjer for at starte en vask">
<div class="container mb-4" v-if="SessionUser.canAccessSuperUser()">
<div class="columns is-centered">
<div class="column is-narrow">
<b-field label="Gennemtving afdeling (Superuser)">
<b-switch v-model="isForcingNearestDepartment" type="is-danger">
{{ isForcingNearestDepartment ? 'ON' : 'OFF' }}
</b-switch>
</b-field>
</div>
</div>
</div>
<PosDepartmentStepMobile1Location @location-updated="evaluateLocationDepartments"/>
<div class="columns is-multiline">
<!-- Nearest department display -->
@@ -1069,7 +1058,7 @@ const onClickDepartmentName = () => {
<!-- Steps -->
<div class="column is-12">
<section>
<h3 class="title is-4 has-text-centered mb-4 has-text-link" @click="onClickDepartmentName">
<h3 class="title is-4 has-text-centered mb-4 has-text-link">
<b-skeleton v-if="!nearestDepartment" :width="300" :height="24" class="mb-2 is-centered"/>
<span v-else>
<template v-if="isForcingNearestDepartment && isSearchingDepartments">
@@ -1094,9 +1083,18 @@ const onClickDepartmentName = () => {
</b-field>
</template>
<template v-else>
<span :class="{'has-text-link is-clickable': SessionUser.canAccessSuperUser()}" @click="SessionUser.canAccessSuperUser() ? isForcingNearestDepartment = true : null">
<span :class="{'has-text-link is-clickable': SessionUser.canAccessSuperUser()}" @click="onClickDepartmentName">
{{ nearestDepartment ? nearestDepartment.name : 'Indlæser afdeling...' }}
</span>
<!-- Clear forced selection -->
<span v-if="isForcingNearestDepartment" class="ml-2">
<button class="button is-small is-light is-danger" @click="nextTick(() => { isForcingNearestDepartment = false; forceNearestDepartmentEvaluationId = 0; isSearchingDepartments = false; evaluateLocationDepartments(locations.location.value); })">
<span class="icon is-small">
<i class="fas fa-times"></i>
</span>
<span>Ryd valg</span>
</button>
</span>
</template>
</span>
</h3>