Restructuring and navigator
All checks were successful
Build Docker image / build (push) Successful in 2m0s
Build Docker image / deploy (push) Successful in 3s
Build Docker image / verify (push) Successful in 27s

This commit is contained in:
Roman Krček
2025-07-18 13:59:28 +02:00
parent 1a8ce546d4
commit 8e41c6d78f
8 changed files with 572 additions and 508 deletions

View File

@@ -2,6 +2,7 @@
import { selectedSheet, columnMapping, rawSheetData, currentStep } from '$lib/stores';
import { getSheetNames, getSheetData } from '$lib/google';
import { onMount } from 'svelte';
import Navigator from './subcomponents/Navigator.svelte';
// Type definitions for better TypeScript support
interface ColumnMappingType {
@@ -444,8 +445,6 @@
} catch (err) {
console.error('Failed to save column mapping to localStorage:', err);
}
currentStep.set(4); // Move to next step
}
async function handleShowEditor() {
@@ -754,20 +753,12 @@
{/if}
<!-- Navigation -->
<div class="flex justify-between">
<button
onclick={() => currentStep.set(2)}
class="rounded-lg bg-gray-200 px-4 py-2 font-medium text-gray-700 hover:bg-gray-300"
>
← Back to Sheet Selection
</button>
<button
onclick={handleContinue}
disabled={!mappingComplete}
class="rounded-lg bg-blue-600 px-4 py-2 font-medium text-white hover:bg-blue-700 disabled:cursor-not-allowed disabled:bg-gray-400"
>
{mappingComplete ? 'Continue →' : 'Select a column mapping'}
</button>
</div>
<Navigator
canProceed={mappingComplete}
{currentStep}
textBack="Back to Sheet Selection"
textForwardDisabled="Select a column mapping"
textForwardEnabled="Continue"
onForward={handleContinue}
/>
</div>