Sha256: 248133c29facbf460fd7d2314ba8188dda94e468d9fd77badb89c281ed20a04b

Contents?: true

Size: 599 Bytes

Versions: 7

Compression:

Stored size: 599 Bytes

Contents

// show a message to the user if comunication is lost
import "src/decidim/elections/broken_promises_handler";
import { Client } from "@decidim/decidim-bulletin_board";

$(() => {
  const $form = $("form.step");
  const $pendingAction = $form.find("#pending_action");

  if ($pendingAction.length) {
    const bulletinBoardClient = new Client({
      apiEndpointUrl: $pendingAction.data("apiEndpointUrl")
    });
    const messageId = $pendingAction.data("messageId");

    bulletinBoardClient.waitForPendingMessageToBeProcessed(messageId).then(() => {
      $form.trigger("submit");
    });
  }
});

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
decidim-elections-0.28.4 app/packs/src/decidim/elections/admin/pending_action.js
decidim-elections-0.28.3 app/packs/src/decidim/elections/admin/pending_action.js
decidim-elections-0.28.2 app/packs/src/decidim/elections/admin/pending_action.js
decidim-elections-0.28.1 app/packs/src/decidim/elections/admin/pending_action.js
decidim-elections-0.28.0 app/packs/src/decidim/elections/admin/pending_action.js
decidim-elections-0.28.0.rc5 app/packs/src/decidim/elections/admin/pending_action.js
decidim-elections-0.28.0.rc4 app/packs/src/decidim/elections/admin/pending_action.js