How to use the formiojs.Formio.makeStaticRequest function in formiojs

To help you get started, we’ve selected a few formiojs 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 formio / angular-formio / src / auth / auth.service.ts View on Github external
init() {
    this.projectReady = Formio.makeStaticRequest(this.appConfig.appUrl).then(
      (project: any) => {
        each(project.access, (access: any) => {
          this.formAccess[access.type] = access.roles;
        });
      },
      (): any => {
        this.formAccess = {};
        return null;
      }
    );

    // Get the access for this project.
    this.accessReady = Formio.makeStaticRequest(
      this.appConfig.appUrl + '/access'
    ).then(
      (access: any) => {
        each(access.forms, (form: any) => {
          this.submissionAccess[form.name] = {};
          form.submissionAccess.forEach((subAccess: any) => {
            this.submissionAccess[form.name][subAccess.type] = subAccess.roles;
          });
        });
        this.roles = access.roles;
        return access;
      },
      (): any => {
        this.roles = {};
        return null;
      }
github formio / angular-formio / src / auth / auth.service.ts View on Github external
init() {
    this.projectReady = Formio.makeStaticRequest(this.appConfig.appUrl).then(
      (project: any) => {
        each(project.access, (access: any) => {
          this.formAccess[access.type] = access.roles;
        });
      },
      (): any => {
        this.formAccess = {};
        return null;
      }
    );

    // Get the access for this project.
    this.accessReady = Formio.makeStaticRequest(
      this.appConfig.appUrl + '/access'
    ).then(
      (access: any) => {