@antscorp/antsomi-ui 1.3.5-beta.839 → 1.3.5-beta.840
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.
|
@@ -94,7 +94,7 @@ export const generateRangeInfo = (rangeType) => {
|
|
|
94
94
|
return rangeInfo;
|
|
95
95
|
};
|
|
96
96
|
export const getDefaultDate = () => {
|
|
97
|
-
const toDayTz = dayjs(
|
|
97
|
+
const toDayTz = dayjs().startOf('d');
|
|
98
98
|
return {
|
|
99
99
|
toDay: toDayTz.toISOString(),
|
|
100
100
|
yesterday: toDayTz.subtract(1, 'd').toISOString(),
|
|
@@ -230,7 +230,11 @@ export const getRangeValue = ({ rangeInfo, currentRangeValue = [
|
|
|
230
230
|
}
|
|
231
231
|
return { ...rangeValue, ...temp };
|
|
232
232
|
});
|
|
233
|
-
return result
|
|
233
|
+
return result.map(range => ({
|
|
234
|
+
...range,
|
|
235
|
+
start: dayjs(range.start).startOf('d').toISOString(),
|
|
236
|
+
end: dayjs(range.end).endOf('d').toISOString(),
|
|
237
|
+
}));
|
|
234
238
|
};
|
|
235
239
|
export const getRangeValueSelctedTitle = (rangeValue, options) => {
|
|
236
240
|
const { formatStart, formatEnd, operator = '-' } = options || {};
|
|
@@ -274,32 +278,6 @@ export const genTriggerOut = (() => {
|
|
|
274
278
|
return { mode, id: id || catchedId };
|
|
275
279
|
};
|
|
276
280
|
})();
|
|
277
|
-
// export const serializeRangeColors = (rangeValue: RangeValue[]) => {
|
|
278
|
-
// const listDate = rangeValue
|
|
279
|
-
// .flatMap(range => [range.start, range.end])
|
|
280
|
-
// .sort((a, b) => ascending(a.toDate(), b.toDate()));
|
|
281
|
-
// let rangeDates = listDate.reduce<RangeValue[]>((acc, current, idx) => {
|
|
282
|
-
// if (listDate[idx + 1]) {
|
|
283
|
-
// acc.push({ start: current, end: listDate[idx + 1] });
|
|
284
|
-
// }
|
|
285
|
-
// return acc;
|
|
286
|
-
// }, []);
|
|
287
|
-
// rangeDates = uniqWith(rangeDates, (a, b) => a.start.isSame(b.start) && a.end.isSame(b.end));
|
|
288
|
-
// rangeDates = rangeDates.map(rangeDate => {
|
|
289
|
-
// const colors: string[] = [];
|
|
290
|
-
// rangeValue.forEach(range => {
|
|
291
|
-
// if (
|
|
292
|
-
// range.color &&
|
|
293
|
-
// rangeDate.start.isBetween(range.start, range.end, 'd', '[]') &&
|
|
294
|
-
// rangeDate.end.isBetween(range.start, range.end, 'd', '[]')
|
|
295
|
-
// ) {
|
|
296
|
-
// colors.push(range.color);
|
|
297
|
-
// }
|
|
298
|
-
// });
|
|
299
|
-
// return { ...rangeDate, colors: uniq(colors) };
|
|
300
|
-
// });
|
|
301
|
-
// return rangeDates;
|
|
302
|
-
// };
|
|
303
281
|
export const isAutoUpdateToOption = (value) => {
|
|
304
282
|
if (typeof value === 'string' && Object.values(AUTO_UPDATE_TO_KEY).some(v => v === value)) {
|
|
305
283
|
return true;
|
|
@@ -87,6 +87,7 @@ const Content = ({ apiKey, domain, portalId, token, action, ticketId, listUsers,
|
|
|
87
87
|
value: true,
|
|
88
88
|
});
|
|
89
89
|
// showMessage();
|
|
90
|
+
handleCloseDrawer();
|
|
90
91
|
}
|
|
91
92
|
else {
|
|
92
93
|
setIsSuccessCreated(false);
|
|
@@ -96,7 +97,6 @@ const Content = ({ apiKey, domain, portalId, token, action, ticketId, listUsers,
|
|
|
96
97
|
});
|
|
97
98
|
// showMessage('error', 'Save failed!');
|
|
98
99
|
}
|
|
99
|
-
handleCloseDrawer();
|
|
100
100
|
})
|
|
101
101
|
.catch(err => {
|
|
102
102
|
// console.log('err ===>', err)
|
|
@@ -1288,7 +1288,7 @@
|
|
|
1288
1288
|
"_TITL_TOTAL_TESTING_INPUT": "Total testing input",
|
|
1289
1289
|
"_TITL_TRACKED_TIME": "Tracked time",
|
|
1290
1290
|
"_TITL_TREAT_AS_CONVERSION_OBECJT": "Treat as Conversion Object",
|
|
1291
|
-
"_TOOLTIP__TITL_TREAT_AS_CONVERSION_OBECJT": "
|
|
1291
|
+
"_TOOLTIP__TITL_TREAT_AS_CONVERSION_OBECJT": "Coi như đối tượng chuyển đổi",
|
|
1292
1292
|
"_TITL_TRIGGER_EVENT": "{{trigger_event_name}}, where:",
|
|
1293
1293
|
"_TITL_TRIGGER_TIME": "Trigger time",
|
|
1294
1294
|
"_TITL_UNTITLED_MEASURE": "Untitled Measure",
|