@php $tutorial_video = trim(config('app.TUTORIAL_VIDEO_URL')); $tutorial_admin = trim(config('app.TUTORIAL_ADMIN_URL')); $tutorial_themes = [ /* [ 'name'=>'FMCG Theme', 'url'=>'https://voucher-fmcg.skale.today', 'active' => 'active', ], [ 'name'=>'Mall Theme', 'url'=>'https://voucher-mall.skale.today', ], [ 'name'=>'Cosmetic Theme', 'url'=>'https://voucher-cosmetic.skale.today', ], [ 'name'=>'Fashion Theme', 'url'=>'https://voucher-fashion.skale.today' ] */ ]; $accounts = \App\Models\BusinessAccounts::select(['id', 'company_name', 'hostname']) ->whereNotNull('slug') ->get(); $curr_host = parse_url(url('/')); $curr_host = $curr_host['host']; foreach ($accounts as $account) { $is_selected = $account->hostname === $curr_host; $tutorial_themes[] = [ 'name' => $account->company_name, 'url' => $is_selected ? 'javascript:void(0);' : route('change_business_account', ['business_account' => $account->id, 'type' => 'home']), //'https://' . $account->hostname, 'selected' => $is_selected, ]; } $tutorial_projects = [ /* [ 'name'=>'Theme 1', 'url'=>'https://voucher-cosmetic.skale.today/assets/images/voucher/Voucher_500x395.png', 'image' => '/assets/images/voucher/Voucher_500x395.png', ], [ 'name'=>'Theme 1', 'url'=>'https://voucher-cosmetic.skale.today/assets/images/voucher/Voucher_500x395.png', 'image' => '/assets/images/voucher/Voucher_500x395.png', ], [ 'name'=>'Theme 1', 'url'=>'https://voucher-cosmetic.skale.today/assets/images/voucher/Voucher_500x395.png', 'image' => '/assets/images/voucher/Voucher_500x395.png', ], [ 'name'=>'Theme 1', 'url'=>'https://voucher-cosmetic.skale.today/assets/images/voucher/Voucher_500x395.png', 'image' => '/assets/images/voucher/Voucher_500x395.png', ], */ ]; $tutorial_steps = [ 'home_page'=> [ 'name'=>__('tutorials_digital_voucher.toolbar_heading_home_page'), 'path'=>'/', 'content'=>[ 'home_banner'=> [ 'name'=>__('tutorials_digital_voucher.toolbar_menu_home_banner'), 'popup_id'=>'tutorial_home_banner', 'script' => 'doShowHideHomeBanner', ], 'flash_promo'=> [ 'name'=>__('tutorials_digital_voucher.toolbar_menu_flash_promo'), 'popup_id'=>'tutorial_flash_promo', 'script' => 'doShowHideFlashPromo', ], 'category_bar'=> [ 'name'=>__('tutorials_digital_voucher.toolbar_menu_category_bar'), 'popup_id'=>'tutorial_category_bar', 'script' => 'doShowHideCategoryBar', ], 'first_voucher'=> [ 'name'=>__('tutorials_digital_voucher.toolbar_menu_first_voucher'), 'popup_id'=>'tutorial_first_voucher', 'script' => 'doShowHideFirstVoucher', ], 'voucher_download'=> [ 'name'=>__('tutorials_digital_voucher.toolbar_menu_voucher_details'), 'popup_id'=>'tutorial_voucher_download', 'script' => 'doShowHideVoucherDownload', ], 'msg_proceed_voucher_wallet'=> [ 'name'=>__('tutorials_digital_voucher.toolbar_menu_voucher_wallet'), 'popup_id'=>'tutorial_proceed_voucher_wallet', 'script' => 'doCtaToVoucherWallet', ], ], ], 'vouchers_page'=>[ 'name'=>__('tutorials_digital_voucher.toolbar_heading_my_voucher_page'), 'path'=>'my', 'content'=>[ 'voucher_redemption'=>[ 'name'=>__('tutorials_digital_voucher.toolbar_menu_voucher_redeem'), 'popup_id'=>'tutorial_voucher_redemption', 'script' => 'doShowHideVoucherRedemption', ], 'voucher_redemption_pin'=>[ 'name'=>__('tutorials_digital_voucher.toolbar_menu_redemption_pin'), 'popup_id'=>'tutorial_voucher_redemption_pin', 'script' => 'doShowHideVoucherRedemptionPin', ], 'promotional_method'=>[ 'name'=>__('tutorials_digital_voucher.toolbar_menu_promotion_method'), 'popup_id'=>'tutorial_promotional_method', 'script' => 'doShowHidePromotionMethod', ], 'redemption_complete'=>[ 'name'=>__('tutorials_digital_voucher.toolbar_menu_redemption_complete'), 'popup_id'=>'redemption_complete', 'script' => 'doShowHideRedemptionComplete', ], 'get_in_touch' => [ 'name' => __('tutorials_common.toolbar_menu_get_in_touch'), 'popup_id' => 'tutorial_get_in_touch', 'script' => 'doShowHideGetInTouch', ], ], ], ]; $tutorial_data = [ [ 'id' => 'tutorial_theme_selection', 'text' => 'tutorials_common.tutorial_theme_selection', ], [ 'id' => 'tutorial_tut_progress_panel', 'text' => 'tutorials_common.tutorial_tut_progress_panel', ], ]; @endphp {{ __('tutorials_digital_voucher.heading_voucher_demo') }} {{ __('tutorials_common.label_guided_tutorial') }} @if($tutorial_video) {{ __('tutorials_common.label_watch_a_video_tutorial') }} @endif @if($tutorial_steps) {{ __('tutorials_common.btn_resume_tutorial') }} @foreach($tutorial_steps as $slug => $step) @php $curr_page = $step['path'] == Request::path(); @endphp {{$step['name']}} @if($step['content']) @endif @if($step['content']) @foreach($step['content'] as $inner_slug =>$inner_step) {{$inner_step['name']}} @endforeach @endif @endforeach @endif @if($tutorial_admin) {{-- --}} {{ __('tutorials_common.label_learn_about_admin_dashboard') }} @endif {{ __('tutorials_common.label_select_thems_for_this_demo') }} @foreach($tutorial_themes as $theme) @if($theme['selected']) {{ $theme['name']}} @endif @endforeach @foreach($tutorial_themes as $theme) {{$theme['name']}} @endforeach @if($tutorial_projects) {{ __('tutorials_common.label_preview_other_demo_projects') }} @foreach($tutorial_projects as $proj) @endforeach @endif {!! __( htmlentities(__('tutorials_common.label_contact_enquiry')), [ 'contact_email' => 'help@skale.today', ]) !!} @foreach($tutorial_data as $tutorial) @component('components.utility.template_floating_container', ['id' => $tutorial['id']]) {{ __($tutorial['text']) }} @endcomponent @endforeach