feat: Add XML file management functionality
- Created XmlFiles control class for handling XML file views and regeneration. - Implemented method to retrieve clients with XML feeds in the factory class. - Added database migration to include google_merchant_account_id in clients table. - Created migrations for products_keyword_planner_terms and products_merchant_sync_log tables. - Added campaign_keywords table migration for managing campaign keyword data. - Developed main view template for displaying XML files and their statuses. - Introduced a debug script for analyzing product URLs and their statuses.
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
<th style="width: 60px;">#ID</th>
|
||||
<th>Nazwa klienta</th>
|
||||
<th>Google Ads Customer ID</th>
|
||||
<th>Merchant Account ID</th>
|
||||
<th>Dane od</th>
|
||||
<th style="width: 120px; text-align: center;">Akcje</th>
|
||||
</tr>
|
||||
@@ -30,6 +31,13 @@
|
||||
<span class="text-muted">— brak —</span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if ( !empty( $client['google_merchant_account_id'] ) ): ?>
|
||||
<span class="badge-id"><?= htmlspecialchars( $client['google_merchant_account_id'] ); ?></span>
|
||||
<?php else: ?>
|
||||
<span class="text-muted">— brak —</span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if ( $client['google_ads_start_date'] ): ?>
|
||||
<?= $client['google_ads_start_date']; ?>
|
||||
@@ -49,7 +57,7 @@
|
||||
<?php endforeach; ?>
|
||||
<?php else: ?>
|
||||
<tr>
|
||||
<td colspan="5" class="empty-state">
|
||||
<td colspan="6" class="empty-state">
|
||||
<i class="fa-solid fa-building"></i>
|
||||
<p>Brak klientów. Dodaj pierwszego klienta.</p>
|
||||
</td>
|
||||
@@ -78,6 +86,11 @@
|
||||
<label for="client-gads-id">Google Ads Customer ID</label>
|
||||
<input type="text" id="client-gads-id" name="google_ads_customer_id" class="form-control" placeholder="np. 123-456-7890 (opcjonalnie)" />
|
||||
</div>
|
||||
<div class="settings-field">
|
||||
<label for="client-gmc-id">Merchant Account ID</label>
|
||||
<input type="text" id="client-gmc-id" name="google_merchant_account_id" class="form-control" placeholder="np. 123456789 (opcjonalnie)" />
|
||||
<small class="text-muted">ID konta Merchant Center przypisane do klienta</small>
|
||||
</div>
|
||||
<div class="settings-field">
|
||||
<label for="client-gads-start">Pobieraj dane od</label>
|
||||
<input type="date" id="client-gads-start" name="google_ads_start_date" class="form-control" />
|
||||
@@ -99,6 +112,7 @@ function openClientForm()
|
||||
$( '#client-id' ).val( '' );
|
||||
$( '#client-name' ).val( '' );
|
||||
$( '#client-gads-id' ).val( '' );
|
||||
$( '#client-gmc-id' ).val( '' );
|
||||
$( '#client-gads-start' ).val( '' );
|
||||
$( '#client-modal' ).fadeIn();
|
||||
}
|
||||
@@ -115,6 +129,7 @@ function editClient( id )
|
||||
$( '#client-id' ).val( data.id );
|
||||
$( '#client-name' ).val( data.name );
|
||||
$( '#client-gads-id' ).val( data.google_ads_customer_id || '' );
|
||||
$( '#client-gmc-id' ).val( data.google_merchant_account_id || '' );
|
||||
$( '#client-gads-start' ).val( data.google_ads_start_date || '' );
|
||||
$( '#client-modal' ).fadeIn();
|
||||
} );
|
||||
@@ -126,10 +141,17 @@ function deleteClient( id, name )
|
||||
title: 'Potwierdzenie',
|
||||
content: 'Czy na pewno chcesz usunąć klienta <strong>' + name + '</strong>?',
|
||||
type: 'red',
|
||||
onContentReady: function() {
|
||||
if ( this['$$confirm'] && this['$$confirm'].length )
|
||||
{
|
||||
this['$$confirm'].trigger( 'focus' );
|
||||
}
|
||||
},
|
||||
buttons: {
|
||||
confirm: {
|
||||
text: 'Usuń',
|
||||
btnClass: 'btn-red',
|
||||
keys: [ 'enter' ],
|
||||
action: function() {
|
||||
$.post( '/clients/delete', { id: id }, function( response ) {
|
||||
var data = JSON.parse( response );
|
||||
|
||||
Reference in New Issue
Block a user