devanada commited on
Commit
95e6b99
·
verified ·
1 Parent(s): 478c47e

hide the order preview before user input the file

Browse files
Files changed (2) hide show
  1. index.html +3 -3
  2. script.js +1 -2
index.html CHANGED
@@ -54,13 +54,13 @@
54
  <i data-feather="refresh-cw" class="w-4 h-4 mr-1"></i> Refresh
55
  </button>
56
  </div>
57
- <div id="preview-container" class="bg-gray-50 rounded-lg p-4 min-h-40 border border-gray-200">
58
  <div id="empty-state" class="text-center py-10">
59
  <i data-feather="file-text" class="w-10 h-10 mx-auto text-gray-400"></i>
60
  <p class="mt-2 text-gray-500">No data to preview. Upload a file to see the preview.</p>
61
  </div>
62
- <div id="preview-content" class="hidden overflow-x-auto">
63
- <table class="min-w-full divide-y divide-gray-200">
64
  <thead id="preview-head" class="bg-gray-100">
65
  <!-- Headers will be inserted here -->
66
  </thead>
 
54
  <i data-feather="refresh-cw" class="w-4 h-4 mr-1"></i> Refresh
55
  </button>
56
  </div>
57
+ <div id="preview-container" class="hidden bg-gray-50 rounded-lg p-4 min-h-40 border border-gray-200">
58
  <div id="empty-state" class="text-center py-10">
59
  <i data-feather="file-text" class="w-10 h-10 mx-auto text-gray-400"></i>
60
  <p class="mt-2 text-gray-500">No data to preview. Upload a file to see the preview.</p>
61
  </div>
62
+ <div id="preview-content" class="overflow-x-auto">
63
+ <table class="min-w-full divide-y divide-gray-200">
64
  <thead id="preview-head" class="bg-gray-100">
65
  <!-- Headers will be inserted here -->
66
  </thead>
script.js CHANGED
@@ -166,9 +166,8 @@ const dropzone = document.getElementById('dropzone');
166
  }
167
  function showPreview(data) {
168
  emptyState.classList.add('hidden');
169
- previewContent.classList.remove('hidden');
170
  previewContainer.classList.remove('hidden');
171
- showPreviewLink.textContent = 'Hide Preview';
172
  // Clear previous preview
173
  previewHead.innerHTML = '';
174
  previewBody.innerHTML = '';
 
166
  }
167
  function showPreview(data) {
168
  emptyState.classList.add('hidden');
 
169
  previewContainer.classList.remove('hidden');
170
+ showPreviewLink.textContent = 'Hide Preview';
171
  // Clear previous preview
172
  previewHead.innerHTML = '';
173
  previewBody.innerHTML = '';