mirror of
https://github.com/wekan/wekan.git
synced 2025-09-22 01:50:48 +02:00
Global search display total hits
* modify User model to store some session data for searches * Display total hits in search results
This commit is contained in:
parent
c11c3f9a88
commit
3214800741
5 changed files with 49 additions and 7 deletions
|
@ -311,6 +311,33 @@ Users.attachSchema(
|
|||
optional: false,
|
||||
defaultValue: 'password',
|
||||
},
|
||||
sessionData: {
|
||||
/**
|
||||
* profile settings
|
||||
*/
|
||||
type: Object,
|
||||
optional: true,
|
||||
// eslint-disable-next-line consistent-return
|
||||
autoValue() {
|
||||
if (this.isInsert && !this.isSet) {
|
||||
return {};
|
||||
}
|
||||
},
|
||||
},
|
||||
'sessionData.totalHits': {
|
||||
/**
|
||||
* Total hits from last search
|
||||
*/
|
||||
type: Number,
|
||||
optional: true,
|
||||
},
|
||||
'sessionData.lastHit': {
|
||||
/**
|
||||
* last hit that was returned
|
||||
*/
|
||||
type: Number,
|
||||
optional: true,
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue