@inspirer-dev/crm-dashboard 1.0.93 → 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.
- package/admin/src/components/TriggerParamsField/constants.ts +9 -0
- package/admin/src/components/TriggerParamsField/index.tsx +5 -1
- package/dist/_chunks/{index-BqcFfrh8.js → index-C5C6nrJp.js} +11 -1
- package/dist/_chunks/{index-CKr1VvX0.mjs → index-nITpyOIQ.mjs} +11 -1
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/package.json +1 -1
|
@@ -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
|
-
|
|
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
|
|
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
|
|
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) => {
|
package/dist/admin/index.js
CHANGED
package/dist/admin/index.mjs
CHANGED