diff --git a/extensions/Others/Onboarding/resources/views/modal.blade.php b/extensions/Others/Onboarding/resources/views/modal.blade.php
index ada00b671..dd723633c 100644
--- a/extensions/Others/Onboarding/resources/views/modal.blade.php
+++ b/extensions/Others/Onboarding/resources/views/modal.blade.php
@@ -10,24 +10,62 @@
@if($showModal)
getId()),
- showBackdrop: @js($this->showBackdrop ?? false)
- })"
- x-init="init()">
+ 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' : '';
+ });
+ if (this.open) {
+ document.documentElement.style.overflow = 'hidden';
+ }
+ },
+ get activeSlide() {
+ return this.slides[this.currentSlide] ?? null;
+ },
+ primaryActionLabel(index) {
+ const isLast = index === this.slides.length - 1;
+ if (isLast) return 'Finish';
+ return (this.slides[index]?.is_guided ?? false) ? 'Continue' : 'Next';
+ },
+ previous() {
+ if (this.currentSlide <= 0) return;
+ this.currentSlide--;
+ @this.call('previousSlide');
+ },
+ next() {
+ if (this.currentSlide >= this.slides.length - 1) {
+ this.finish();
+ return;
+ }
+ this.currentSlide++;
+ @this.call('nextSlide');
+ },
+ finish() {
+ @this.call('finish');
+ }
+ }"
- @once
-
- @endonce
@endif