Split SimpleFIN connections by institution
Group discovered SimpleFIN accounts by institution and create a separate SyncConnection per institution so each bank appears as its own card in the UI. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -728,12 +728,16 @@ function loadPlaidScript(): Promise<void> {
|
||||
async function connectSimpleFin() {
|
||||
simpleFinLoading.value = true
|
||||
try {
|
||||
const { data: conn } = await bankSyncApi.connectSimpleFin(simpleFinToken.value)
|
||||
connections.value.unshift(conn)
|
||||
syncIntervals[conn.id] = conn.syncIntervalMinutes
|
||||
const { data: newConnections } = await bankSyncApi.connectSimpleFin(simpleFinToken.value)
|
||||
for (const conn of newConnections) {
|
||||
connections.value.unshift(conn)
|
||||
syncIntervals[conn.id] = conn.syncIntervalMinutes
|
||||
}
|
||||
showSimpleFinDialog.value = false
|
||||
simpleFinToken.value = ''
|
||||
openMappingDialog(conn)
|
||||
if (newConnections.length > 0) {
|
||||
openMappingDialog(newConnections[0])
|
||||
}
|
||||
} catch (err: any) {
|
||||
errorMessage.value = err.response?.data?.error || 'Failed to connect via SimpleFIN. Check your setup token.'
|
||||
showError.value = true
|
||||
|
||||
Reference in New Issue
Block a user