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:
18alantom
2023-03-11 10:31:40 +05:30
parent f7f3444352
commit f061108565
2 changed files with 47 additions and 20 deletions
+18
View File
@@ -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 = {