Add catalog sync trigger, metrics, and shipping label actions to integrations.
Deploy Ladill Woo Manager / deploy (push) Successful in 1m5s
Deploy Ladill Woo Manager / deploy (push) Successful in 1m5s
Surfaces actionable controls in Ladill instead of status-only cards: sync catalogs via the plugin proxy, show channel metrics, and link to orders/labels for fulfillment. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -5,6 +5,7 @@ namespace App\Http\Controllers\Woo;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Controllers\Woo\Concerns\ResolvesWooContext;
|
||||
use App\Services\Woo\IntegrationStatusService;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\View\View;
|
||||
|
||||
@@ -27,7 +28,7 @@ class IntegrationController extends Controller
|
||||
]);
|
||||
}
|
||||
|
||||
public function refresh(Request $request): \Illuminate\Http\RedirectResponse
|
||||
public function refresh(Request $request): RedirectResponse
|
||||
{
|
||||
$store = $this->currentStore($request);
|
||||
if ($store) {
|
||||
@@ -40,4 +41,14 @@ class IntegrationController extends Controller
|
||||
? 'Integration status refreshed.'
|
||||
: 'Connect a store to refresh integration status.');
|
||||
}
|
||||
|
||||
public function sync(Request $request, string $integration): RedirectResponse
|
||||
{
|
||||
$store = $this->currentStore($request);
|
||||
$result = $this->integrations->syncCatalog($store, $integration);
|
||||
|
||||
return redirect()
|
||||
->route('woo.integrations.index')
|
||||
->with($result['success'] ? 'success' : 'error', $result['message']);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user