mirror of
https://github.com/frappe/books.git
synced 2024-12-22 19:09:01 +00:00
fix: disappearing dropdown items w/o groups
- setting of Account fields after insert - datetime editing on click
This commit is contained in:
parent
9804486562
commit
cc1a3c26f5
@ -5,7 +5,8 @@ import {
|
||||
FiltersMap,
|
||||
ListViewSettings,
|
||||
RequiredMap,
|
||||
TreeViewSettings
|
||||
TreeViewSettings,
|
||||
ReadOnlyMap,
|
||||
} from 'fyo/model/types';
|
||||
import { QueryFilter } from 'utils/db/types';
|
||||
import { AccountRootType, AccountRootTypeEnum, AccountType } from './types';
|
||||
@ -88,4 +89,11 @@ export class Account extends Doc {
|
||||
return filter;
|
||||
},
|
||||
};
|
||||
|
||||
readOnly: ReadOnlyMap = {
|
||||
rootType: () => this.inserted,
|
||||
parentAccount: () => this.inserted,
|
||||
accountType: () => !!this.accountType && this.inserted,
|
||||
isGroup: () => this.inserted,
|
||||
};
|
||||
}
|
||||
|
@ -5,7 +5,11 @@
|
||||
<div :class="labelClasses" v-if="showLabel">
|
||||
{{ df?.label }}
|
||||
</div>
|
||||
<div :class="[containerClasses, sizeClasses]" class="flex">
|
||||
<div
|
||||
:class="[containerClasses, sizeClasses]"
|
||||
class="flex"
|
||||
@click="togglePopover"
|
||||
>
|
||||
<p
|
||||
:class="[baseInputClasses]"
|
||||
class="overflow-auto no-scrollbar whitespace-nowrap"
|
||||
|
@ -141,11 +141,21 @@ export default {
|
||||
|
||||
let items = [];
|
||||
let i = 0;
|
||||
|
||||
const noGroupItems = itemsByGroup[''];
|
||||
if (noGroupItems?.length) {
|
||||
items = items.concat(
|
||||
noGroupItems.map((d) => {
|
||||
d.index = i++;
|
||||
return d;
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
for (let group of this.sortedGroups) {
|
||||
let groupItems = itemsByGroup[group];
|
||||
groupItems = groupItems.map((d) => {
|
||||
d.index = i;
|
||||
i++;
|
||||
d.index = i++;
|
||||
return d;
|
||||
});
|
||||
items = items.concat(
|
||||
|
Loading…
Reference in New Issue
Block a user