platform_orders index: add is-compact class and compact density styles
This commit is contained in:
@@ -86,6 +86,10 @@
|
|||||||
.platform-orders-table .col-optional{display:none;}
|
.platform-orders-table .col-optional{display:none;}
|
||||||
.platform-orders-table.is-full .col-optional{display:table-cell;}
|
.platform-orders-table.is-full .col-optional{display:table-cell;}
|
||||||
|
|
||||||
|
/* 平台订单列表(精简视图):进一步收敛信息密度 */
|
||||||
|
.platform-orders-table.is-compact td{padding-top:8px;padding-bottom:8px;}
|
||||||
|
.platform-orders-table.is-compact .muted-xs{font-size:12px;}
|
||||||
|
|
||||||
/* 平台订单列表:精简视图也要可达的治理提示(对账/退款不一致) */
|
/* 平台订单列表:精简视图也要可达的治理提示(对账/退款不一致) */
|
||||||
.platform-orders-table .governance-hints{margin-bottom:6px;}
|
.platform-orders-table .governance-hints{margin-bottom:6px;}
|
||||||
.platform-orders-table .governance-hint{line-height:1.4;}
|
.platform-orders-table .governance-hint{line-height:1.4;}
|
||||||
|
|||||||
@@ -996,7 +996,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-wrap">
|
<div class="table-wrap">
|
||||||
<table class="table-nowrap platform-orders-table {{ $isFullView ? 'is-full' : '' }}">
|
<table class="table-nowrap platform-orders-table {{ $isFullView ? 'is-full' : 'is-compact' }}">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>ID</th>
|
<th>ID</th>
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Tests\Feature;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||||
|
use Tests\TestCase;
|
||||||
|
|
||||||
|
class AdminPlatformOrderIndexCompactViewHasIsCompactClassTest 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_compact_view_table_has_is_compact_class_full_view_has_is_full(): void
|
||||||
|
{
|
||||||
|
$this->loginAsPlatformAdmin();
|
||||||
|
|
||||||
|
$this->get('/admin/platform-orders')
|
||||||
|
->assertOk()
|
||||||
|
->assertSee('platform-orders-table is-compact', false)
|
||||||
|
->assertDontSee('platform-orders-table is-full', false);
|
||||||
|
|
||||||
|
$this->get('/admin/platform-orders?view=full')
|
||||||
|
->assertOk()
|
||||||
|
->assertSee('platform-orders-table is-full', false)
|
||||||
|
->assertDontSee('platform-orders-table is-compact', false);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user