From f6769fa1db6f2724e48615acd7de90267b672192 Mon Sep 17 00:00:00 2001 From: chan Date: Fri, 27 Feb 2026 14:40:07 +0900 Subject: [PATCH] =?UTF-8?q?=ED=85=8C=EC=8A=A4=ED=8A=B8=20=EC=98=A4?= =?UTF-8?q?=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adminfront/tests/tenants.spec.ts | 6 ++-- .../presentation/pages/profile_page.dart | 28 +++++++++++++------ 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/adminfront/tests/tenants.spec.ts b/adminfront/tests/tenants.spec.ts index e2fbb624..b54b4c8b 100644 --- a/adminfront/tests/tenants.spec.ts +++ b/adminfront/tests/tenants.spec.ts @@ -30,7 +30,7 @@ test.describe("Tenants Management", () => { }); test("should list tenants", async ({ page }) => { - await page.route("**/api/v1/admin/tenants*", async (route) => { + await page.route("**/api/v1/admin/tenants**", async (route) => { await route.fulfill({ json: { items: [ @@ -57,7 +57,7 @@ test.describe("Tenants Management", () => { test("should create a new tenant", async ({ page }) => { // Mock GET for list (empty) and for parents - await page.route("**/api/v1/admin/tenants*", async (route) => { + await page.route("**/api/v1/admin/tenants**", async (route) => { if (route.request().method() === "GET") { await route.fulfill({ json: { items: [], total: 0, limit: 100, offset: 0 }, @@ -120,7 +120,7 @@ test.describe("Tenants Management", () => { }, ]; - await page.route("**/api/v1/admin/tenants*", async (route) => { + await page.route("**/api/v1/admin/tenants**", async (route) => { await route.fulfill({ json: { items: mockTenants, diff --git a/userfront/lib/features/profile/presentation/pages/profile_page.dart b/userfront/lib/features/profile/presentation/pages/profile_page.dart index 7f0da220..dd741004 100644 --- a/userfront/lib/features/profile/presentation/pages/profile_page.dart +++ b/userfront/lib/features/profile/presentation/pages/profile_page.dart @@ -86,8 +86,11 @@ class _ProfilePageState extends ConsumerState { void _onNameFocusChange() { if (!mounted) return; if (!_nameFocus.hasFocus && _nameTouched) { - final profile = ref.read(profileProvider).value ?? _cachedProfile; - if (profile != null) _autoSaveIfEditing(profile, 'name'); + Future.microtask(() { + if (!mounted) return; + final profile = ref.read(profileProvider).value ?? _cachedProfile; + if (profile != null) _autoSaveIfEditing(profile, 'name'); + }); } else if (_nameFocus.hasFocus) { _nameTouched = true; } @@ -101,8 +104,11 @@ class _ProfilePageState extends ConsumerState { hasFocus: _departmentFocus.hasFocus, ); if (!_departmentFocus.hasFocus && _departmentTouched) { - final profile = ref.read(profileProvider).value ?? _cachedProfile; - if (profile != null) _autoSaveIfEditing(profile, 'department'); + Future.microtask(() { + if (!mounted) return; + final profile = ref.read(profileProvider).value ?? _cachedProfile; + if (profile != null) _autoSaveIfEditing(profile, 'department'); + }); } else if (_departmentFocus.hasFocus) { _departmentTouched = true; } @@ -111,8 +117,11 @@ class _ProfilePageState extends ConsumerState { void _onPhoneFocusChange() { if (!mounted) return; if (!_phoneFocus.hasFocus && _phoneTouched) { - final profile = ref.read(profileProvider).value ?? _cachedProfile; - if (profile != null) _handlePhoneFocusChange(profile); + Future.microtask(() { + if (!mounted) return; + final profile = ref.read(profileProvider).value ?? _cachedProfile; + if (profile != null) _handlePhoneFocusChange(profile); + }); } else if (_phoneFocus.hasFocus) { _phoneTouched = true; } @@ -121,8 +130,11 @@ class _ProfilePageState extends ConsumerState { void _onPhoneCodeFocusChange() { if (!mounted) return; if (!_phoneCodeFocus.hasFocus && _phoneCodeTouched) { - final profile = ref.read(profileProvider).value ?? _cachedProfile; - if (profile != null) _handlePhoneFocusChange(profile); + Future.microtask(() { + if (!mounted) return; + final profile = ref.read(profileProvider).value ?? _cachedProfile; + if (profile != null) _handlePhoneFocusChange(profile); + }); } else if (_phoneCodeFocus.hasFocus) { _phoneCodeTouched = true; }