mirror of
https://github.com/frappe/books.git
synced 2024-12-31 22:11:48 +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,
|
FiltersMap,
|
||||||
ListViewSettings,
|
ListViewSettings,
|
||||||
RequiredMap,
|
RequiredMap,
|
||||||
TreeViewSettings
|
TreeViewSettings,
|
||||||
|
ReadOnlyMap,
|
||||||
} from 'fyo/model/types';
|
} from 'fyo/model/types';
|
||||||
import { QueryFilter } from 'utils/db/types';
|
import { QueryFilter } from 'utils/db/types';
|
||||||
import { AccountRootType, AccountRootTypeEnum, AccountType } from './types';
|
import { AccountRootType, AccountRootTypeEnum, AccountType } from './types';
|
||||||
@ -88,4 +89,11 @@ export class Account extends Doc {
|
|||||||
return filter;
|
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">
|
<div :class="labelClasses" v-if="showLabel">
|
||||||
{{ df?.label }}
|
{{ df?.label }}
|
||||||
</div>
|
</div>
|
||||||
<div :class="[containerClasses, sizeClasses]" class="flex">
|
<div
|
||||||
|
:class="[containerClasses, sizeClasses]"
|
||||||
|
class="flex"
|
||||||
|
@click="togglePopover"
|
||||||
|
>
|
||||||
<p
|
<p
|
||||||
:class="[baseInputClasses]"
|
:class="[baseInputClasses]"
|
||||||
class="overflow-auto no-scrollbar whitespace-nowrap"
|
class="overflow-auto no-scrollbar whitespace-nowrap"
|
||||||
|
@ -141,11 +141,21 @@ export default {
|
|||||||
|
|
||||||
let items = [];
|
let items = [];
|
||||||
let i = 0;
|
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) {
|
for (let group of this.sortedGroups) {
|
||||||
let groupItems = itemsByGroup[group];
|
let groupItems = itemsByGroup[group];
|
||||||
groupItems = groupItems.map((d) => {
|
groupItems = groupItems.map((d) => {
|
||||||
d.index = i;
|
d.index = i++;
|
||||||
i++;
|
|
||||||
return d;
|
return d;
|
||||||
});
|
});
|
||||||
items = items.concat(
|
items = items.concat(
|
||||||
|
Loading…
Reference in New Issue
Block a user