Save catalog delivery addresses and reuse them on the next request.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-26 11:12:09 +03:30
co-authored by Cursor
parent c3cef161eb
commit 892a1fbcf3
63 changed files with 277 additions and 63 deletions
+4 -2
View File
@@ -1,6 +1,6 @@
import { defineStore } from 'pinia'
import { computed, ref } from 'vue'
import { apiRequest } from '@/services/http'
import { ApiError, apiRequest } from '@/services/http'
const STORAGE_KEY = 'ft_catalog_requests'
@@ -182,8 +182,10 @@ export const useCatalogRequestsStore = defineStore('catalogRequests', () => {
writeAll(requests.value)
return { success: true as const, request: mapped }
} catch (err) {
if (err instanceof ApiError && err.status >= 400 && err.status < 500) {
return { success: false as const, message: err.message }
}
useApi.value = false
// fall through to local
}
}