Przeglądaj źródła

Fix ical_feeds sync button not disabling while busy

ZiB 4 miesięcy temu
rodzic
commit
34d215531c
1 zmienionych plików z 3 dodań i 2 usunięć
  1. 3 2
      room_cal/vue/calendar.html

+ 3 - 2
room_cal/vue/calendar.html

@@ -1353,7 +1353,8 @@ const FIX = {
   user_cal_closed:   { up:   d     => [`/workflow/user-cal/${d}/${d}`,    {}],
                        down: d     => [`/action/fetch-user-cal/${d}/${d}`, {}] },
   ical_feeds_closed: { up:   null,
-                       down: (d,x) => [`/workflow/ical-feeds/${d}/${d}`,  x]  },
+                       down: (d,x) => [`/workflow/ical-feeds/${d}/${d}`,  x],
+                       busyKey: (d,x) => `ical_feeds_closed-down-${d}-${x.feed_name}` },
   rule_discounts:    { up:   null,
                        down: (d,x) => [`/action/apply-rules/${d}/${d}`, x],
                        busyKey: d => `rules-down-${d}` },
@@ -2262,7 +2263,7 @@ createApp({
       const spec = FIX[cat]?.[dir];
       if (!spec) return;
       const keyFn = FIX[cat]?.busyKey;
-      const key = keyFn ? keyFn(date) : `${cat}-${dir}-${date}`;
+      const key = keyFn ? keyFn(date, extra) : `${cat}-${dir}-${date}`;
       if (fixBusy[key]) return;
       fixBusy[key] = true;
       try {