mirror of
https://github.com/frappe/books.git
synced 2024-11-09 23:30:56 +00:00
fix: Reports Date filter field issue
- update Report Issue template
This commit is contained in:
parent
4b1b1d9733
commit
c6ca4f4e4c
@ -28,7 +28,6 @@ import {
|
|||||||
import { Field } from 'schemas/types';
|
import { Field } from 'schemas/types';
|
||||||
import { getMapFromList } from 'utils';
|
import { getMapFromList } from 'utils';
|
||||||
import { QueryFilter } from 'utils/db/types';
|
import { QueryFilter } from 'utils/db/types';
|
||||||
import { logUnexpected } from 'utils/misc';
|
|
||||||
|
|
||||||
export const ACC_NAME_WIDTH = 2;
|
export const ACC_NAME_WIDTH = 2;
|
||||||
export const ACC_BAL_WIDTH = 1.25;
|
export const ACC_BAL_WIDTH = 1.25;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
import { Fyo } from 'fyo';
|
import { Fyo } from 'fyo';
|
||||||
|
import { Converter } from 'fyo/core/converter';
|
||||||
|
import { DocValue } from 'fyo/core/types';
|
||||||
import { Action } from 'fyo/model/types';
|
import { Action } from 'fyo/model/types';
|
||||||
import Observable from 'fyo/utils/observable';
|
import Observable from 'fyo/utils/observable';
|
||||||
import { Field, RawValue } from 'schemas/types';
|
import { Field, RawValue } from 'schemas/types';
|
||||||
@ -59,12 +61,13 @@ export abstract class Report extends Observable<RawValue> {
|
|||||||
return filterMap;
|
return filterMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
async set(key: string, value: RawValue, callPostSet: boolean = true) {
|
async set(key: string, value: DocValue, callPostSet: boolean = true) {
|
||||||
const field = this.filters.find((f) => f.fieldname === key);
|
const field = this.filters.find((f) => f.fieldname === key);
|
||||||
if (field === undefined) {
|
if (field === undefined) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
value = Converter.toRawValue(value, field, this.fyo);
|
||||||
const prevValue = this[key];
|
const prevValue = this[key];
|
||||||
if (prevValue === value) {
|
if (prevValue === value) {
|
||||||
return;
|
return;
|
||||||
|
@ -175,15 +175,19 @@ export function getErrorHandledSync(func: Function) {
|
|||||||
function getIssueUrlQuery(errorLogObj?: ErrorLog): string {
|
function getIssueUrlQuery(errorLogObj?: ErrorLog): string {
|
||||||
const baseUrl = 'https://github.com/frappe/books/issues/new?labels=bug';
|
const baseUrl = 'https://github.com/frappe/books/issues/new?labels=bug';
|
||||||
|
|
||||||
const body = ['<h2>Description</h2>', 'Add some description...', ''];
|
const body = [
|
||||||
|
'<h2>Description</h2>',
|
||||||
|
'Add some description...',
|
||||||
|
'',
|
||||||
|
'<h2>Steps to Reproduce</h2>',
|
||||||
|
'Add steps to reproduce the error...',
|
||||||
|
'',
|
||||||
|
'<h2>Info</h2>',
|
||||||
|
'',
|
||||||
|
];
|
||||||
|
|
||||||
if (errorLogObj) {
|
if (errorLogObj) {
|
||||||
body.push(
|
body.push(`**Error**: _${errorLogObj.name}: ${errorLogObj.message}_`, '');
|
||||||
'<h2>Error Info</h2>',
|
|
||||||
'',
|
|
||||||
`**Error**: _${errorLogObj.name}: ${errorLogObj.message}_`,
|
|
||||||
''
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (errorLogObj?.stack) {
|
if (errorLogObj?.stack) {
|
||||||
|
Loading…
Reference in New Issue
Block a user