2023-11-29 10:56:17 -08:00
|
|
|
const startReport = (type: string, id: string) => {
|
2025-08-14 21:48:38 +01:00
|
|
|
const prefill = new URLSearchParams()
|
2023-11-29 10:56:17 -08:00
|
|
|
|
2025-08-14 21:48:38 +01:00
|
|
|
// type
|
|
|
|
|
prefill.set('item', type)
|
|
|
|
|
prefill.set('itemID', id)
|
2023-11-29 10:56:17 -08:00
|
|
|
|
2025-08-14 21:48:38 +01:00
|
|
|
navigateTo('/report?' + prefill.toString())
|
|
|
|
|
}
|
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)
|
|
|
|
|
}
|