2
0
mirror of https://github.com/frappe/books.git synced 2024-11-08 14:50:56 +00:00

incr: append lang and country to report

This commit is contained in:
18alantom 2022-08-10 11:13:58 +05:30
parent 4a2086dfe4
commit 84ba034337

View File

@ -1,5 +1,6 @@
import { ipcRenderer } from 'electron';
import { t } from 'fyo';
import { ConfigKeys } from 'fyo/core/types';
import { Doc } from 'fyo/model/doc';
import { BaseError } from 'fyo/utils/errors';
import { ErrorLog } from 'fyo/utils/types';
@ -176,6 +177,11 @@ function getIssueUrlQuery(errorLogObj?: ErrorLog): string {
body.push(`**Platform**: \`${fyo.store.platform}\``);
body.push(`**Path**: \`${router.currentRoute.value.fullPath}\``);
body.push(`**Language**: \`${fyo.config.get(ConfigKeys.Language)}\``);
if (fyo.singles.SystemSettings?.countryCode) {
body.push(`**Country**: \`${fyo.singles.SystemSettings.countryCode}\``);
}
const url = [baseUrl, `body=${body.join('\n')}`].join('&');
return encodeURI(url);
}