mirror of
https://github.com/frappe/books.git
synced 2026-09-28 01:46:20 -04:00
fix(ui): transition for hints
- remove fix scrollbar jump on edit toggle - remove toggle edit toast - (unrelated) add formula for root type
This commit is contained in:
@@ -7,7 +7,9 @@ import {
|
||||
RequiredMap,
|
||||
TreeViewSettings,
|
||||
ReadOnlyMap,
|
||||
FormulaMap,
|
||||
} from 'fyo/model/types';
|
||||
import { ModelNameEnum } from 'models/types';
|
||||
import { QueryFilter } from 'utils/db/types';
|
||||
import { AccountRootType, AccountRootTypeEnum, AccountType } from './types';
|
||||
|
||||
@@ -76,6 +78,22 @@ export class Account extends Doc {
|
||||
};
|
||||
}
|
||||
|
||||
formulas: FormulaMap = {
|
||||
rootType: {
|
||||
formula: async () => {
|
||||
if (!this.parentAccount) {
|
||||
return;
|
||||
}
|
||||
|
||||
return await this.fyo.getValue(
|
||||
ModelNameEnum.Account,
|
||||
this.parentAccount,
|
||||
'rootType'
|
||||
);
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static filters: FiltersMap = {
|
||||
parentAccount: (doc: Doc) => {
|
||||
const filter: QueryFilter = {
|
||||
|
||||
Reference in New Issue
Block a user