@inspirer-dev/crm-dashboard 1.0.94 → 1.0.96

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.
@@ -99,6 +99,15 @@ export const TRIGGER_PARAMS: TriggerParamDef[] = [
99
99
  placeholder: '250',
100
100
  stageTypes: ['modal', 'side_hint', 'retry'],
101
101
  },
102
+ {
103
+ key: 'depositSuccess',
104
+ label: 'Пополнение депозита',
105
+ description: 'Срабатывает после успешного пополнения; значение = мин. сумма (0 = любая)',
106
+ unit: '₽',
107
+ min: 0,
108
+ placeholder: '0',
109
+ stageTypes: ['modal', 'side_hint'],
110
+ },
102
111
  ];
103
112
 
104
113
  export const STAGE_TYPE_LABELS: Record<string, string> = {
@@ -357,7 +357,11 @@ const TriggerParamsField = forwardRef<HTMLDivElement, TriggerParamsFieldProps>(
357
357
  };
358
358
 
359
359
  const addParamToGroup = (idx: number, key: string) => {
360
- const next = groups.map((g, i) => (i === idx ? { ...g, [key]: null } : g));
360
+ // depositSuccess is an event trigger whose value is an optional min amount
361
+ // (0 = any). Default it to 0 so just adding it persists (serialize drops
362
+ // null), instead of silently requiring the user to type a value.
363
+ const defaultValue = key === 'depositSuccess' ? 0 : null;
364
+ const next = groups.map((g, i) => (i === idx ? { ...g, [key]: defaultValue } : g));
361
365
  update(next);
362
366
  };
363
367
 
@@ -97,6 +97,15 @@ const TRIGGER_PARAMS = [
97
97
  min: 0,
98
98
  placeholder: "250",
99
99
  stageTypes: ["modal", "side_hint", "retry"]
100
+ },
101
+ {
102
+ key: "depositSuccess",
103
+ label: "Пополнение депозита",
104
+ description: "Срабатывает после успешного пополнения; значение = мин. сумма (0 = любая)",
105
+ unit: "₽",
106
+ min: 0,
107
+ placeholder: "0",
108
+ stageTypes: ["modal", "side_hint"]
100
109
  }
101
110
  ];
102
111
  const STAGE_TYPE_LABELS = {
@@ -353,7 +362,8 @@ const TriggerParamsField = React.forwardRef(
353
362
  update(next.length > 0 ? next : [{}]);
354
363
  };
355
364
  const addParamToGroup = (idx, key) => {
356
- const next = groups.map((g, i) => i === idx ? { ...g, [key]: null } : g);
365
+ const defaultValue = key === "depositSuccess" ? 0 : null;
366
+ const next = groups.map((g, i) => i === idx ? { ...g, [key]: defaultValue } : g);
357
367
  update(next);
358
368
  };
359
369
  const removeParamFromGroup = (idx, key) => {
@@ -93,6 +93,15 @@ const TRIGGER_PARAMS = [
93
93
  min: 0,
94
94
  placeholder: "250",
95
95
  stageTypes: ["modal", "side_hint", "retry"]
96
+ },
97
+ {
98
+ key: "depositSuccess",
99
+ label: "Пополнение депозита",
100
+ description: "Срабатывает после успешного пополнения; значение = мин. сумма (0 = любая)",
101
+ unit: "₽",
102
+ min: 0,
103
+ placeholder: "0",
104
+ stageTypes: ["modal", "side_hint"]
96
105
  }
97
106
  ];
98
107
  const STAGE_TYPE_LABELS = {
@@ -349,7 +358,8 @@ const TriggerParamsField = forwardRef(
349
358
  update(next.length > 0 ? next : [{}]);
350
359
  };
351
360
  const addParamToGroup = (idx, key) => {
352
- const next = groups.map((g, i) => i === idx ? { ...g, [key]: null } : g);
361
+ const defaultValue = key === "depositSuccess" ? 0 : null;
362
+ const next = groups.map((g, i) => i === idx ? { ...g, [key]: defaultValue } : g);
353
363
  update(next);
354
364
  };
355
365
  const removeParamFromGroup = (idx, key) => {
@@ -155,7 +155,7 @@ const index = {
155
155
  components: {
156
156
  Input: async () => Promise.resolve().then(() => require(
157
157
  /* webpackChunkName: "crm-trigger-params" */
158
- "../_chunks/index-BqcFfrh8.js"
158
+ "../_chunks/index-C5C6nrJp.js"
159
159
  ))
160
160
  },
161
161
  options: {
@@ -154,7 +154,7 @@ const index = {
154
154
  components: {
155
155
  Input: async () => import(
156
156
  /* webpackChunkName: "crm-trigger-params" */
157
- "../_chunks/index-CKr1VvX0.mjs"
157
+ "../_chunks/index-nITpyOIQ.mjs"
158
158
  )
159
159
  },
160
160
  options: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inspirer-dev/crm-dashboard",
3
- "version": "1.0.94",
3
+ "version": "1.0.96",
4
4
  "description": "CRM Dashboard and Tools",
5
5
  "strapi": {
6
6
  "name": "crm-dashboard",