Jake Vanderwerf
2026-01-04 22e1bb3fcc3b3db1c0f5c2e6a4aecaf408c307a5
assets/js/concise/Queue.js
@@ -163,6 +163,7 @@
         method: 'POST',
         headers: {},
         data: {},
         sendNow: false,            // true = process immediately
         canMerge: true,
         popup: 'Saving changes...',
         title: 'Operation',
@@ -183,6 +184,14 @@
         return null;
      }
      if (item.sendNow) {
         this.processOperation(item).then(()=> {});
         this.store.clearCache();
         window.debouncer.schedule('fastQueue', this.startPolling.bind(this), 200);
         this.showQueue();
         return item.id;
      }
      const existingOps = Array.from(this.store.data.values()).filter(op=>
         op.status === 'queued' &&
         op.endpoint === item.endpoint &&
@@ -201,7 +210,6 @@
         return existing.id;
      }
      console.log('Added to Queue: ', item);
      this.store.clearCache();
      //Add new operation to DataStore
@@ -313,12 +321,14 @@
      this.maybeStartPolling() ? this.showQueue() : this.hideQueue();
   }
   async processOperation(operation) {
   async processOperation(operation, skip = false) {
      try {
         this.updateOperationStatus(operation.id, 'uploading');
         if (!skip) {
            this.updateOperationStatus(operation.id, 'uploading');
         if (operation.data?._isFormData) {
            operation.data = await this.store.objectToFormData(operation.data);
            if (operation.data?._isFormData) {
               operation.data = await this.store.objectToFormData(operation.data);
            }
         }
         const url = `${this.config.apiBase}${operation.endpoint}`;
@@ -336,7 +346,6 @@
            });
            operation.headers['Content-Type'] = 'application/json';
         }
         const response = await fetch(url, {
            method: operation.method,
            headers: operation.headers,
@@ -344,7 +353,9 @@
         });
         const result = await response.json();
         if (skip) {
            operation.data = {};
         }
         if (response.ok && result.success !== false) {
            // Handle server-side merge
            if (result.id && operation.id !== result.id) {