Commit Graph

21 Commits

Author SHA1 Message Date
Misaka_Company
6531254715 Add implementation plan: record detail context menu 2026-06-24 11:23:32 +08:00
Misaka_Company
207bc6a7a1 Add design spec: right-click record detail modal
Design for production dept requirement 3 (long-content full display):
right-click a data row to open a custom context menu -> open a Modal
showing all fields of that record fully. Inline ellipsis unchanged.
2026-06-24 11:09:14 +08:00
Misaka_Company
3212769644 Ignore .claude local config directory 2026-06-24 10:41:26 +08:00
Misaka_Company
e91bc90d0f Serialize exports to prevent OOM spikes from stacking
/api/export-excel now holds a per-process mutex: concurrent callers get an
instant 429 instead of stacking multiple ~1.3GB export spikes that exceed
Node's default ~2GB heap. Frontend handleExport treats 429 as 'another
export running' and auto-retries (3s backoff, up to 7 attempts). A 90s
timeout reclaims a stuck lock. Heap raise + orphan cleanup applied at deploy.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-18 11:05:05 +08:00
Misaka_Company
dca5335f9a Localize antd DatePicker to Chinese via ConfigProvider
Adds a Providers client component that wraps the app in ConfigProvider
locale=zhCN and sets dayjs zh-cn locale, so the date-filter RangePicker
shows Chinese weekdays/months (and other antd components localize too).
Framework-native; no custom control. Not deployed.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-18 10:28:12 +08:00
Misaka_Company
933b779a10 Add blank-value filtering to column filters
Each filter dropdown (text/category/date) gains a 'show blanks only'
checkbox; when on, the column filters to rows where the field is empty
or whitespace-only (0/false are not blank), and the value control is
disabled. Implemented via a BLANK_SENTINEL key handled by matchesFilter,
with isBlank + 4 new unit tests. Not deployed.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-18 10:16:14 +08:00
Misaka_Company
2f3cd9fa06 Wire controlled column filters and clear-filters button
buildTableColumns now attaches antd controlled filter props (via
buildColumnFilterProps) to columns marked filterable; filters state is
controlled via Table onChange. A 'clear filters' button in the search bar
resets all filters and is disabled when none are active. Filters and row
lock reset on search/clear.

Also renames the component module table-filters.tsx -> table-filter-ui.tsx
to avoid a same-base-name resolution collision with the logic module
table-filters.ts.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-18 09:52:51 +08:00
Misaka_Company
f8914fb287 Add per-column filterable flag with persistence and settings toggle
ColumnConfig gains filterable (default false), persisted to localStorage
with backward-compat for configs saved before this field existed. The
column-settings modal now shows a funnel toggle per row alongside the
visibility checkbox.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-18 09:47:46 +08:00
Misaka_Company
f78918c3b0 Add click-to-lock row highlighting
Clicking a row locks an orange highlight (#fff7e6) across the whole row
including fixed columns; clicking the same row unlocks, clicking another
switches. Lock resets on search/clear. Highlight survives horizontal scroll
since rowClassName applies to all row fragments.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-18 09:46:25 +08:00
Misaka_Company
b893fd558a Add FilterDropdown component and column filter props factory
src/app/table-filters.tsx renders type-specific filter UIs (text search,
category checkbox list, date range) and exposes buildColumnFilterProps to
attach antd controlled filter props (filterDropdown/onFilter/filteredValue)
to a column. Verified against antd v6.4.3 type defs.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-18 09:44:52 +08:00
Misaka_Company
4faa960591 Add pure filter/lock logic with Vitest tests
Adds src/app/table-filters.ts (DataRow type, FilterType, distinctValues,
inferFilterType, matchesFilter, nextLockedRow) with 16 Vitest tests covering
type inference thresholds, date-range encoding, and row-lock toggling.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-18 09:42:18 +08:00
Misaka_Company
f8dcc268c6 Add implementation plan for row highlight and column filters
Six tasks: pure logic + Vitest, FilterDropdown component, click-to-lock
row highlight, filterable column config + persistence, controlled table
filters + clear button, then build/deploy to 114.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-18 09:28:28 +08:00
Misaka_Company
c39c2761d4 Add design spec for row highlight and column-header filters
- Row highlight: hover + click-to-pin via onRow/rowClassName, persists across
  horizontal scroll and filtering (keyed by rowKey=ID)
- Column filters: antd controlled filterDropdown per column, type auto-inferred
  (date/category/text), multi-column AND; which columns are filterable is chosen
  by the user in the existing column-settings modal and persisted to localStorage
- New module src/app/table-filters.tsx for FilterDropdown + type inference
- 'Clear filters' button in the search bar
- Long-content display explicitly deferred to a later iteration

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-18 09:21:03 +08:00
Misaka_Company
db58148746 Increase database request timeout to 60s for fuzzy search queries
The LIKE-based fuzzy matching can return larger result sets than exact
match, requiring more query time. Raise requestTimeout from the default
15s to 60s on both production-data and export-excel API routes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-11 09:07:09 +08:00
Misaka_Company
aaff8b410b Update search placeholder to indicate fuzzy search support
The stored procedure now supports LIKE matching on 车间号,
so update the placeholder hint to inform users they can enter
partial workshop numbers for fuzzy matching.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-11 08:39:08 +08:00
Misaka_Company
0ac67bbfe8 Add CLAUDE.local.md to .gitignore
Local deployment notes file, not tracked in version control.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-10 18:18:31 +08:00
Misaka_Company
8235a29f82 Add Excel export feature for full production data
Add "导出全部" button that exports all contract production data to an
.xlsx file via a new API endpoint using exceljs, with formatted headers,
date columns, auto-width, and frozen header row.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-10 17:35:48 +08:00
Misaka_Company
2c66faf207 Add search history with AutoComplete dropdown
- Show last 10 search records on input focus with clock icon
- Filter history as user types
- Click history item to search directly
- Deduplicate and persist to localStorage

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-10 12:19:24 +08:00
Misaka_Company
aac2e9ceca Add column visibility toggle and drag-sort via settings modal
- Remove default workshop number from search input
- Add ColumnSettingsModal with checkboxes for show/hide per column
- Add drag-and-drop reordering using @dnd-kit/sortable
- Persist column config to localStorage across sessions
- Include search filter, select all/deselect all/reset defaults

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-10 11:31:05 +08:00
Misaka_Company
93564c6f4e Add production data table with Ant Design and SQL Server integration
- Add API route to execute stored procedure and query production data
- Build search bar with isolated component to prevent input lag on large datasets
- Configure Ant Design Table with sticky header and horizontal scroll for 56 columns
- Add antd, @ant-design/icons, mssql dependencies
- Configure allowedDevOrigins for LAN access

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-10 10:05:32 +08:00
Misaka_Company
38adf674e8 Initial commit: Web Table project scaffolded with Next.js
Created using create-next-app with TypeScript, Tailwind CSS, ESLint, and App Router.
2026-06-10 09:08:41 +08:00