2026-04-04 13:33:09 -07:00
|
|
|
export const getReportPath = (type: string, id: string) => {
|
2025-08-14 21:48:38 +01:00
|
|
|
const prefill = new URLSearchParams()
|
|
|
|
|
prefill.set('item', type)
|
|
|
|
|
prefill.set('itemID', id)
|
2026-04-04 13:33:09 -07:00
|
|
|
return '/report?' + prefill.toString()
|
|
|
|
|
}
|
2023-11-29 10:56:17 -08:00
|
|
|
|
2026-04-04 13:33:09 -07:00
|
|
|
const startReport = (type: string, id: string) => {
|
|
|
|
|
navigateTo(getReportPath(type, id))
|
2025-08-14 21:48:38 +01:00
|
|
|
}
|
2023-11-29 10:56:17 -08:00
|
|
|
|
|
|
|
|
export const reportProject = (id: string) => {
|
2025-08-14 21:48:38 +01:00
|
|
|
return startReport('project', id)
|
|
|
|
|
}
|
2023-11-29 10:56:17 -08:00
|
|
|
|
|
|
|
|
export const reportVersion = (id: string) => {
|
2025-08-14 21:48:38 +01:00
|
|
|
return startReport('version', id)
|
|
|
|
|
}
|
2023-11-29 10:56:17 -08:00
|
|
|
|
|
|
|
|
export const reportUser = (id: string) => {
|
2025-08-14 21:48:38 +01:00
|
|
|
return startReport('user', id)
|
|
|
|
|
}
|