feat: hồ sơ khách (ngày sinh, tỉnh/phường theo mã), gộp menu + nút tắt, thông báo theo uuid

- PUT v1/client/update: gender theo enum ClientGender (0 Nam/1 Nữ), thêm
  birthday (cột mới), province_code/ward_code validate theo bảng provinces/wards
  (phường phải thuộc tỉnh). Migration nạp dữ liệu hành chính 2025 từ
  province_ward_import.sql (chỉ bảng trống), API GET v1/provinces[/{code}/wards].
- CustomerObserver/OrderObserver log giá trị cũ bằng getRawOriginal: getOriginal
  trả enum object, nối chuỗi gây 500 khi khách đổi giới tính.
- ClientResource: các cờ trả boolean, CCCD chỉ trả cccd_updated (không lộ ảnh/số).
- GET v1/setting/menu trả cả items + quick_links, bỏ v1/setting/quick-links.
- Thông báo admin/khách tra theo uuid thay vì id tự tăng.
- Chặn gửi template marketing cho khách đã tắt nhận email marketing.
- Xoá ProvinceWardSeeder và Customer::$updatable không dùng.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
baodev0
2026-10-13 16:03:18 +07:00
co-authored by Claude Opus 5.5
parent 12d5b4951c
commit bf78f3b810
30 changed files with 461 additions and 183 deletions
+8 -8
View File
@@ -40,11 +40,11 @@ class ClientMenuTest extends TestCase
$this->withHeaders(['x-access-token' => $this->buildClientAccessToken()])
->getJson('/v1/setting/menu')
->assertOk()
->assertJsonPath('data.0.title', 'Dashboard')
->assertJsonPath('data.0.children', [])
->assertJsonPath('data.1.href', null)
->assertJsonPath('data.1.children.0.href', '/dich-vu/vps')
->assertJsonPath('data.1.children.0.disabled', true);
->assertJsonPath('data.items.0.title', 'Dashboard')
->assertJsonPath('data.items.0.children', [])
->assertJsonPath('data.items.1.href', null)
->assertJsonPath('data.items.1.children.0.href', '/dich-vu/vps')
->assertJsonPath('data.items.1.children.0.disabled', true);
}
public function test_rejects_unsafe_href_and_leaf_without_href(): void
@@ -73,10 +73,10 @@ class ClientMenuTest extends TestCase
->assertOk();
$this->withHeaders(['x-access-token' => $this->buildClientAccessToken()])
->getJson('/v1/setting/quick-links')
->getJson('/v1/setting/menu')
->assertOk()
->assertJsonPath('data.0.title', 'Tạo Cloud VPS')
->assertJsonPath('data.0.disabled', false);
->assertJsonPath('data.quick_links.0.title', 'Tạo Cloud VPS')
->assertJsonPath('data.quick_links.0.disabled', false);
$this->actingAs($admin, 'admin')
->putJson('/api/v1/administrator/client-menu/quick-links', ['items' => [