Skip to content

Commit cf8325d

Browse files
Merge pull request #87 from copilot-platforms/OUT-2050
OUT-2050 | OUT-2093 | UX Fixes for Quickbooks Integration
2 parents 51b76b3 + fceb67c commit cf8325d

2 files changed

Lines changed: 13 additions & 4 deletions

File tree

src/bridge/header.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@
33
import { DASHBOARD_DOMAIN } from '@/constant/domains'
44
import { useEffect, useMemo } from 'react'
55

6-
type Icons = 'Archive' | 'Plus' | 'Templates' | 'Trash'
6+
export type Icons =
7+
| 'Archive'
8+
| 'Plus'
9+
| 'Templates'
10+
| 'Trash'
11+
| 'Download'
12+
| 'Disconnected'
713

814
interface BreadcrumbsPayload {
915
items: {

src/hook/useQuickbooks.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { AuthStatus } from '@/app/api/core/types/auth'
22
import { LogStatus } from '@/app/api/core/types/log'
33
import { useApp } from '@/app/context/AppContext'
4-
import { useActionsMenu } from '@/bridge/header'
4+
import { Icons, useActionsMenu } from '@/bridge/header'
55
import { copilotDashboardUrl } from '@/config'
66
import { ConnectionStatus } from '@/db/schema/qbConnectionLogs'
77
import { postFetcher } from '@/helper/fetch.helper'
@@ -294,18 +294,21 @@ export const useAppBridge = ({
294294
link.click()
295295
link.remove()
296296
}
297-
let actions: { label: string; onClick: () => Promise<void> }[] = []
297+
let actions: { label: string; icon?: Icons; onClick: () => Promise<void> }[] =
298+
[]
298299
if (connectionStatus) {
299300
actions = [
300301
{
301302
label: 'Download sync history',
303+
icon: 'Download',
302304
onClick: downloadCsvAction,
303305
},
304306
]
305307

306308
if (isEnabled && syncFlag) {
307309
actions.push({
308-
label: 'Disconnect app',
310+
label: 'Disconnect account',
311+
icon: 'Disconnected',
309312
onClick: disconnectAction,
310313
})
311314
}

0 commit comments

Comments
 (0)