customer: Sichtbarkeit belegen - Aufrufe im Verlauf, Newsroom-Uebersicht (Roadmap 1c)
- VisibilityStats: Firmen-Kennzahlen ueber alle Meldungen, Aufrufe je Meldung (30 Tage), lueckenlose Tagesreihe (Tage vor der Zaehlung sind null, nicht 0), Sitemap-seit und Google-Suchlink (Indexierung Variante B). - Firmenseite: alle Meldungen der Firma statt nur eigene (Beansprucher sahen eine leere Liste), Aufrufe-Spalten, echtes Statistik-Panel. - Meldungsseite: Panel Sichtbarkeit mit SVG-Tagesbalken 30/90 Tage. - Claim aus der Veroeffentlichungsmail landet auf der Meldung (payload press_release_id), Mail-Hinweis erweitert, ein Element (E4). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
36691a5b13
commit
09ec866aac
14 changed files with 676 additions and 59 deletions
|
|
@ -6,6 +6,7 @@ use App\Enums\ConversionEventType;
|
|||
use App\Http\Controllers\Controller;
|
||||
use App\Listeners\RecordAuthActivity;
|
||||
use App\Models\MagicLink;
|
||||
use App\Models\PressRelease;
|
||||
use App\Services\Conversion\ConversionRecorder;
|
||||
use App\Services\Customer\CustomerCompanyContext;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
|
|
@ -106,6 +107,18 @@ class MagicLinkConsumeController extends Controller
|
|||
if ($landingCompanyId > 0 && $user->canAccessCustomer() && ! $user->canAccessAdmin()
|
||||
&& $this->companies->findFor($user, $landingCompanyId) !== null) {
|
||||
$home = route('me.press-kits.show', ['id' => $landingCompanyId], absolute: false);
|
||||
|
||||
// Aus der Veröffentlichungsmail (Roadmap 1c.2): direkt auf die
|
||||
// Meldung mit ihren Aufrufen, wenn der Account sie sehen darf.
|
||||
$landingPressReleaseId = (int) ($magicLink->payload['press_release_id'] ?? 0);
|
||||
|
||||
if ($landingPressReleaseId > 0) {
|
||||
$pressRelease = PressRelease::query()->withoutGlobalScopes()->whereKey($landingPressReleaseId)->where('company_id', $landingCompanyId)->first();
|
||||
|
||||
if ($pressRelease !== null && $user->can('view', $pressRelease)) {
|
||||
$home = route('me.press-releases.show', ['id' => $landingPressReleaseId], absolute: false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return redirect($home);
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ namespace App\Http\Controllers\Web;
|
|||
use App\Enums\ConversionSource;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Company;
|
||||
use App\Models\PressRelease;
|
||||
use App\Scopes\PortalScope;
|
||||
use App\Services\Company\MergedNewsroomLookup;
|
||||
use App\Services\Company\NewsroomClaimService;
|
||||
|
|
@ -70,11 +71,27 @@ class NewsroomClaimController extends Controller
|
|||
|
||||
// Enumeration-sicher: dieselbe Meldung, ob ein Konto deaktiviert ist
|
||||
// oder nicht — die Adresse ist ohnehin nur maskiert sichtbar.
|
||||
$this->claims->request($company, $request->ip(), $this->sourceOf($request));
|
||||
$this->claims->request($company, $request->ip(), $this->sourceOf($request), $this->landingPressReleaseId($request, $company));
|
||||
|
||||
return back()->with('newsroom-claim-status', __('static.newsroom_claim.flash_sent'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Kam der Besucher aus der Veröffentlichungsmail einer Meldung (`pr` im
|
||||
* Link), landet er nach dem Login auf genau dieser Meldung samt Aufrufen
|
||||
* (Roadmap 1c.2) — sofern sie wirklich zu dieser Firma gehört.
|
||||
*/
|
||||
private function landingPressReleaseId(Request $request, Company $company): ?int
|
||||
{
|
||||
$id = (int) $request->input('pr', 0);
|
||||
|
||||
if ($id <= 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return PressRelease::query()->withoutGlobalScopes()->whereKey($id)->where('company_id', $company->getKey())->exists() ? $id : null;
|
||||
}
|
||||
|
||||
private function resolveMissing(WebPortalContext $context, string $edition, string $slug): Response|RedirectResponse
|
||||
{
|
||||
$survivor = $this->mergedNewsrooms->survivorFor($context->portalValues, $slug);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue