From f0d9731e1c43ee13114d42db8c4e27c94bbbf3c0 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Mon, 26 Aug 2024 22:25:58 -0400
Subject: made face doc labels editable

---
 src/client/views/search/FaceRecognitionHandler.tsx | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

(limited to 'src/client/views/search/FaceRecognitionHandler.tsx')

diff --git a/src/client/views/search/FaceRecognitionHandler.tsx b/src/client/views/search/FaceRecognitionHandler.tsx
index 8513ec94d..dee0ab99b 100644
--- a/src/client/views/search/FaceRecognitionHandler.tsx
+++ b/src/client/views/search/FaceRecognitionHandler.tsx
@@ -24,7 +24,7 @@ import { DocumentManager } from '../../util/DocumentManager';
  * unique face Doc's are created for each person identified and are stored in the Dashboard's myUniqueFaces field
  *
  * Each unique face Doc represents a unique face and collects all matching face images for that person.  It has these fields:
- *     face_label - a string label for the person that was recognized                                     (TODO: currently it's just a 'face#')
+ *     face - a string label for the person that was recognized                                     (TODO: currently it's just a 'face#')
  *     face_descriptors - a list of all the face descriptors for different images of the person
  *     face_docList - a list of all image Docs that contain a face for the person
  */
@@ -108,7 +108,9 @@ export class FaceRecognitionHandler {
      * @param faceDoc unique face Doc
      * @returns label string
      */
-    public static UniqueFaceLabel = (faceDoc: Doc) => StrCast(faceDoc[DocData].face_label);
+    public static UniqueFaceLabel = (faceDoc: Doc) => StrCast(faceDoc[DocData].face);
+
+    public static SetUniqueFaceLabel = (faceDoc: Doc, value: string) => (faceDoc[DocData].face = value);
     /**
      * Returns all the face descriptors associated with a unique face Doc
      * @param faceDoc unique face Doc
@@ -186,8 +188,7 @@ export class FaceRecognitionHandler {
             _height: 100,
         });
         const uface = uniqueFaceDoc[DocData];
-        uface.face = ''; // just to make prettyprinting look better
-        uface.face_label = `Face${faceDocNum}`;
+        uface.face = `Face${faceDocNum}`;
         uface.face_images = new List<Doc>();
         uface.face_descriptors = new List<List<number>>();
         Doc.SetContainer(uniqueFaceDoc, Doc.MyFaceCollection);
-- 
cgit v1.2.3-70-g09d2

