refactor: update Laravel development best practices and remove debug information from onboarding modal for cleaner user experience
This commit is contained in:
@@ -8,19 +8,6 @@
|
||||
@endphp
|
||||
|
||||
@if($showModal)
|
||||
<!-- Debug: PHP Data Check -->
|
||||
<script>
|
||||
const phpData = {
|
||||
showModal: @json($showModal),
|
||||
slidesCount: @json(count($slides)),
|
||||
currentSlide: @json($currentSlide),
|
||||
slides: @json($preparedSlides),
|
||||
showBackdrop: @json($this->showBackdrop ?? false)
|
||||
};
|
||||
console.log('📦 PHP Data:', phpData);
|
||||
console.log('📊 Prepared Slides:', @json($preparedSlides));
|
||||
</script>
|
||||
|
||||
<div class="onboarding-modal"
|
||||
x-data="{
|
||||
open: @js($showModal),
|
||||
@@ -29,11 +16,6 @@
|
||||
componentId: @js($this->getId()),
|
||||
showBackdrop: @js($this->showBackdrop ?? false),
|
||||
init() {
|
||||
console.log('🚀 Alpine Init - Direct Data');
|
||||
console.log('Slides:', this.slides);
|
||||
console.log('Current Slide:', this.currentSlide);
|
||||
console.log('Slides Length:', this.slides?.length);
|
||||
|
||||
this.$watch('open', value => {
|
||||
document.documentElement.style.overflow = value ? 'hidden' : '';
|
||||
});
|
||||
@@ -123,27 +105,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Debug Info -->
|
||||
<div class="mt-4 p-2 bg-gray-800 rounded text-xs border border-gray-700">
|
||||
<p class="text-gray-400 font-semibold mb-2">🔍 Debug Info:</p>
|
||||
<div class="space-y-1">
|
||||
<p class="text-gray-300">Current Slide: <span class="text-yellow-400" x-text="currentSlide">?</span> (Type: <span x-text="typeof currentSlide">?</span>)</p>
|
||||
<p class="text-gray-300">Total Slides: <span class="text-yellow-400" x-text="slides?.length">?</span></p>
|
||||
<p class="text-gray-300">Slides Array: <span class="text-yellow-400" x-text="JSON.stringify(slides)">?</span></p>
|
||||
<p class="text-gray-300">Has Data: <span class="text-yellow-400" x-text="(slides?.length > 0 && slides[currentSlide]) ? 'Yes ✓' : 'No ✗'">?</span></p>
|
||||
<p class="text-gray-300">Slide Title: <span class="text-yellow-400" x-text="slides[currentSlide]?.title || 'N/A'">?</span></p>
|
||||
<p class="text-gray-300">Alpine Loaded: <span class="text-green-400">Yes ✓</span></p>
|
||||
<hr class="border-gray-700 my-2">
|
||||
<p class="text-gray-400 font-semibold">PHP Data (Server):</p>
|
||||
<p class="text-gray-300">PHP Slides Count: <span class="text-blue-400">{{ count($slides) }}</span></p>
|
||||
<p class="text-gray-300">PHP Current Slide: <span class="text-blue-400">{{ $currentSlide }}</span></p>
|
||||
<p class="text-gray-300">PHP Show Modal: <span class="text-blue-400">{{ $showModal ? 'true' : 'false' }}</span></p>
|
||||
</div>
|
||||
<button @click="console.log('Full Alpine Data:', $data)" class="mt-2 px-2 py-1 bg-blue-600 text-white rounded text-xs">
|
||||
Log Full Data to Console
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Progress Dots -->
|
||||
|
||||
Reference in New Issue
Block a user