tek-wallet 0.0.445 → 0.0.449
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/components/ui/Activities/index.js +1 -1
- package/dist/components/ui/ActivitiesTypeSlice/index.js +3 -2
- package/dist/components/ui/EmptyData/index.js +1 -1
- package/dist/providers/ActivitiesProvider/index.js +2 -2
- package/dist/services/axios/get-activities-service/type.d.ts +1 -1
- package/package.json +1 -1
|
@@ -95,7 +95,7 @@ var Activities = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
95
95
|
flex: 1,
|
|
96
96
|
}, children: activityTypes === null || activityTypes === void 0 ? void 0 : activityTypes.map(function (type, index) {
|
|
97
97
|
return ((0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { style: {
|
|
98
|
-
|
|
98
|
+
position: "relative",
|
|
99
99
|
}, children: (0, jsx_runtime_1.jsx)(ActivitiesTypeSlice_1.default, { type: type, isActive: true }) }, index));
|
|
100
100
|
}) }) }) }) }) }));
|
|
101
101
|
});
|
|
@@ -51,13 +51,14 @@ function ActivitiesTypeSlice(props) {
|
|
|
51
51
|
return;
|
|
52
52
|
if (!!activitiesByType)
|
|
53
53
|
return;
|
|
54
|
+
console.warn("🚀 ~ useEffect ~ type:", type);
|
|
54
55
|
updateActivities({
|
|
55
|
-
|
|
56
|
+
transaction_types: type.slug,
|
|
56
57
|
page: 1,
|
|
57
58
|
take: 10,
|
|
58
59
|
});
|
|
59
60
|
}, [isActive, type, activitiesByType, updateActivities]);
|
|
60
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { children: [status === Status.Empty && ((0, jsx_runtime_1.jsx)(EmptyData_1.default, { icon: (0, getIcon_1.default)(prefix + "empty_" + type.slug), description: "No ".concat((_a = type.name) === null || _a === void 0 ? void 0 : _a.toLowerCase(), " activity") })), status === Status.Filled && ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g12, paddingTop: theme.mixins.customPadding.p16 }), children: activitiesByType === null || activitiesByType === void 0 ? void 0 : activitiesByType.map(function (activity, index) {
|
|
61
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { width: "100%", height: "100%", display: "flex" }, children: [status === Status.Empty && ((0, jsx_runtime_1.jsx)(EmptyData_1.default, { sx: { margin: "auto" }, icon: (0, getIcon_1.default)(prefix + "empty_" + type.slug), description: "No ".concat((_a = type.name) === null || _a === void 0 ? void 0 : _a.toLowerCase(), " activity") })), status === Status.Filled && ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g12, paddingTop: theme.mixins.customPadding.p16 }), children: activitiesByType === null || activitiesByType === void 0 ? void 0 : activitiesByType.map(function (activity, index) {
|
|
61
62
|
if (!activity)
|
|
62
63
|
return null;
|
|
63
64
|
var dataAsJson = JSON.stringify(activity);
|
|
@@ -21,6 +21,6 @@ var Icon_1 = __importDefault(require("../Icon"));
|
|
|
21
21
|
var Button_1 = __importDefault(require("../Button"));
|
|
22
22
|
function EmptyData(props) {
|
|
23
23
|
var theme = (0, material_1.useTheme)();
|
|
24
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g16, alignItems: "center", justifyContent: "center" }), children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { width: 48, src: props.icon }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.sessionTitle), children: props.title }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.sessionDescription), children: props.description }), props.action && ((0, jsx_runtime_1.jsx)(Button_1.default.Primary, { onClick: props.action, children: props.actionText }))] }));
|
|
24
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g16, alignItems: "center", justifyContent: "center" }), props.sx), children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { width: 48, src: props.icon }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.sessionTitle), children: props.title }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.sessionDescription), children: props.description }), props.action && ((0, jsx_runtime_1.jsx)(Button_1.default.Primary, { onClick: props.action, children: props.actionText }))] }));
|
|
25
25
|
}
|
|
26
26
|
exports.default = EmptyData;
|
|
@@ -125,7 +125,7 @@ function ActivitiesProvider(_a) {
|
|
|
125
125
|
return __generator(this, function (_d) {
|
|
126
126
|
switch (_d.label) {
|
|
127
127
|
case 0:
|
|
128
|
-
slug = (_a = query === null || query === void 0 ? void 0 : query.
|
|
128
|
+
slug = (_a = query === null || query === void 0 ? void 0 : query.transaction_types) !== null && _a !== void 0 ? _a : const_1.ACTIVITIES_TYPE_ALL.slug;
|
|
129
129
|
_d.label = 1;
|
|
130
130
|
case 1:
|
|
131
131
|
_d.trys.push([1, 3, , 4]);
|
|
@@ -172,7 +172,7 @@ function ActivitiesProvider(_a) {
|
|
|
172
172
|
page: page,
|
|
173
173
|
take: const_1.ACTIVITIES_PAGE_SIZE,
|
|
174
174
|
});
|
|
175
|
-
}, [updateActivities]);
|
|
175
|
+
}, [updateActivities, activities]);
|
|
176
176
|
return ((0, jsx_runtime_1.jsx)(exports.ActivitiesContext.Provider, { value: {
|
|
177
177
|
isLoadingActivities: isLoadingActivities,
|
|
178
178
|
activities: activities,
|