kui-crm_actions 0.0.80 → 0.0.82

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/cjs/index.js CHANGED
@@ -223,7 +223,7 @@ var inspectionsRequestBody = {
223
223
  based_on: null,
224
224
  dropbox_link: inspection.dropboxLink,
225
225
  photo_groups: roomsImages,
226
- regular: __assign(__assign({}, this.getInspectionFilling(inspection.filling)), this.getPartialInspectionMeters(inspection.meters)),
226
+ regular: __assign(__assign({}, this.getInspectionFilling(inspection.fillingList)), this.getPartialInspectionMeters(inspection.meters)),
227
227
  };
228
228
  },
229
229
  getPostBodyTransferInspection: function (inspection, roomsImages) {
@@ -233,7 +233,7 @@ var inspectionsRequestBody = {
233
233
  based_on: null,
234
234
  dropbox_link: inspection.dropboxLink,
235
235
  photo_groups: roomsImages,
236
- transfer: __assign(__assign({ transfer_type: inspection.transferType }, this.getInspectionFilling(inspection.filling)), this.getPartialInspectionMeters(inspection.meters)),
236
+ transfer: __assign(__assign({ transfer_type: inspection.transferType }, this.getInspectionFilling(inspection.fillingList)), this.getPartialInspectionMeters(inspection.meters)),
237
237
  };
238
238
  },
239
239
  getInspectionFilling: function (fillingList) {
@@ -1001,7 +1001,7 @@ var templateObject_1$5, templateObject_2$4, templateObject_3$1;
1001
1001
 
1002
1002
  var InspectionFillingCard = function (props) {
1003
1003
  var className = props.className, form = props.form, index = props.index, disabled = props.disabled, other = __rest(props, ["className", "form", "index", "disabled"]);
1004
- return (jsxRuntime.jsx(StyledCard$1, __assign({ className: className }, { children: jsxRuntime.jsx(StyledCheckbox, { form: form, name: "filling.".concat(index, ".check"), label: jsxRuntime.jsx(FillingCardContent, __assign({}, other)), disabled: disabled }) })));
1004
+ return (jsxRuntime.jsx(StyledCard$1, __assign({ className: className }, { children: jsxRuntime.jsx(StyledCheckbox, { form: form, name: "fillingList.".concat(index, ".check"), label: jsxRuntime.jsx(FillingCardContent, __assign({}, other)), disabled: disabled }) })));
1005
1005
  };
1006
1006
  var StyledCard$1 = styled__default["default"](kuiBasic.Grid)(templateObject_1$4 || (templateObject_1$4 = __makeTemplateObject(["\n padding: 8px 16px;\n border-radius: 12px;\n background: white;\n"], ["\n padding: 8px 16px;\n border-radius: 12px;\n background: white;\n"])));
1007
1007
  var StyledCheckbox = styled__default["default"](kuiComplex.CheckboxWithController)(templateObject_2$3 || (templateObject_2$3 = __makeTemplateObject(["\n .KUI-Label_checkbox {\n margin-left: 0;\n }\n"], ["\n .KUI-Label_checkbox {\n margin-left: 0;\n }\n"])));
@@ -1024,13 +1024,13 @@ var useMetersValues = function (formStore, metersStore) {
1024
1024
  var FillingListStore = /** @class */ (function () {
1025
1025
  function FillingListStore() {
1026
1026
  var _this = this;
1027
- this.fetchFillingList = function (apartmentId) { return __awaiter(_this, void 0, void 0, function () {
1027
+ this.fetchFillingList = function (apartmentId, fillingType) { return __awaiter(_this, void 0, void 0, function () {
1028
1028
  var response;
1029
1029
  return __generator(this, function (_a) {
1030
1030
  switch (_a.label) {
1031
1031
  case 0:
1032
1032
  this.loader.startLoading();
1033
- return [4 /*yield*/, to__default["default"](kuiCrm.ApartmentsAgent.getFillingList(apartmentId))];
1033
+ return [4 /*yield*/, to__default["default"](kuiCrm.ApartmentsAgent.getFillingList(apartmentId, fillingType))];
1034
1034
  case 1:
1035
1035
  response = _a.sent();
1036
1036
  kuiUtils.resHandler(response, this.loader, this.updateFillingList);
@@ -1058,14 +1058,14 @@ var useFillingList = function (apartmentId, formStore, fillingStore) {
1058
1058
  react.useEffect(function () {
1059
1059
  var _a, _b;
1060
1060
  if (!((_b = (_a = formStore.fields) === null || _a === void 0 ? void 0 : _a.filling) === null || _b === void 0 ? void 0 : _b.length) && apartmentId) {
1061
- fillingStore.fetchFillingList(apartmentId);
1061
+ fillingStore.fetchFillingList(apartmentId, "appliance");
1062
1062
  }
1063
1063
  }, [apartmentId]);
1064
1064
  react.useEffect(function () {
1065
1065
  var _a, _b;
1066
1066
  if (!fillingStore.loader.isLoading && !((_b = (_a = formStore.fields) === null || _a === void 0 ? void 0 : _a.filling) === null || _b === void 0 ? void 0 : _b.length)) {
1067
1067
  formStore.updateFormFields({
1068
- filling: fillingStore.fillingList.map(function (filling) { return ({
1068
+ fillingList: fillingStore.fillingList.map(function (filling) { return ({
1069
1069
  id: filling.id,
1070
1070
  check: false,
1071
1071
  }); }),