add schema for box and item

add mobile version for datatable
This commit is contained in:
2026-02-25 22:57:03 +07:00
parent 1e6f4683ea
commit 4f2f5b5694
26 changed files with 5092 additions and 168 deletions

View File

@@ -1,4 +1,3 @@
import { AppError } from '@/lib/errors';
import fs, { writeFile } from 'fs/promises';
import path from 'path';
@@ -20,10 +19,8 @@ export async function saveFile(key: string, file: Buffer | File) {
return key;
} catch (error) {
console.error(`Error saving file: ${key}`, error);
throw new AppError(
'FILE_SAVE_ERROR',
throw new Error(
`Failed to save file: ${error instanceof Error ? error.message : 'Unknown error'}`,
500,
);
}
}