260228:1559 20260228:16:00 fix drawings pageSize and add reference_date to schema
Some checks failed
Build and Deploy / deploy (push) Failing after 52s
Some checks failed
Build and Deploy / deploy (push) Failing after 52s
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
'use client';
|
||||
|
||||
import { DrawingCard } from '@/components/drawings/card';
|
||||
import { useDrawings } from '@/hooks/use-drawing';
|
||||
import { Drawing } from '@/types/drawing';
|
||||
import { Loader2 } from 'lucide-react';
|
||||
import { useState } from 'react';
|
||||
import { PaginationState, SortingState } from '@tanstack/react-table';
|
||||
import { ServerDataTable } from '@/components/documents/common/server-data-table';
|
||||
@@ -32,12 +29,11 @@ export function DrawingList({ type, projectId, filters }: DrawingListProps) {
|
||||
const {
|
||||
data: response,
|
||||
isLoading,
|
||||
isError,
|
||||
} = useDrawings(type, {
|
||||
projectId,
|
||||
...filters,
|
||||
page: pagination.pageIndex + 1, // API is 1-based
|
||||
pageSize: pagination.pageSize,
|
||||
limit: pagination.pageSize,
|
||||
} as any);
|
||||
|
||||
const drawings = response?.data || [];
|
||||
|
||||
@@ -1044,8 +1044,10 @@ CREATE TABLE attachments (
|
||||
uploaded_by_user_id INT NOT NULL COMMENT 'ผู้อัปโหลดไฟล์',
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT 'วันที่อัปโหลด',
|
||||
expires_at DATETIME NULL COMMENT 'เวลาหมดอายุของไฟล์ Temp',
|
||||
CHECKSUM VARCHAR(64) NULL COMMENT 'SHA -256 Checksum',
|
||||
FOREIGN KEY (uploaded_by_user_id) REFERENCES users (user_id) ON DELETE CASCADE
|
||||
CHECKSUM VARCHAR(64) NULL COMMENT 'SHA-256 Checksum',
|
||||
reference_date DATE NULL COMMENT 'Date used for folder structure (e.g. Issue Date) to prevent broken paths',
|
||||
FOREIGN KEY (uploaded_by_user_id) REFERENCES users (user_id) ON DELETE CASCADE,
|
||||
INDEX idx_attachments_reference_date (reference_date)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = 'ตาราง "กลาง" เก็บไฟล์แนบทั้งหมดของระบบ';
|
||||
|
||||
-- ตารางเชื่อม correspondences กับ attachments (M:N)
|
||||
|
||||
Reference in New Issue
Block a user