kui-crm_actions 0.0.124 → 0.0.125

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/index.d.ts CHANGED
@@ -971,7 +971,7 @@ type InspectionFeedbackProps = {
971
971
 
972
972
  declare const _default: (props: InspectionFeedbackProps) => JSX.Element | null;
973
973
 
974
- declare const useMetersValues: (formStore: MultistepForm<any>, metersStore: ApartmentMetersStoreInterface, shouldBeLoad: boolean, onLoad?: (() => void) | undefined) => void;
974
+ declare const useMetersValues: (formStore: MultistepForm<any>, metersStore: ApartmentMetersStoreInterface, shouldBeLoad?: boolean | undefined, onLoad?: (() => void) | undefined) => void;
975
975
 
976
976
  declare class FillingListStore {
977
977
  fillingList: FillingCheckParams[];
@@ -981,7 +981,7 @@ declare class FillingListStore {
981
981
  updateFillingList: (fillingList: FillingListItemModel[]) => void;
982
982
  }
983
983
 
984
- declare const useFillingList: (apartmentId: number | null, formStore: MultistepForm<any>, fillingStore: FillingListStore, shouldBeLoad: boolean, onLoad?: (() => void) | undefined) => void;
984
+ declare const useFillingList: (apartmentId: number | null, formStore: MultistepForm<any>, fillingStore: FillingListStore, shouldBeLoad?: boolean | undefined, onLoad?: (() => void) | undefined) => void;
985
985
 
986
986
  type AddedMetersBlockProps = {
987
987
  formStore: MultistepForm<any>
package/index.js CHANGED
@@ -1108,7 +1108,7 @@ var useMetersValues = function (formStore, metersStore, shouldBeLoad, onLoad) {
1108
1108
  _c.label = 2;
1109
1109
  case 2: return [3 /*break*/, 4];
1110
1110
  case 3:
1111
- if (onLoad)
1111
+ if (shouldBeLoad === false && onLoad)
1112
1112
  onLoad();
1113
1113
  _c.label = 4;
1114
1114
  case 4: return [2 /*return*/];
@@ -1117,7 +1117,7 @@ var useMetersValues = function (formStore, metersStore, shouldBeLoad, onLoad) {
1117
1117
  }); };
1118
1118
  useEffect(function () {
1119
1119
  loadMeters();
1120
- }, []);
1120
+ }, [shouldBeLoad]);
1121
1121
  useEffect(function () {
1122
1122
  if (!metersStore.loader.isLoading) {
1123
1123
  formStore.updateFormFields({ meters: metersStore.meters });
@@ -1176,7 +1176,7 @@ var useFillingList = function (apartmentId, formStore, fillingStore, shouldBeLoa
1176
1176
  _c.label = 2;
1177
1177
  case 2: return [3 /*break*/, 4];
1178
1178
  case 3:
1179
- if (onLoad)
1179
+ if (shouldBeLoad === false && onLoad)
1180
1180
  onLoad();
1181
1181
  _c.label = 4;
1182
1182
  case 4: return [2 /*return*/];
@@ -1185,7 +1185,7 @@ var useFillingList = function (apartmentId, formStore, fillingStore, shouldBeLoa
1185
1185
  }); };
1186
1186
  useEffect(function () {
1187
1187
  loadFillingList();
1188
- }, [apartmentId]);
1188
+ }, [apartmentId, shouldBeLoad]);
1189
1189
  useEffect(function () {
1190
1190
  var _a, _b;
1191
1191
  if (!fillingStore.loader.isLoading && !((_b = (_a = formStore.fields) === null || _a === void 0 ? void 0 : _a.filling) === null || _b === void 0 ? void 0 : _b.length)) {