fix: una sola conexión Google en Agencia (quitar botón duplicado)

El panel orgánico ya no ofrece Conectar: solo emparejar/actualizar
sobre el OAuth del panel 1.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
4Ventures
2026-09-24 12:13:28 +02:00
parent d137b5796a
commit 5d04a79de7
2 changed files with 12 additions and 19 deletions

View File

@@ -92,12 +92,13 @@ export default function DriveConnectPanel() {
<HardDrive className="w-5 h-5 text-brand-400 mt-0.5 shrink-0" /> <HardDrive className="w-5 h-5 text-brand-400 mt-0.5 shrink-0" />
<div> <div>
<h3 className="text-sm font-semibold text-gray-900"> <h3 className="text-sm font-semibold text-gray-900">
Google agencia (Drive + GA4 + GSC) 1 · Conectar Google (única cuenta)
</h3> </h3>
<p className="text-xs text-gray-600 mt-0.5 max-w-xl"> <p className="text-xs text-gray-600 mt-0.5 max-w-xl">
Conecta <strong className="text-gray-800">marketing@4ventures.es</strong>. Una sola conexión con{' '}
Concede Drive, Analytics y Search Console. Luego usa el panel <strong className="text-gray-800">marketing@4ventures.es</strong>.
orgánico para emparejar y sincronizar. En el consentimiento acepta Drive, Analytics y Search Console.
Sirve para carpetas Drive y para Orgánico (panel de abajo).
</p> </p>
</div> </div>
</div> </div>

View File

@@ -128,24 +128,16 @@ export default function GoogleOrganicPanel() {
<Leaf className="w-5 h-5 text-lime-600 mt-0.5 shrink-0" /> <Leaf className="w-5 h-5 text-lime-600 mt-0.5 shrink-0" />
<div> <div>
<h3 className="text-sm font-semibold text-gray-900"> <h3 className="text-sm font-semibold text-gray-900">
Google orgánico · GA4 + Search Console 2 · Orgánico (GA4 + Search Console)
</h3> </h3>
<p className="text-xs text-gray-600 mt-0.5 max-w-xl"> <p className="text-xs text-gray-600 mt-0.5 max-w-xl">
Usa el mismo OAuth de{' '} No es otra cuenta: usa la conexión del panel 1. Aquí solo
<strong className="text-gray-800">marketing@4ventures.es</strong>{' '} emparejas propiedades/sites a cada cliente y actualizas datos.
(Drive + Analytics + GSC). Empareja propiedades/sites a fichas y Luego se mantienen al día solos.
sincroniza a Orgánico. Los datos se mantienen al día solos (al abrir
la vista + cron diario).
</p> </p>
</div> </div>
</div> </div>
<div className="flex flex-wrap gap-2"> <div className="flex flex-wrap gap-2">
<a
href="/api/admin/drive/connect"
className="inline-flex items-center gap-1.5 text-xs font-semibold px-3 py-1.5 rounded-lg bg-brand-500 text-white hover:bg-brand-600"
>
{connected ? 'Reconectar Google' : 'Conectar Google'}
</a>
<button <button
type="button" type="button"
disabled={!connected || busy !== null} disabled={!connected || busy !== null}
@@ -177,7 +169,7 @@ export default function GoogleOrganicPanel() {
{connected ? ( {connected ? (
<p className="text-xs text-emerald-700"> <p className="text-xs text-emerald-700">
Conectado{email ? ` · ${email}` : ''} Misma conexión{email ? ` · ${email}` : ''}
{hasAnalytics ? ' · Analytics ✓' : ' · Analytics ✗'} {hasAnalytics ? ' · Analytics ✓' : ' · Analytics ✗'}
{hasGsc ? ' · GSC ✓' : ' · GSC ✗'} {hasGsc ? ' · GSC ✓' : ' · GSC ✗'}
{ga4Count || gscCount {ga4Count || gscCount
@@ -186,8 +178,8 @@ export default function GoogleOrganicPanel() {
</p> </p>
) : ( ) : (
<p className="text-xs text-amber-800 bg-amber-50 border border-amber-200 rounded-lg px-3 py-2"> <p className="text-xs text-amber-800 bg-amber-50 border border-amber-200 rounded-lg px-3 py-2">
Conecta Google (botón arriba o panel Drive). Debe aceptar scopes de Primero pulsa «Conectar Google» en el panel 1 (arriba) y acepta
Analytics y Search Console además de Drive. Analytics + Search Console además de Drive.
</p> </p>
)} )}