aboutsummaryrefslogtreecommitdiff
path: root/src/client/views
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views')
-rw-r--r--src/client/views/collections/CollectionCardDeckView.tsx11
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;