File tree Expand file tree Collapse file tree 5 files changed +16
-5
lines changed
features/document/components/DocumentDetails Expand file tree Collapse file tree 5 files changed +16
-5
lines changed Original file line number Diff line number Diff line change 7
7
### Changes
8
8
9
9
- pyproject.toml upgraded for poetry 2.0
10
+ - in document details view, values of document type dropdown are sorted alphabetically and autocomplete
11
+ - in "new document type" modal dialog, custom field dropdown is sorted alphabetically
10
12
11
13
### Adds
12
14
Original file line number Diff line number Diff line change @@ -73,7 +73,11 @@ def get_custom_fields(
73
73
def get_custom_fields_without_pagination (
74
74
db_session : Session , user_id : uuid .UUID
75
75
) -> list [schema .CustomField ]:
76
- stmt = select (orm .CustomField ).where (orm .CustomField .user_id == user_id )
76
+ stmt = (
77
+ select (orm .CustomField )
78
+ .order_by (orm .CustomField .name .asc ())
79
+ .where (orm .CustomField .user_id == user_id )
80
+ )
77
81
78
82
db_cfs = db_session .scalars (stmt ).all ()
79
83
items = [schema .CustomField .model_validate (db_cf ) for db_cf in db_cfs ]
Original file line number Diff line number Diff line change 19
19
def get_document_types_without_pagination (
20
20
db_session : Session , user_id : uuid .UUID
21
21
) -> list [schema .DocumentType ]:
22
- stmt = select (orm .DocumentType ).where (orm .DocumentType .user_id == user_id )
22
+ stmt = (
23
+ select (orm .DocumentType )
24
+ .order_by (orm .DocumentType .name .asc ())
25
+ .where (orm .DocumentType .user_id == user_id )
26
+ )
23
27
24
28
db_document_types = db_session .scalars (stmt ).all ()
25
29
items = [
Original file line number Diff line number Diff line change @@ -53,12 +53,12 @@ export const ONE_DAY_IN_SECONDS = 86400
53
53
export const DRAGGED = "dragged"
54
54
55
55
export const CUSTOM_FIELD_DATA_TYPES : Array < CustomFieldDataType > = [
56
- "text" ,
57
- "date" ,
58
56
"boolean" ,
59
- "int " ,
57
+ "date " ,
60
58
"float" ,
59
+ "int" ,
61
60
"monetary" ,
61
+ "text" ,
62
62
"yearmonth"
63
63
]
64
64
Original file line number Diff line number Diff line change @@ -185,6 +185,7 @@ export default function CustomFields() {
185
185
onChange = { onDocumentTypeChange }
186
186
onClear = { onClearDocumentType }
187
187
clearable
188
+ searchable
188
189
/>
189
190
< Stack > { genericCustomFieldsComponents } </ Stack >
190
191
{ isErrorGetDocCF && (
You can’t perform that action at this time.
0 commit comments