diff options
| author | bobzel <zzzman@gmail.com> | 2025-01-29 10:06:38 -0500 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2025-01-29 10:06:38 -0500 |
| commit | f47b7b61749e519d694cff841b4e961fd211c0dd (patch) | |
| tree | 37985c8ca28eb7eb0f78a879defd09cf5ec4838d /src/client/views | |
| parent | a496c583f375fe5e118f786b1244c42bc8a34fec (diff) | |
fixed chat based sorting and tagging of docs
Diffstat (limited to 'src/client/views')
| -rw-r--r-- | src/client/views/collections/CollectionCardDeckView.tsx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/client/views/collections/CollectionCardDeckView.tsx b/src/client/views/collections/CollectionCardDeckView.tsx index aaf33c3a1..366d0f448 100644 --- a/src/client/views/collections/CollectionCardDeckView.tsx +++ b/src/client/views/collections/CollectionCardDeckView.tsx @@ -27,7 +27,7 @@ import { DocumentView, DocumentViewProps } from '../nodes/DocumentView'; import { FocusViewOptions } from '../nodes/FocusViewOptions'; import { GPTPopup } from '../pdf/GPTPopup/GPTPopup'; import './CollectionCardDeckView.scss'; -import { CollectionSubView, SubCollectionViewProps } from './CollectionSubView'; +import { CollectionSubView, docSortings, SubCollectionViewProps } from './CollectionSubView'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { SettingsManager } from '../../util/SettingsManager'; @@ -243,7 +243,7 @@ export class CollectionCardView extends CollectionSubView() { const sorted = this.childDocs; const originalIndex = sorted.findIndex(doc => doc === draggedDoc); - this.Document.card_sort = ''; + this.Document[this._props.fieldKey + '_sort'] = ''; originalIndex !== -1 && sorted.splice(originalIndex, 1); sorted.splice(dragIndex, 0, draggedDoc); if (de.complete.docDragData.removeDocument?.(draggedDoc)) { @@ -450,7 +450,7 @@ export class CollectionCardView extends CollectionSubView() { } if (questionType === '6') { - this.Document.card_sort = 'chat'; + this.Document[this._props.fieldKey + '_sort'] = docSortings.Chat; } listItems.forEach((item, index) => { @@ -467,16 +467,15 @@ export class CollectionCardView extends CollectionSubView() { let myTag = ''; if (tag) { for (let i = 0; i < allHotKeys.length; i++) { - // bcz: CHECK THIS CODE OUT -- SOMETHING CHANGED const keyTag = StrCast(allHotKeys[i].toolType); - if (tag.includes(keyTag)) { + if (keyTag.includes(tag)) { myTag = keyTag; break; } } if (myTag) { - doc[myTag] = true; + TagItem.addTagToDoc(doc, myTag); } } break; |
