HEX
Server: nginx/1.18.0
System: Linux test-ipsremont 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
User: ips (1000)
PHP: 8.0.30
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/quadcode/storage/framework/views/d6fc5cffad9d4282dd13d77905c6263c35818e5b.php
<?php

use App\Models\ActiveCampaignList;
use App\Models\BitrixAcSyncSetting;
use App\Models\BitrixStatuses;
use Illuminate\Database\Eloquent\Collection;

/**
 * @var array $skipIds
 * @var Collection|BitrixAcSyncSetting[] $bitrixAcSyncSettings
 * @var array $entitiesMap
 * @var Collection|ActiveCampaignList[] $activeCampaignList
 * @var Collection|BitrixStatuses[] $bitrixStatuses
 */

$error = session()->get('error');
$message = session()->get('message');
$log = session()->get('log');

?>
<?php $__env->startPush('head'); ?>
    <!-- Scripts -->
    <?php echo app('Illuminate\Foundation\Vite')(['resources/js/settings.js']); ?>
<?php $__env->stopPush(); ?>

<?php if (isset($component)) { $__componentOriginal8e2ce59650f81721f93fef32250174d77c3531da = $component; } ?>
<?php $component = App\View\Components\AppLayout::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('app-layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\AppLayout::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
     <?php $__env->slot('header', null, []); ?> 
        <h2 class="font-semibold text-xl text-gray-800 leading-tight">
            <?php echo e(__('Dashboard')); ?>

        </h2>
     <?php $__env->endSlot(); ?>

    <?php if(!empty($message)): ?>
        <div class="pt-6">
            <div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
                <div class="p-4 text-sm text-green-800 rounded-lg bg-green-50 " role="alert">
                    <span class="font-medium"><?php echo e($message); ?></span>
                    <?php if(!empty($log)): ?>
                        <br>
                        <?php echo join('<br>',$log); ?>

                    <?php endif; ?>
                </div>
            </div>
        </div>
    <?php endif; ?>
    <?php if(!empty($error)): ?>
        <div class="pt-6">
            <div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
                <div class="p-4 text-sm text-red-800 rounded-lg bg-red-50 " role="alert">
                    <span class="font-medium"><?php echo e($error); ?></span>
                </div>
            </div>
        </div>
    <?php endif; ?>
    <div class="pt-6 max-w-7xl mx-auto sm:px-6 lg:px-8 flex justify-end gap-3">
        <a href="<?php echo e(route('sync.statuses')); ?>" class="btn <?php echo e(empty($bitrixStatuses) ? 'btn-red' : 'btn-blue'); ?>"><span>Sync Bitrix statuses</span></a>
        <a href="<?php echo e(route('sync.lists')); ?>" class="btn <?php echo e(empty($activeCampaignList) ? 'btn-red' : 'btn-blue'); ?>"><span>Sync AC lists</span></a>
    </div>
    <div class="pt-6 max-w-7xl mx-auto sm:px-6 lg:px-8">
        <div class="bg-white overflow-hidden shadow-sm sm:rounded-lg">
            <div class="bg-white overflow-hidden shadow-sm sm:rounded-lg">
                <div class="p-6 bg-white border-b border-gray-200">
                    <form action="<?php echo e(route('dashboard')); ?>">
                        <div class="flex align-items-center gap-x-2">
                            <select id="entityId" name="entity_id" class="select w-[130px]">
                                <option value="">Select entity</option>
                                <?php $__currentLoopData = $entitiesMap; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $entityId => $entityName): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <option value="<?php echo e($entityId); ?>"><?php echo e($entityName); ?></option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>
                            <select id="bitrixStatus" name="bitrix_status" class="select w-[210px] hidden">
                                <option value="">Select status</option>
                                <?php $__currentLoopData = $bitrixStatuses; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $entityId => $statuses): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <?php $__currentLoopData = $statuses; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $statusId => $status): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <?php if(in_array($status['id'],$skipIds)): ?>
                                            <?php continue; ?>
                                        <?php endif; ?>
                                        <option value="<?php echo e($statusId); ?>" class="filter-<?php echo e($entityId); ?> hidden"><?php echo e($status['name']); ?></option>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>
                            <select id="listId" name="list_id" class="select w-[250px]">
                                <option value="">Select list</option>
                                <?php $__currentLoopData = $activeCampaignList; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $listId => $list): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <option value="<?php echo e($listId); ?>"><?php echo e($list['name']); ?></option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>
                            <div class="flex">
                                <div class="flex items-center me-4">
                                    <input id="withUnsubscribe" type="checkbox" value="1" class="checkbox">
                                    <label for="withUnsubscribe" class="ms-2 text-sm font-medium text-gray-900 ">Unsubscribe deleted</label>
                                </div>
                            </div>
                            <a id="createSync" class="btn btn-blue ml-auto disabled"><span>Create</span></a>
                        </div>
                    </form>
                    <p id="leadInfo" class="pt-3 text-gray-500 text-xs hidden">Data from Bitrix leads is retrieved for the last 2 weeks of lead activity</p>
                    <div id="createResultText" class="p-4 mt-4 text-sm text-blue-800 rounded-lg bg-blue-50" role="alert">
                        <p class="pt-3 text-gray-600 text-xs hidden"></p>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="pt-6 max-w-7xl mx-auto sm:px-6 lg:px-8">
        <div class="bg-white overflow-hidden shadow-sm sm:rounded-lg">
            <table class="min-w-full table">
                <thead class="border-b">
                <tr>
                    <th class="dashboard-cell dashboard-header-cell">Entity ID</th>
                    <th class="dashboard-cell dashboard-header-cell">Birix status</th>
                    <th class="dashboard-cell dashboard-header-cell">AC list ID</th>
                    <th class="dashboard-cell dashboard-header-cell">Unsubscribe deleted</th>
                    <th class="dashboard-cell dashboard-header-cell">Last sync at</th>
                    <th class="dashboard-cell dashboard-header-cell">Last updated count</th>
                    <th class="dashboard-cell dashboard-header-cell">Actions</th>
                </tr>
                </thead>
                <tbody>
                <?php $__currentLoopData = $bitrixAcSyncSettings; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $bitrixAcSyncSetting): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <?php
                        $bitrixStatusName = $bitrixStatuses[$bitrixAcSyncSetting->entity_id][$bitrixAcSyncSetting->bitrix_status]['name'] ?? null;
                        $activeCampaignListName = $activeCampaignList[$bitrixAcSyncSetting->active_campaign_list_id]['name'] ?? null;
                        $select = is_null($bitrixStatusName) || is_null($activeCampaignListName) ? ' error' : '';
                    ?>
                    <tr class="table-row<?php echo e($select); ?>">
                        <td class="dashboard-cell dashboard-content-cell"><?php echo e($entitiesMap[$bitrixAcSyncSetting->entity_id]); ?></td>
                        <td class="dashboard-cell dashboard-content-cell"><?php echo $bitrixStatusName ?? 'Undefined<br><span class="text-gray-600 text-xs">need sync statuses or delete</span>'; ?></td>
                        <td class="dashboard-cell dashboard-content-cell"><?php echo $activeCampaignListName ?? 'Undefined<br><span class="text-gray-600 text-xs">need sync lists or delete</span>'; ?></td>
                        <td class="dashboard-cell dashboard-content-cell"><?php echo e($bitrixAcSyncSetting->with_unsubscribe ? 'Yes' : 'No'); ?></td>
                        <td class="dashboard-cell dashboard-content-cell"><?php echo e($bitrixAcSyncSetting->last_sync_at); ?></td>
                        <td class="dashboard-cell dashboard-content-cell text-center"><?php echo e($bitrixAcSyncSetting->last_updated_count); ?></td>
                        <td class="dashboard-cell dashboard-content-cell">
                            <a class="js-delete-row font-medium text-blue-600 hover:underline" href="<?php echo e(route('sync.delete', ['bitrixAcSyncSetting' => $bitrixAcSyncSetting->id])); ?>"><span>Delete</span></a>
                        </td>
                    </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </tbody>
            </table>
        </div>
    </div>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal8e2ce59650f81721f93fef32250174d77c3531da)): ?>
<?php $component = $__componentOriginal8e2ce59650f81721f93fef32250174d77c3531da; ?>
<?php unset($__componentOriginal8e2ce59650f81721f93fef32250174d77c3531da); ?>
<?php endif; ?>
<?php /**PATH /var/www/quadcode/resources/views/dashboard.blade.php ENDPATH**/ ?>