How to use the phoenix/helpers/notify function in phoenix

To help you get started, we’ve selected a few phoenix 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 alphasights / ember-scrollable / app / controllers / dashboard / interaction.js View on Github external
}, () => {
          notify('There has been an error amending the interaction.', 'error');
        })
      });
github alphasights / ember-scrollable / app / services / interaction-cancellation.js View on Github external
}).then(successCallback, () => {
        notify('The interaction could not be cancelled.', 'error');
      })
    });
github alphasights / ember-scrollable / app / controllers / dashboard / interaction.js View on Github external
}, () => {
          notify('There has been an error rescheduling the interaction.', 'error');
          model.rollback();
          this.transitionToRoute('dashboard.interaction', this.get('model.id'));
        })
      }));
github alphasights / ember-scrollable / app / controllers / dashboard / unused-advisor.js View on Github external
}).catch(function() {
        notify('There has been an error sending your email.', 'error');
      });
    },
github alphasights / ember-scrollable / app / initializers / errors.js View on Github external
Ember.onerror = function(error) {
        var status;

        if (error.jqXHR != null) {
          status = error.jqXHR.status;
        } else {
          status = error.status;
        }

        if (status >= 500) {
          notify('Something went wrong with that request, please try again.', 'error');
        }

        logError(error);
      };
    }
github alphasights / ember-scrollable / app / controllers / dashboard / interaction.js View on Github external
InteractionCancellation.create().cancel(this.get('model'), response => {
        notify('The interaction has been cancelled.');
        this.store.pushPayload(response);
        this.get('dashboard').propertyDidChange('scheduledInteractions');
        this.get('sidePanel').send('close');
      }, withdrawFromCompliance);
github alphasights / ember-scrollable / app / controllers / dashboard / interaction.js View on Github external
completionForm.save().then(() => {
        notify('The interaction has been completed.');
        completionForm.set('editingDisabled', true);
      });
    },
github alphasights / ember-scrollable / app / forms / form.js View on Github external
promise: this.get('model').save().catch(() => {
          if (this.get('model.errors.length') > 0) {
            this.set('errors', this.get('model.errors'));
          } else {
            notify(this.get('genericErrorMessage'), 'error');
          }

          return Ember.RSVP.Promise.reject();
        })
      });