@php $svgPath = public_path('images/sidebar-v2'); $icons = []; foreach (['chat','template','message','step','user-add','richmenu','form','auto-reply','qrcode','data-mgmt','booking','shop','chart','tools','wallet','error','logout','arrow-right'] as $name) { $file = $svgPath . '/' . $name . '.svg'; $icons[$name] = file_exists($file) ? file_get_contents($file) : ''; } $starOutline = ''; $starFilled = ''; $arrowRight = $icons['arrow-right']; $routeActive = $routeCurrent = Illuminate\Support\Facades\Route::currentRouteName(); $botId = getBotId(); $count_badge = 0; if ($botId) { $bot = \App\Bots::query()->where('id', $botId)->first(); if (isset($bot)){ $count_badge = !empty($bot->count_user_unconfirm) ? $bot->count_user_unconfirm : 0; } } $count_error = $botId ? totalErrorMessage($botId) : 0; // Map route => badge count để menu お気に入り (favourite) cũng hiển thị badge như menu chính $favBadgeMap = [ 'chatBasicV3' => $count_badge, 'errorListV2' => $count_error, ]; $sections = [ ['label' => 'メッセージ関連', 'short' => 'メイン', 'items' => [ 'chatBasicV3' => ['icon' => 'chat', 'text' => '1:1チャット', 'active' => true, 'badge' => $count_badge, 'submenu' => 'chat'], 'index.msg_template' => ['icon' => 'template', 'text' => 'テンプレート'], 'broadcast.index' => ['icon' => 'message', 'text' => 'メッセージ配信'], 'scenario.index' => ['icon' => 'step', 'text' => 'ステップ配信'], 'setting_action_friend' => ['icon' => 'user-add', 'text' => 'あいさつメッセージ', 'submenu' => 'setting_action_friend'], ]], ['label' => 'よく使われる機能', 'short' => '機能', 'items' => [ 'richMenu' => ['icon' => 'richmenu', 'text' => 'リッチメニュー'], 'form_answer.index' => ['icon' => 'form', 'text' => 'フォーム作成'], 'basicReply' => ['icon' => 'auto-reply', 'text' => '自動応答'], 'landingIndex' => ['icon' => 'qrcode', 'text' => 'QRコードアクション',], 'setting_data' => ['icon' => 'data-mgmt', 'text' => 'データ管理', 'submenu' => 'setting_data'], ]], ['label' => 'その他の機能', 'short' => 'その他', 'items' => [ 'booking' => ['icon' => 'booking', 'text' => '予約管理', 'submenu' => 'booking'], 'sales.index' => ['icon' => 'shop', 'text' => '商品販売'], 'analysis' => ['icon' => 'chart', 'text' => 'データ分析', 'submenu' => 'analysis'], 'tools' => ['icon' => 'tools', 'text' => '便利ツール', 'submenu' => 'tools'], 'paid' => ['icon' => 'wallet', 'text' => '有料プラン限定', 'submenu' => 'paid'], ]], ['label' => 'システム関連', 'short' => '', 'items' => [ 'errorListV2' => ['icon' => 'error', 'text' => '送信エラー', 'badge' => $count_error], 'logout' => ['icon' => 'logout', 'text' => 'ログアウト', 'noStar' => true], ]], ]; // Each sub-item: ['text' => '...'] or ['text' => '...', 'starred' => true] or ['text' => '...', 'noPermission' => true] or ['text' => '...', 'warning' => true] $submenus = [ 'chat' => [ 'chatBasicV3' => ['text' => '1:1チャット'], 'basic.chatSetting' => ['text' => 'チャット設定'], 'index.talk' => ['text' => 'チャット管理'], ], 'setting_action_friend' => [ 'settingAddFriend' => ['text' => '新規友だち用'], 'settingAddFriendOld' => ['text' => '既存友だち用'], 'settingAddFriendUnblock' => ['text' => 'ブロック解除友だち用'], ], 'setting_data' => [ 'tagHome' => ['text' => 'タグ管理'], 'friendInformationList' => ['text' => '友だち情報管理'], 'friendlistHome' => ['text' => '友だちリスト'], 'csvManagement' => ['text' => 'CSV管理'], ], 'booking' => [ 'calendar_salon.index' => ['text' => 'サロン・面談予約', 'starred' => true], 'calendar.index' => ['text' => 'レッスン予約', 'starred' => true], 'list_event.booking_event_day' => ['text' => 'イベント予約'], 'events.index' => ['text' => 'リマインド配信'], ], 'product' => [ 'sales.index' => ['text' => '単品商品'], // 'sales.index' => ['text' => '継続商品'], ], 'analysis' => [ 'urlHome' => ['text' => 'URL分析'], 'index.crossAnalysis' => ['text' => 'クロス分析'], 'index.conversion' => ['text' => 'コンバージョン'], ], 'tools' => [ 'imageRichmenu' => ['text' => 'リッチメニュー画像作成'], 'popup.index' => ['text' => 'ポップアップ'], ], 'paid' => [ 'action-schedules.index' => ['text' => 'アクションスケジュール実行'], 'affiliate-management.index' => ['text' => 'ASP管理'], 'change.bots.new' => ['text' => 'LINE公式アカウント入れ替え'], ], ]; $roleId = null; $isBotInvite = \session('is_bot_invite'); $routeListAccess = ['errorListV2', 'logout']; if ($isBotInvite) { $routeListAccessBotInvite = getMenuRouterBotInvite(); if (empty($routeListAccess)) { $routeListAccess = array(); } if (!empty($routeListAccessBotInvite)) { $routeListAccess = array_merge($routeListAccess, $routeListAccessBotInvite); } $roleId = 2; } @endphp
{{-- Logo --}}
{{-- Toggle button --}}
{{-- Submenu portal --}}
@php $alertIcon = ''; @endphp @foreach($submenus as $key => $items) @endforeach
{{-- Tooltip portal --}}
{{-- Permission error tooltip portal --}}
操作できません
この機能の操作権限が付与されていません。
主管理者に操作権限を付与してもらうことで操作が可能となります。
{{-- Hàm cập nhật badge menu dùng chung cho các màn cần đổi số badge mà không tải lại trang --}}