2023-11-29 10:56:17 -08:00
|
|
|
const startReport = (type: string, id: string) => {
|
2024-07-06 20:57:32 -07:00
|
|
|
const prefill = new URLSearchParams();
|
2023-11-29 10:56:17 -08:00
|
|
|
|
|
|
|
|
// type
|
2024-07-06 20:57:32 -07:00
|
|
|
prefill.set("item", type);
|
|
|
|
|
prefill.set("itemID", id);
|
2023-11-29 10:56:17 -08:00
|
|
|
|
2024-07-06 20:57:32 -07:00
|
|
|
navigateTo("/report?" + prefill.toString());
|
|
|
|
|
};
|
2023-11-29 10:56:17 -08:00
|
|
|
|
|
|
|
|
export const reportProject = (id: string) => {
|
2024-07-06 20:57:32 -07:00
|
|
|
return startReport("project", id);
|
|
|
|
|
};
|
2023-11-29 10:56:17 -08:00
|
|
|
|
|
|
|
|
export const reportVersion = (id: string) => {
|
2024-07-06 20:57:32 -07:00
|
|
|
return startReport("version", id);
|
|
|
|
|
};
|
2023-11-29 10:56:17 -08:00
|
|
|
|
|
|
|
|
export const reportUser = (id: string) => {
|
2024-07-06 20:57:32 -07:00
|
|
|
return startReport("user", id);
|
|
|
|
|
};
|