feat: add campaign alerts feature with alerts management and UI integration
- Introduced a new `CampaignAlerts` class for handling alerts logic. - Added database migration for `campaign_alerts` table creation. - Implemented methods for fetching, marking, and deleting alerts in the `CampaignAlerts` factory class. - Created a new view for displaying campaign alerts with filtering options. - Updated the main client view to include a badge for the number of alerts. - Enhanced sync functionality to support campaigns and products separately. - Adjusted styles for alert badges in the UI.
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
<script src="/libraries/framework/vendor/plugins/moment/pl.js"></script>
|
||||
<script src="/libraries/framework/vendor/plugins/datepicker/js/bootstrap-datetimepicker.js"></script>
|
||||
<script src="/libraries/framework/vendor/plugins/daterange/daterangepicker.js"></script>
|
||||
<script src="/libraries/adspro-dialog.js">
|
||||
<script src="/libraries/adspro-dialog.js"></script>
|
||||
<script src="/libraries/select2/js/select2.full.min.js"></script>
|
||||
<script src="/libraries/functions.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/2.1.7/css/dataTables.bootstrap5.min.css">
|
||||
@@ -37,7 +37,7 @@
|
||||
<body class="logged">
|
||||
<?php
|
||||
$module = $this -> current_module;
|
||||
$google_ads_modules = [ 'campaigns', 'campaign_terms', 'products', 'clients', 'xml_files' ];
|
||||
$google_ads_modules = [ 'campaigns', 'campaign_terms', 'products', 'campaign_alerts', 'clients', 'xml_files' ];
|
||||
$is_google_ads_module = in_array( $module, $google_ads_modules, true );
|
||||
?>
|
||||
<!-- Sidebar -->
|
||||
@@ -78,6 +78,15 @@
|
||||
<span>Produkty</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="<?= $module === 'campaign_alerts' ? 'active' : '' ?>">
|
||||
<a href="/campaign_alerts">
|
||||
<i class="fa-solid fa-triangle-exclamation"></i>
|
||||
<span>Alerty</span>
|
||||
<?php if ( (int) ( $this -> campaign_alerts_count ?? 0 ) > 0 ): ?>
|
||||
<span class="badge-alerts-count"><?= (int) $this -> campaign_alerts_count; ?></span>
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
</li>
|
||||
<li class="<?= $module === 'clients' ? 'active' : '' ?>">
|
||||
<a href="/clients">
|
||||
<i class="fa-solid fa-building"></i>
|
||||
@@ -135,6 +144,7 @@
|
||||
'campaigns' => 'Kampanie',
|
||||
'campaign_terms' => 'Grupy i frazy',
|
||||
'products' => 'Produkty',
|
||||
'campaign_alerts' => 'Alerty',
|
||||
'clients' => 'Klienci',
|
||||
'xml_files' => 'Pliki XML',
|
||||
'allegro' => 'Allegro import',
|
||||
|
||||
Reference in New Issue
Block a user