Platform orders index: expand lead governance quick links
This commit is contained in:
@@ -97,9 +97,29 @@
|
|||||||
'status' => 'pending',
|
'status' => 'pending',
|
||||||
]);
|
]);
|
||||||
@endphp
|
@endphp
|
||||||
|
@php
|
||||||
|
$leadBmpaUrl = $buildLeadGovernUrl([
|
||||||
|
'payment_status' => 'unpaid',
|
||||||
|
'status' => 'pending',
|
||||||
|
]);
|
||||||
|
|
||||||
|
$leadSyncableUrl = $buildLeadGovernUrl([
|
||||||
|
'syncable_only' => '1',
|
||||||
|
'sync_status' => null,
|
||||||
|
'fail_only' => null,
|
||||||
|
]);
|
||||||
|
|
||||||
|
$leadSyncFailedUrl = $buildLeadGovernUrl([
|
||||||
|
'sync_status' => 'failed',
|
||||||
|
'syncable_only' => null,
|
||||||
|
]);
|
||||||
|
@endphp
|
||||||
<div class="mt-6 actions gap-10">
|
<div class="mt-6 actions gap-10">
|
||||||
<a class="btn btn-secondary btn-sm" href="{!! $leadUnpaidUrl !!}">查看待支付(该线索)</a>
|
<a class="btn btn-secondary btn-sm" href="{!! $leadUnpaidUrl !!}">查看待支付(该线索)</a>
|
||||||
<a class="btn btn-secondary btn-sm" href="{!! $leadPaidPendingUrl !!}">查看待生效(该线索)</a>
|
<a class="btn btn-secondary btn-sm" href="{!! $leadPaidPendingUrl !!}">查看待生效(该线索)</a>
|
||||||
|
<a class="btn btn-secondary btn-sm" href="{!! $leadBmpaUrl !!}">查看可BMPA处理(该线索)</a>
|
||||||
|
<a class="btn btn-secondary btn-sm" href="{!! $leadSyncableUrl !!}">查看可同步(该线索)</a>
|
||||||
|
<a class="btn btn-secondary btn-sm" href="{!! $leadSyncFailedUrl !!}">查看同步失败(该线索)</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -0,0 +1,69 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Tests\Feature;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||||
|
use Illuminate\Support\Arr;
|
||||||
|
use Tests\TestCase;
|
||||||
|
|
||||||
|
class AdminPlatformOrderIndexLeadGovernanceQuickLinksExpandedTest extends TestCase
|
||||||
|
{
|
||||||
|
use RefreshDatabase;
|
||||||
|
|
||||||
|
protected function loginAsPlatformAdmin(): void
|
||||||
|
{
|
||||||
|
$this->seed();
|
||||||
|
|
||||||
|
$this->post('/admin/login', [
|
||||||
|
'email' => 'platform.admin@demo.local',
|
||||||
|
'password' => 'Platform@123456',
|
||||||
|
])->assertRedirect('/admin');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function test_index_should_render_expanded_lead_governance_quick_links_when_lead_locked(): void
|
||||||
|
{
|
||||||
|
$this->loginAsPlatformAdmin();
|
||||||
|
|
||||||
|
$leadId = 12;
|
||||||
|
|
||||||
|
$res = $this->get('/admin/platform-orders?' . Arr::query([
|
||||||
|
'lead_id' => $leadId,
|
||||||
|
]));
|
||||||
|
$res->assertOk();
|
||||||
|
|
||||||
|
$res->assertSee('线索治理入口:', false);
|
||||||
|
|
||||||
|
$unpaidUrl = '/admin/platform-orders?' . Arr::query([
|
||||||
|
'lead_id' => $leadId,
|
||||||
|
'payment_status' => 'unpaid',
|
||||||
|
]);
|
||||||
|
|
||||||
|
$paidPendingUrl = '/admin/platform-orders?' . Arr::query([
|
||||||
|
'lead_id' => $leadId,
|
||||||
|
'payment_status' => 'paid',
|
||||||
|
'status' => 'pending',
|
||||||
|
]);
|
||||||
|
|
||||||
|
$bmpaUrl = '/admin/platform-orders?' . Arr::query([
|
||||||
|
'lead_id' => $leadId,
|
||||||
|
'payment_status' => 'unpaid',
|
||||||
|
'status' => 'pending',
|
||||||
|
]);
|
||||||
|
|
||||||
|
$syncableUrl = '/admin/platform-orders?' . Arr::query([
|
||||||
|
'lead_id' => $leadId,
|
||||||
|
'syncable_only' => '1',
|
||||||
|
]);
|
||||||
|
|
||||||
|
$syncFailedUrl = '/admin/platform-orders?' . Arr::query([
|
||||||
|
'lead_id' => $leadId,
|
||||||
|
'sync_status' => 'failed',
|
||||||
|
]);
|
||||||
|
|
||||||
|
$res->assertSee($unpaidUrl, false);
|
||||||
|
$res->assertSee($paidPendingUrl, false);
|
||||||
|
$res->assertSee($bmpaUrl, false);
|
||||||
|
$res->assertSee($syncableUrl, false);
|
||||||
|
$res->assertSee($syncFailedUrl, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user