my-koop / service.website

Website service
GNU General Public License v2.0
6 stars 1 forks source link

Actions option alertErrors, alertSuccess #309

Closed Cellule closed 9 years ago

Cellule commented 9 years ago

Added an option to show alerts automatically on error and/or on success. This is to ease up common actions on queries

example

  updateBill: function() {
    actions.transaction.bill.update({
      i18nErrors: {
        prefix: "transaction::errors",
        keys: ["app"]
      },
      alertErrors: true,
      alertSuccess: true,
      data: {
        id: this.props.idBill,
        notes: this.state.notes
      }
    });
  },
mathieumg commented 9 years ago

Good to merge.