Skip to content

Commit

Permalink
feat: add qr search function in the spoolman change spool dialog (mai…
Browse files Browse the repository at this point in the history
  • Loading branch information
meteyou authored Mar 7, 2024
1 parent 371de28 commit ed62a72
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/dialogs/SpoolmanChangeSpoolDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,11 @@ export default class SpoolmanChangeSpoolDialog extends Mixins(BaseMixin) {
}
customFilter(value: any, search: string, item: ServerSpoolmanStateSpool): boolean {
if (search.trim().startsWith('web+spoolman:s-')) {
const spoolId = parseInt(search.split('-')[1] ?? -1)
return item.id === spoolId
}
const querySplits = search.toLowerCase().split(' ')
const searchArray = [
item.comment,
Expand Down

0 comments on commit ed62a72

Please sign in to comment.