Jake Vanderwerf
2026-02-11 2fd9c0c5a204ee209a0d5a47fe0cefcb44d85aae
assets/js/concise/CRUD.js
@@ -12,6 +12,7 @@
      this.error = window.jvbError;
      this.populate = window.jvbPopulate;
      this.cache = new window.jvbCache(this.content);
      this.uploadedFields = new Set(); //tracks which upload fields are currently uploading; so don't send any of these changes to server
      this.activeItem = null;
      this.isTimeline = false;
@@ -354,16 +355,12 @@
            if (event === 'sent-to-queue' && data.field) {
               const fieldName = data.field.config.name;
               const itemId = data.field.config.itemID;
               if (itemId && fieldName && this.changes.has(itemId)) {
               if (itemId && fieldName) {
                  this.uploadedFields.add(`${itemId}_${fieldName}`);
                  if (this.changes.has(itemId)) {
                  delete this.changes.get(itemId)[fieldName];
               }
               // Also clear from IndexedDB store
               this.changesStore.get(itemId).then(stored => {
                  if (stored && stored[fieldName] !== undefined) {
                     delete stored[fieldName];
                     this.changesStore.save(stored);
                  }
               });
            }
         });
      }
@@ -822,6 +819,13 @@
      }
      this.changes.get(itemId)[name] = value;
      for (const key of this.uploadedFields) {
         const [itemId, fieldName] = key.split('_');
         if (this.changes.has(itemId)) {
            delete this.changes.get(itemId)[fieldName];
         }
      }
      this.scheduleBackup();
      //Only send actual itemIds to server. If this is a recently uploaded item, just store changes for now
      if (typeof itemId === 'number' || !itemId.includes('group')) {