From 6aa496b60879526b51fdf736c38f09aede283bde Mon Sep 17 00:00:00 2001
From: nsfisis <nsfisis@gmail.com>
Date: Wed, 31 Dec 2025 02:49:55 +0900
Subject: feat(client): add NoteTypeEditor component with field management
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Add a comprehensive editor for note types that allows users to:
- Edit note type name and templates
- Add, remove, and reorder fields
- Toggle the reversible card option

The editor fetches note type details including fields from the API,
enabling full CRUD operations for note type configuration.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---
 src/client/components/EditNoteTypeModal.test.tsx | 27 +++++++++++-------------
 1 file changed, 12 insertions(+), 15 deletions(-)

(limited to 'src/client/components/EditNoteTypeModal.test.tsx')

diff --git a/src/client/components/EditNoteTypeModal.test.tsx b/src/client/components/EditNoteTypeModal.test.tsx
index c8064bd..61130e2 100644
--- a/src/client/components/EditNoteTypeModal.test.tsx
+++ b/src/client/components/EditNoteTypeModal.test.tsx
@@ -185,22 +185,19 @@ describe("EditNoteTypeModal", () => {
 		await user.click(screen.getByRole("button", { name: "Save Changes" }));
 
 		await waitFor(() => {
-			expect(mockFetch).toHaveBeenCalledWith(
-				"/api/note-types/note-type-123",
-				{
-					method: "PUT",
-					headers: {
-						"Content-Type": "application/json",
-						Authorization: "Bearer access-token",
-					},
-					body: JSON.stringify({
-						name: "Updated Basic",
-						frontTemplate: "{{Front}}",
-						backTemplate: "{{Back}}",
-						isReversible: true,
-					}),
+			expect(mockFetch).toHaveBeenCalledWith("/api/note-types/note-type-123", {
+				method: "PUT",
+				headers: {
+					"Content-Type": "application/json",
+					Authorization: "Bearer access-token",
 				},
-			);
+				body: JSON.stringify({
+					name: "Updated Basic",
+					frontTemplate: "{{Front}}",
+					backTemplate: "{{Back}}",
+					isReversible: true,
+				}),
+			});
 		});
 
 		expect(onNoteTypeUpdated).toHaveBeenCalledTimes(1);
-- 
cgit v1.2.3-70-g09d2

