@inspirer-dev/crm-dashboard 1.0.96 → 1.0.97
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 +6 -4
- package/dist/_chunks/{index-nITpyOIQ.mjs → index-B6p8h4bP.mjs} +11 -1
- package/dist/_chunks/{index-C5C6nrJp.js → index-Bw4JD4Cy.js} +11 -1
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/package.json +1 -1
|
@@ -108,6 +108,15 @@ export const TRIGGER_PARAMS: TriggerParamDef[] = [
|
|
|
108
108
|
placeholder: '0',
|
|
109
109
|
stageTypes: ['modal', 'side_hint'],
|
|
110
110
|
},
|
|
111
|
+
{
|
|
112
|
+
key: 'depositCount',
|
|
113
|
+
label: 'Номер депозита',
|
|
114
|
+
description: 'Срабатывает строго на N-й успешный депозит (точное совпадение)',
|
|
115
|
+
unit: '',
|
|
116
|
+
min: 1,
|
|
117
|
+
placeholder: '2',
|
|
118
|
+
stageTypes: ['modal', 'side_hint'],
|
|
119
|
+
},
|
|
111
120
|
];
|
|
112
121
|
|
|
113
122
|
export const STAGE_TYPE_LABELS: Record<string, string> = {
|
|
@@ -357,10 +357,12 @@ const TriggerParamsField = forwardRef<HTMLDivElement, TriggerParamsFieldProps>(
|
|
|
357
357
|
};
|
|
358
358
|
|
|
359
359
|
const addParamToGroup = (idx: number, key: string) => {
|
|
360
|
-
//
|
|
361
|
-
// (
|
|
362
|
-
//
|
|
363
|
-
|
|
360
|
+
// Event triggers carry a value that must persist the moment they're added
|
|
361
|
+
// (serialize drops null), so seed a sensible default instead of silently
|
|
362
|
+
// requiring the user to type one: depositSuccess 0 = "any amount",
|
|
363
|
+
// depositCount 1 = "1st deposit".
|
|
364
|
+
const defaultOnAdd: Record<string, number> = { depositSuccess: 0, depositCount: 1 };
|
|
365
|
+
const defaultValue = key in defaultOnAdd ? defaultOnAdd[key] : null;
|
|
364
366
|
const next = groups.map((g, i) => (i === idx ? { ...g, [key]: defaultValue } : g));
|
|
365
367
|
update(next);
|
|
366
368
|
};
|
|
@@ -102,6 +102,15 @@ const TRIGGER_PARAMS = [
|
|
|
102
102
|
min: 0,
|
|
103
103
|
placeholder: "0",
|
|
104
104
|
stageTypes: ["modal", "side_hint"]
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
key: "depositCount",
|
|
108
|
+
label: "Номер депозита",
|
|
109
|
+
description: "Срабатывает строго на N-й успешный депозит (точное совпадение)",
|
|
110
|
+
unit: "",
|
|
111
|
+
min: 1,
|
|
112
|
+
placeholder: "2",
|
|
113
|
+
stageTypes: ["modal", "side_hint"]
|
|
105
114
|
}
|
|
106
115
|
];
|
|
107
116
|
const STAGE_TYPE_LABELS = {
|
|
@@ -358,7 +367,8 @@ const TriggerParamsField = forwardRef(
|
|
|
358
367
|
update(next.length > 0 ? next : [{}]);
|
|
359
368
|
};
|
|
360
369
|
const addParamToGroup = (idx, key) => {
|
|
361
|
-
const
|
|
370
|
+
const defaultOnAdd = { depositSuccess: 0, depositCount: 1 };
|
|
371
|
+
const defaultValue = key in defaultOnAdd ? defaultOnAdd[key] : null;
|
|
362
372
|
const next = groups.map((g, i) => i === idx ? { ...g, [key]: defaultValue } : g);
|
|
363
373
|
update(next);
|
|
364
374
|
};
|
|
@@ -106,6 +106,15 @@ const TRIGGER_PARAMS = [
|
|
|
106
106
|
min: 0,
|
|
107
107
|
placeholder: "0",
|
|
108
108
|
stageTypes: ["modal", "side_hint"]
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
key: "depositCount",
|
|
112
|
+
label: "Номер депозита",
|
|
113
|
+
description: "Срабатывает строго на N-й успешный депозит (точное совпадение)",
|
|
114
|
+
unit: "",
|
|
115
|
+
min: 1,
|
|
116
|
+
placeholder: "2",
|
|
117
|
+
stageTypes: ["modal", "side_hint"]
|
|
109
118
|
}
|
|
110
119
|
];
|
|
111
120
|
const STAGE_TYPE_LABELS = {
|
|
@@ -362,7 +371,8 @@ const TriggerParamsField = React.forwardRef(
|
|
|
362
371
|
update(next.length > 0 ? next : [{}]);
|
|
363
372
|
};
|
|
364
373
|
const addParamToGroup = (idx, key) => {
|
|
365
|
-
const
|
|
374
|
+
const defaultOnAdd = { depositSuccess: 0, depositCount: 1 };
|
|
375
|
+
const defaultValue = key in defaultOnAdd ? defaultOnAdd[key] : null;
|
|
366
376
|
const next = groups.map((g, i) => i === idx ? { ...g, [key]: defaultValue } : g);
|
|
367
377
|
update(next);
|
|
368
378
|
};
|
package/dist/admin/index.js
CHANGED
package/dist/admin/index.mjs
CHANGED