How to use the api.projectsAPI.index function in api

To help you get started, we’ve selected a few api examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ManifoldScholar / manifold / client / src / frontend / containers / Projects / index.js View on Github external
updateResults(filter = this.state.filter) {
    const action = request(
      projectsAPI.index(filter, this.state.pagination),
      requests.feProjectsFiltered
    );
    this.props.dispatch(action);
  }
github ManifoldScholar / manifold / client / src / containers / backend / Dashboards / Author.js View on Github external
updateResults(eventIgnored = null, page = 1) {
    const pagination = { number: page, size: perPage };
    const filter = this.state.filter;
    filter.withUpdateAbility = true;
    const action = request(
      projectsAPI.index(filter, pagination),
      requests.beProjects
    );
    this.props.dispatch(action);
  }
github ManifoldScholar / manifold / client / src / backend / containers / dashboards / Admin.js View on Github external
fetchRecentProjects() {
    const recentProjectsRequest = request(
      projectsAPI.index(
        this.filterParams(this.props, { order: "updated_at DESC" }),
        { size: 5 }
      ),
      requests.beRecentProjects
    );
    this.props.dispatch(recentProjectsRequest);
  }
github ManifoldScholar / manifold / client / src / backend / containers / project-collection / ManageProjects.js View on Github external
fetchProjects(eventIgnored = null, page = 1) {
    const pagination = { number: page, size: perPage };
    const action = request(
      projectsAPI.index(this.filters, pagination),
      requests.beProjects
    );
    this.props.dispatch(action);
  }
github ManifoldScholar / manifold / client / src / containers / backend / ProjectCollection / ManageProjects.js View on Github external
updateResults(eventIgnored = null, page = 1) {
    const pagination = { number: page, size: perPage };
    const action = request(
      projectsAPI.index(this.state.filter, pagination),
      requests.beProjects
    );
    this.props.dispatch(action);
  }
github ManifoldScholar / manifold / client / src / containers / backend / Dashboards / Admin.js View on Github external
updateResults(eventIgnored = null, page = 1) {
    this.snapshotState(page);

    const pagination = { number: page, size: perPage };
    const action = request(
      projectsAPI.index(
        this.buildFetchFilter(this.props, this.state.filter),
        pagination
      ),
      requests.beProjects
    );
    this.props.dispatch(action);
  }
github ManifoldScholar / manifold / client / src / frontend / containers / ProjectCollectionDetail / index.js View on Github external
requests.feProjectCollection
      );
      const { promise } = dispatch(projectCollectionRequest);

      promises.push(promise);
    }

    const params = queryString.parse(location.search);
    const pagination = {
      number: params.page ? params.page : page,
      size: perPage
    };
    const filter = omitBy(params, (v, k) => k === "page");
    filter.collectionOrder = projectCollectionId;
    const projectsRequest = request(
      projectsAPI.index(filter, pagination),
      requests.feCollectionProjects
    );
    const { promise } = dispatch(projectsRequest);
    promises.push(promise);

    return Promise.all(promises);
  };
github ManifoldScholar / manifold / client / src / backend / containers / projects / ProjectsList.js View on Github external
fetchProjects(page = 1, doNotSnapshot = false) {
    const listKey = "projectsList";
    const filters = this.filterParams();
    const pagination = { number: page, size: perPage };
    if (!doNotSnapshot) this.props.saveSearchState(listKey, pagination);
    const projectsRequest = request(
      projectsAPI.index(filters, pagination),
      requests.beProjects
    );
    this.props.dispatch(projectsRequest);
  }