260316:1117 20260316:1100 Refactor UUID
Build and Deploy / deploy (push) Successful in 9m24s

This commit is contained in:
admin
2026-03-16 11:17:15 +07:00
parent b93cd91325
commit c5c3ed9016
92 changed files with 1726 additions and 620 deletions
+5 -5
View File
@@ -16,7 +16,8 @@ import { useSearchSuggestions } from "@/hooks/use-search";
/** Search suggestion item returned from the API */
interface SearchSuggestion {
id: string | number;
uuid: string;
id?: string | number; // Excluded from API responses (ADR-019)
type: string;
title: string;
documentNumber?: string;
@@ -97,12 +98,11 @@ export function GlobalSearch() {
<CommandGroup heading="Suggestions">
{(suggestions as SearchSuggestion[]).map((item) => (
<CommandItem
key={`${item.type}-${item.id}`}
key={`${item.type}-${item.uuid}`}
onSelect={() => {
setQuery(item.title);
// Assumption: item has type and id.
// If type is missing, we might need a map or check usage in backend response
router.push(`/${item.type}s/${item.id}`);
// ADR-019: Use UUID for public routes
router.push(`/${item.type}s/${item.uuid}`);
setOpen(false);
}}
>
@@ -26,7 +26,7 @@ export function NotificationsDropdown() {
const handleNotificationClick = (notification: Notification) => {
if (!notification.isRead) {
markAsRead.mutate(notification.notificationId);
markAsRead.mutate(notification.uuid);
}
if (notification.link) {
router.push(notification.link);