@dexteel/mesf-core 4.25.0 → 4.25.2

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.
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "4.25.0"
2
+ ".": "4.25.2"
3
3
  }
package/CHANGELOG.md CHANGED
@@ -1,3 +1,29 @@
1
+ # Changelog
2
+
3
+ ## [4.25.2](https://github.com/dexteel/mesf-core-frontend/compare/@dexteel/mesf-core-v4.25.1...@dexteel/mesf-core-v4.25.2) (2025-02-11)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **Error Modal:** fix error message when using callV2 ([399bf3e](https://github.com/dexteel/mesf-core-frontend/commit/399bf3e15443b77a5f220d38f50702fd3d0e2f40))
9
+
10
+ ## [4.25.1] - 2025-02-05
11
+
12
+
13
+
14
+ # Changelog
15
+
16
+ ## [4.25.1](https://github.com/dexteel/mesf-core-frontend/compare/@dexteel/mesf-core-v4.25.0...@dexteel/mesf-core-v4.25.1) (2025-02-05)
17
+
18
+
19
+ ### Bug Fixes
20
+
21
+ * **ShiftNavigator:** Check every minute if need to reload ([b404f9b](https://github.com/dexteel/mesf-core-frontend/commit/b404f9bc7231d76bcdc3c9edbf79351f3f07a9b9))
22
+
23
+ ## [4.25.0] - 2025-02-04
24
+
25
+
26
+
1
27
  # Changelog
2
28
 
3
29
  ## [4.25.0](https://github.com/dexteel/mesf-core-frontend/compare/@dexteel/mesf-core-v4.24.1...@dexteel/mesf-core-v4.25.0) (2025-02-04)
package/dist/index.esm.js CHANGED
@@ -235,7 +235,7 @@ var MesfModal = Object.assign(Modal, {
235
235
  });
236
236
 
237
237
  var ErrorModal = function (_a) {
238
- var error = _a.error, onHide = _a.onHide, _b = _a.title, title = _b === void 0 ? "Something went wrong!" : _b, _c = _a.size, size = _c === void 0 ? "md" : _c;
238
+ var error = _a.error, onHide = _a.onHide, _b = _a.title, title = _b === void 0 ? "Ups!" : _b, _c = _a.size, size = _c === void 0 ? "md" : _c;
239
239
  return !!error ? (React__default.createElement(MesfModal, { open: true, handleClose: function () {
240
240
  onHide();
241
241
  }, title: title, maxWidth: size },
@@ -7273,7 +7273,7 @@ var getError = function (error) {
7273
7273
  if (arrayOfErrors.length) {
7274
7274
  allErrors = concatErrorMessagges(arrayOfErrors, allErrors);
7275
7275
  }
7276
- return get$1(error, "response.data.result", get$1(error, "internalError.message", get$1(error, "response.data.detail", get$1(error, "response.data.title", error.toString()) + " " + allErrors)));
7276
+ return get$1(error, "response.data.result", get$1(error, "response.data.message", get$1(error, "internalError.message", get$1(error, "response.data.detail", get$1(error, "response.data.title", error.toString()) + " " + allErrors))));
7277
7277
  };
7278
7278
  var concatErrorMessagges = function (arrayOfErrors, string) {
7279
7279
  arrayOfErrors.forEach(function (element, index) {
@@ -8164,40 +8164,42 @@ var ShiftDayNavigatorControl = function (props) {
8164
8164
  }
8165
8165
  }
8166
8166
  useEffect(function () {
8167
- if ((shiftInfo === null || shiftInfo === void 0 ? void 0 : shiftInfo.CurrentEnd) && shiftInfo.CurrentEnd < new Date()) {
8168
- var fn = function () { return __awaiter(void 0, void 0, void 0, function () {
8169
- var resp, shift, e_1;
8170
- return __generator(this, function (_a) {
8171
- switch (_a.label) {
8172
- case 0:
8173
- _a.trys.push([0, 2, , 3]);
8174
- return [4 /*yield*/, getShiftByParameters({
8175
- productionDate: null,
8176
- shiftId: shiftInfo.CurrentShiftId
8177
- })];
8178
- case 1:
8179
- resp = _a.sent();
8180
- if (resp.ok) {
8181
- shift = __assign(__assign({}, resp.data), { CurrentProductionDate: moment$2
8182
- .utc(resp.data.CurrentProductionDate)
8183
- .toDate(), CurrentStart: moment$2.utc(resp.data.CurrentStart).toDate(), CurrentEnd: moment$2.utc(resp.data.CurrentEnd).toDate(), PreviousProductionDate: moment$2
8184
- .utc(resp.data.PreviousProductionDate)
8185
- .toDate(), PreviousStart: moment$2.utc(resp.data.PreviousStart).toDate(), PreviousEnd: moment$2.utc(resp.data.PreviousEnd).toDate(), LastProductionDate: moment$2
8186
- .utc(resp.data.LastProductionDate)
8187
- .toDate(), LastStart: moment$2.utc(resp.data.LastStart).toDate(), LastEnd: moment$2.utc(resp.data.LastEnd).toDate() });
8188
- setShiftInfoCopy(shift);
8189
- }
8190
- return [3 /*break*/, 3];
8191
- case 2:
8192
- e_1 = _a.sent();
8193
- setError(getError(e_1));
8194
- return [3 /*break*/, 3];
8195
- case 3: return [2 /*return*/];
8196
- }
8197
- });
8198
- }); };
8199
- fn();
8200
- }
8167
+ var fn = function () { return __awaiter(void 0, void 0, void 0, function () {
8168
+ var resp, shift, e_1;
8169
+ return __generator(this, function (_a) {
8170
+ switch (_a.label) {
8171
+ case 0:
8172
+ if (!((shiftInfo === null || shiftInfo === void 0 ? void 0 : shiftInfo.CurrentEnd) && shiftInfo.CurrentEnd < new Date())) return [3 /*break*/, 4];
8173
+ _a.label = 1;
8174
+ case 1:
8175
+ _a.trys.push([1, 3, , 4]);
8176
+ return [4 /*yield*/, getShiftByParameters({
8177
+ productionDate: null,
8178
+ shiftId: shiftInfo.CurrentShiftId
8179
+ })];
8180
+ case 2:
8181
+ resp = _a.sent();
8182
+ if (resp.ok) {
8183
+ shift = __assign(__assign({}, resp.data), { CurrentProductionDate: moment$2
8184
+ .utc(resp.data.CurrentProductionDate)
8185
+ .toDate(), CurrentStart: moment$2.utc(resp.data.CurrentStart).toDate(), CurrentEnd: moment$2.utc(resp.data.CurrentEnd).toDate(), PreviousProductionDate: moment$2
8186
+ .utc(resp.data.PreviousProductionDate)
8187
+ .toDate(), PreviousStart: moment$2.utc(resp.data.PreviousStart).toDate(), PreviousEnd: moment$2.utc(resp.data.PreviousEnd).toDate(), LastProductionDate: moment$2
8188
+ .utc(resp.data.LastProductionDate)
8189
+ .toDate(), LastStart: moment$2.utc(resp.data.LastStart).toDate(), LastEnd: moment$2.utc(resp.data.LastEnd).toDate() });
8190
+ setShiftInfoCopy(shift);
8191
+ }
8192
+ return [3 /*break*/, 4];
8193
+ case 3:
8194
+ e_1 = _a.sent();
8195
+ setError(getError(e_1));
8196
+ return [3 /*break*/, 4];
8197
+ case 4: return [2 /*return*/];
8198
+ }
8199
+ });
8200
+ }); };
8201
+ var interval = setInterval(fn, 1000 * 60);
8202
+ return function () { return clearInterval(interval); };
8201
8203
  }, [shiftInfo]);
8202
8204
  useEffect(function () {
8203
8205
  setShiftInfoCopy(shiftInfo);