From ec5ff41bfac60468ead4e7934a42a647e2c32d06 Mon Sep 17 00:00:00 2001 From: Jeppe Bundgaard Date: Tue, 20 Jan 2026 14:35:11 +0100 Subject: [PATCH] Fix inconsistent spacing and indentation in `MyWashStart.vue` for improved readability and maintainability. --- .../userDashboard/wash/MyWashStart.vue | 150 +++++++++--------- 1 file changed, 75 insertions(+), 75 deletions(-) diff --git a/src/views/dashboards/userDashboard/wash/MyWashStart.vue b/src/views/dashboards/userDashboard/wash/MyWashStart.vue index f412303c..258af8b9 100644 --- a/src/views/dashboards/userDashboard/wash/MyWashStart.vue +++ b/src/views/dashboards/userDashboard/wash/MyWashStart.vue @@ -76,7 +76,7 @@ onMounted(async () => { console.log(`MyWashStart [${instanceId}]: timeDiff:`, timeDiff, 'twoHoursMs:', twoHoursMs, 'savedProgress.currentStep:', savedProgress.currentStep); if (timeDiff < twoHoursMs) { console.log(`MyWashStart [${instanceId}]: STARTING RESTORATION.`); - + // Update refs but don't allow saveProgress to trigger washInProgress.value = savedProgress.washInProgress; washLaneId.value = savedProgress.washLaneId; @@ -86,12 +86,12 @@ onMounted(async () => { radioWashType.value = savedProgress.radioWashType; radioLaneOption.value = savedProgress.radioLaneOption; customerNumberInput.value = savedProgress.customerNumberInput; - + if (savedProgress.nearestDepartmentId) { forceNearestDepartmentEvaluationId.value = savedProgress.nearestDepartmentId; } evaluateLocationDepartments(locations.location.value); - + if (washInProgress.value) { startElapsedTimer(); } @@ -215,7 +215,7 @@ const saveProgress = (trigger = 'manual') => { console.log(`MyWashStart [${instanceId}]: saveProgress(${trigger}) BLOCKED because isRestoring is true.`); return; } - + // Stricter protection against saving "reset" state during unmounting/destruction if (isDestroying.value || isDestroyingManual.value || isDestroyingGlobal) { if (trigger !== 'beforeunload') { @@ -227,8 +227,8 @@ const saveProgress = (trigger = 'manual') => { // If we're being asked to save a step 0 while we're in the middle of a wash, // it's almost certainly a reactive reset we don't want to persist. if (washInProgress.value && currentStep.value === 0 && trigger !== 'onStartWash' && trigger !== 'onCloseCompleted') { - console.warn(`MyWashStart [${instanceId}]: saveProgress(${trigger}) BLOCKED - Attempted to save step 0 while wash is in progress.`); - return; + console.warn(`MyWashStart [${instanceId}]: saveProgress(${trigger}) BLOCKED - Attempted to save step 0 while wash is in progress.`); + return; } try { @@ -466,17 +466,17 @@ const getWashStatus = (laneId) => { } // Send the request to get the wash status SessionUser.request('/modules/self-serve/lane/status', 'post', payload) - .then(response => { - if (response.data.success) { - alert('Vaskestatus: ' + (response.data.status || 'Ukendt status.')); - } else { - alert('Fejl ved hentning af vaskestatus: ' + (response.data.message || 'Ukendt fejl.')); - } - }) - .catch(error => { - console.error('Error getting wash status:', error); - alert('Der opstod en fejl ved hentning af vaskestatus. Prøv igen senere.'); - }); + .then(response => { + if (response.data.success) { + alert('Vaskestatus: ' + (response.data.status || 'Ukendt status.')); + } else { + alert('Fejl ved hentning af vaskestatus: ' + (response.data.message || 'Ukendt fejl.')); + } + }) + .catch(error => { + console.error('Error getting wash status:', error); + alert('Der opstod en fejl ved hentning af vaskestatus. Prøv igen senere.'); + }); }; /** @@ -1003,29 +1003,29 @@ watch(() => allVisibleQuestionsAnswered.value, (newValue) => { - +
-

- - +

+ + {{ nearestDepartment ? nearestDepartment.name : 'Indlæser afdeling...' }} -

-
- - +
+
+ + {{ nearestDepartment.address }} -
+

- +

Køretøj

- - - + + + allVisibleQuestionsAnswered.value, (newValue) => {
- +

Start vask

@@ -1104,13 +1104,13 @@ watch(() => allVisibleQuestionsAnswered.value, (newValue) => {
- +
@@ -1161,7 +1161,7 @@ watch(() => allVisibleQuestionsAnswered.value, (newValue) => { - +

Henter data...

@@ -1272,7 +1272,7 @@ watch(() => allVisibleQuestionsAnswered.value, (newValue) => {
- +
allVisibleQuestionsAnswered.value, (newValue) => {
- -
- -

Henter data...

+ +
+ +

Henter data...

+
+
+
+

Vask i gang

+

+ {{ formattedElapsed }} +

-
-
-

Vask i gang

-

- {{ formattedElapsed }} -

-
-
-

Start af maskine

-

Spørgsmål besvaret

-
-
-
- - - -
-
-

{{ task.task }}

-

{{ task.description }}

-
-
- - +
+

Start af maskine

+

Spørgsmål besvaret

+
+
+
+ + + +
+
+

{{ task.task }}

+

{{ task.description }}

+ @@ -1328,9 +1327,10 @@ watch(() => allVisibleQuestionsAnswered.value, (newValue) => {
+
- +

Vask i gang

@@ -1505,7 +1505,7 @@ watch(() => allVisibleQuestionsAnswered.value, (newValue) => { icon-pack="fas" icon-right="info-circle" @click.prevent="SessionUser.functions.contact.onClickCallPhoneNumber()" - >Assistance + >Assistance