@mx-cartographer/experiences 6.0.17-alpha-ram5-error-budgets-empty-state → 6.0.17-alpha-ram7-error-budgets-empty-state

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -3992,17 +3992,19 @@ class Mr {
3992
3992
  constructor(t, i) {
3993
3993
  this.fetchInstance = new Ae(t, i);
3994
3994
  }
3995
- addBudget = async (t, i, n = null) => this.fetchInstance.post(`${Q.BUDGETS}/api`, {
3995
+ addBudget = async (t, i, n = null) => this.fetchInstance.post(`${Q.BUDGETS}/add`, {
3996
3996
  amount: i,
3997
3997
  category_guid: t.guid,
3998
3998
  category_name: t.name,
3999
3999
  parent_guid: n
4000
- }).then((r) => r.budget).catch((r) => r);
4001
- deleteBudget = async (t) => this.fetchInstance.delete(`${Q.BUDGETS}/${t}/del`).then((i) => i).catch((i) => {
4000
+ }).then((r) => r.budget).catch((r) => {
4001
+ throw r;
4002
+ });
4003
+ deleteBudget = async (t) => this.fetchInstance.delete(`${Q.BUDGETS}/${t}`).then((i) => i).catch((i) => {
4002
4004
  throw i;
4003
4005
  });
4004
4006
  getBudgets = async () => this.fetchInstance.get(Q.BUDGETS).then((t) => t.budgets).catch((t) => t);
4005
- updateBudget = async (t) => this.fetchInstance.put(`${Q.BUDGETS}/${t.guid}/hell`, t).then((i) => i.budget).catch((i) => {
4007
+ updateBudget = async (t) => this.fetchInstance.put(`${Q.BUDGETS}/${t.guid}`, t).then((i) => i.budget).catch((i) => {
4006
4008
  throw i;
4007
4009
  });
4008
4010
  }
@@ -4155,10 +4157,10 @@ class Id {
4155
4157
  try {
4156
4158
  for (const n of t) {
4157
4159
  const r = this.budgets.find((o) => o.category_guid === n.guid);
4158
- r ? await this.api.updateBudget({
4160
+ r ? (console.log("insiode add budgets"), await this.api.updateBudget({
4159
4161
  ...r,
4160
4162
  amount: n.totalAverageAmount
4161
- }) : await this.api.addBudget(n, n.totalAverageAmount);
4163
+ })) : await this.api.addBudget(n, n.totalAverageAmount);
4162
4164
  }
4163
4165
  const i = this.budgets.filter(
4164
4166
  (n) => !t.find((r) => r.guid === n.category_guid)