kui-crm_actions 0.0.76 → 0.0.79

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
@@ -1,11 +1,11 @@
1
1
  import * as kui_crm from 'kui-crm';
2
- import { InputParams, ResourceTypes, MeterTypes, FileStore, InputFileWithVisibilityFields, MeterFeaturesFormFields, InspectionTypes, InspectionRoomPhotoTypes, ParkingTypes, CityParams, RoomTypes, RenovationParams, RoomParams, ImageStore, ApartmentDescriptionParams, ApartmentMetroStationsParams, PhoneParams, WifiParams, InternetProviderParams, TVTypes, CompanyAutocompleteFields, CountryAutocompleteFields, TaxesTypes, MetersCountParams, FillingTagsAutocompleteFields, ApartmentFillingVariants, ImageBodyRequest, FillingInfoFormFields as FillingInfoFormFields$1, ContractLinkModel, FileBodyRequest, RoomType, ApartmentMainInfoModelFields, ApartmentDetailInfoModelFields, ApartmentModel, ApartmentPartialDescriptionParams, MainObjectInfoInterface, ApartmentMainInfoParams, SecurityObjectInfoInterface, ApartmentSecurityInfoParams, DetailObjectInfoInterface, ApartmentDetailInfoParams, ApartmentTelecommunicationInfoParams, ApartmentHouseInfoParams, MaxMetersInfoParams, LatLonParams, InspectionRoomPhotoModel, InspectionFillingModel, ApartmentMetroParams, TransferInspectionMeterModel, InventoryInspectionMeterModel, InspectionPartialMetersInfoParams, ApartmentPaymentInfoParams, FullInspectionCommonFields, InspectionPaymentInfoParams, InspectionMeterCommonInfo, InspectionMeterInfoParams, InventoryInspectionFields, InspectionMetersInfoParams, InspectionFeedbackParams, GeolocationParams } from 'kui-crm';
2
+ import { InputParams, ResourceTypes, MeterTypes, FileStore, InputFileWithVisibilityFields, MeterFeaturesFormFields, InspectionTypes, InspectionRoomPhotoTypes, ParkingTypes, CityParams, RoomTypes, RenovationParams, RoomParams, ImageStore, ApartmentDescriptionParams, ApartmentMetroStationsParams, PhoneParams, WifiParams, InternetProviderParams, TVTypes, CompanyAutocompleteFields, CountryAutocompleteFields, TaxesTypes, MetersCountParams, FillingTagsAutocompleteFields, ApartmentFillingVariants, ImageBodyRequest, FillingInfoFormFields as FillingInfoFormFields$1, ContractLinkModel, FileBodyRequest, RoomType, ApartmentMainInfoModelFields, PostInspectionFillingListModel, ApartmentDetailInfoModelFields, ApartmentModel, ApartmentPartialDescriptionParams, MainObjectInfoInterface, ApartmentMainInfoParams, SecurityObjectInfoInterface, ApartmentSecurityInfoParams, DetailObjectInfoInterface, ApartmentDetailInfoParams, ApartmentTelecommunicationInfoParams, ApartmentHouseInfoParams, MaxMetersInfoParams, LatLonParams, InspectionRoomPhotoModel, InspectionFillingModel, ApartmentMetroParams, TransferInspectionMeterModel, InventoryInspectionMeterModel, InspectionPartialMetersInfoParams, ApartmentPaymentInfoParams, FullInspectionCommonFields, InspectionPaymentInfoParams, InspectionMeterCommonInfo, InspectionMeterInfoParams, InventoryInspectionFields, InspectionMetersInfoParams, InspectionFeedbackParams, FillingListItemModel, GeolocationParams } from 'kui-crm';
3
3
  import { DateTime } from 'luxon';
4
4
  import { Loader, MultistepForm, PhoneParams as PhoneParams$1 } from 'kui-utils';
5
5
  import * as yup from 'yup';
6
6
  import { InputWithAddressFields } from 'kui-complex/dist/InputWithAddressAutocomplete';
7
- import { ReactElement } from 'react';
8
7
  import { UseFormReturn } from 'react-hook-form';
8
+ import { ReactElement } from 'react';
9
9
 
10
10
  declare const getPartialMeterInfoSchema: (valuesFields: InputParams<any>[]) => yup.ObjectSchema<{
11
11
  [x: string]: any;
@@ -141,6 +141,26 @@ type InitialInspectionInfoFields = BasicApartmentInfoStepFields &
141
141
  RoomsApartmentInfoStepFields &
142
142
  DetailApartmentInfoStepFields
143
143
 
144
+ type InspectionFillingCardProps = {
145
+ className?: string
146
+ form: UseFormReturn<any>
147
+ index: number
148
+ filling: FillingCheckParams
149
+ warningLabel: string
150
+ disabled?: boolean
151
+ }
152
+
153
+ type InspectionFillingItemFields = {
154
+ id: number
155
+ check: boolean
156
+ }
157
+
158
+ type InspectionFillingListFields = {
159
+ filling: InspectionFillingItemFields[]
160
+ }
161
+
162
+ declare const InspectionFillingCard: (props: InspectionFillingCardProps) => JSX.Element;
163
+
144
164
  type TransferInspectionTypes =
145
165
  | "maroom_tenant"
146
166
  | "tenant_maroom"
@@ -148,13 +168,15 @@ type TransferInspectionTypes =
148
168
 
149
169
  type RegularInspectionFormFields = CommonInspectionFormFields &
150
170
  InspectionPartialMetersStepFields &
151
- InspectionRoomsImagesFields
171
+ InspectionRoomsImagesFields &
172
+ InspectionFillingListFields
152
173
 
153
174
  type TransferInspectionFormFields = {
154
175
  transferType: TransferInspectionTypes
155
176
  } & CommonInspectionFormFields &
156
177
  InspectionPartialMetersStepFields &
157
- InspectionRoomsImagesFields
178
+ InspectionRoomsImagesFields &
179
+ InspectionFillingListFields
158
180
 
159
181
  type MeterValue = string | number | null
160
182
 
@@ -186,7 +208,7 @@ type FillingCheckParams = {
186
208
  name: string
187
209
  serialNumber?: string
188
210
  numberOfSubjects?: number | string | null
189
- wasAvailable?: boolean
211
+ wasMissing?: boolean
190
212
  }
191
213
 
192
214
  type HouseServicesInfoStepFields = {
@@ -359,11 +381,11 @@ declare type InitialInspectionFieldsBody = {
359
381
  } & Omit<Partial<ApartmentMainInfoModelFields>, "city" | "rooms">;
360
382
  declare type RegularlyInspectionFieldsBody = {
361
383
  meters: PartialMeterModel[];
362
- };
384
+ } & PostInspectionFillingListModel;
363
385
  declare type TransferInspectionFieldsBody = {
364
386
  transfer_type: TransferInspectionTypes;
365
387
  meters: PartialMeterModel[];
366
- };
388
+ } & PostInspectionFillingListModel;
367
389
  declare type InventoryInspectionFieldsBody = {
368
390
  country_of_residence: number | null;
369
391
  administrative_company: number | null;
@@ -402,6 +424,12 @@ declare const inspectionsRequestBody: {
402
424
  getInitialInspectionFields(inspection: InitialInspectionInfoFields): InitialInspectionFieldsBody;
403
425
  getPostBodyRegularInspection(inspection: RegularInspectionFormFields, roomsImages: InspectionRoomPhotoRequest[]): RegularInspectionPostBody;
404
426
  getPostBodyTransferInspection(inspection: TransferInspectionFormFields, roomsImages: InspectionRoomPhotoRequest[]): TransferInspectionPostBody;
427
+ getInspectionFilling(fillingList: InspectionFillingItemFields[]): {
428
+ filling: {
429
+ apartment_feature_id: number;
430
+ is_absent: boolean;
431
+ }[];
432
+ };
405
433
  getPartialInspectionMeters(meters: PartialMeterInfoFields[]): {
406
434
  meters: {
407
435
  id: number;
@@ -427,7 +455,7 @@ declare const inspectionsRequestBody: {
427
455
  id: number | undefined;
428
456
  meter_type: kui_crm.MeterTypes | undefined;
429
457
  passport_number: string;
430
- resource_type: "water" | "electricity" | "gas" | "heating";
458
+ resource_type: "electricity" | "water" | "gas" | "heating";
431
459
  activation_date: string | null;
432
460
  operating_account: string | null | undefined;
433
461
  company: number | undefined;
@@ -464,7 +492,7 @@ declare const inspectionsRequestBody: {
464
492
  id: number | undefined;
465
493
  meter_type: kui_crm.MeterTypes | undefined;
466
494
  passport_number: string;
467
- resource_type: "water" | "electricity" | "gas" | "heating";
495
+ resource_type: "electricity" | "water" | "gas" | "heating";
468
496
  activation_date: string | null;
469
497
  operating_account: string | null | undefined;
470
498
  company: number | undefined;
@@ -497,7 +525,7 @@ declare const apartmentFields: {
497
525
  name: string;
498
526
  };
499
527
  images: ImageStore[];
500
- serialNumber: string | undefined;
528
+ serialNumber: string;
501
529
  numberOfSubjects: number;
502
530
  instruction: FileStore | null;
503
531
  type: ApartmentFillingVariants;
@@ -583,8 +611,8 @@ declare const DetailApartmentInfoStepSchema: yup.ObjectSchema<{
583
611
  numberOfWindows: number;
584
612
  renovation: {
585
613
  type: string;
586
- year: number;
587
614
  style: string;
615
+ year: number;
588
616
  };
589
617
  }, yup.AnyObject, {
590
618
  area: undefined;
@@ -767,8 +795,8 @@ declare const MetersInfoFieldsSchema: {
767
795
  };
768
796
  declare const MetersInfoStepSchema: yup.ObjectSchema<{
769
797
  maxMeters: {
770
- water: number;
771
798
  electricity: number;
799
+ water: number;
772
800
  gas: number;
773
801
  heating: number;
774
802
  };
@@ -841,27 +869,16 @@ type InspectionFeedbackProps = {
841
869
 
842
870
  declare const _default: (props: InspectionFeedbackProps) => JSX.Element | null;
843
871
 
844
- type InspectionFillingCardProps = {
845
- className?: string
846
- form: UseFormReturn<any>
847
- index: number
848
- filling: FillingCheckParams
849
- warningLabel: string
850
- }
851
-
852
- type InspectionFillingItemFields = {
853
- id: number
854
- check: boolean
855
- }
872
+ declare const useMetersValues: (formStore: MultistepForm<any>, metersStore: ApartmentMetersStoreInterface) => void;
856
873
 
857
- type InspectionFillingListFields = {
858
- filling: InspectionFillingItemFields[]
874
+ declare class FillingListStore {
875
+ fillingList: FillingCheckParams[];
876
+ loader: Loader;
877
+ constructor();
878
+ fetchFillingList: (apartmentId: number) => Promise<void>;
879
+ updateFillingList: (fillingList: FillingListItemModel[]) => void;
859
880
  }
860
881
 
861
- declare const InspectionFillingCard: (props: InspectionFillingCardProps) => JSX.Element;
862
-
863
- declare const useMetersValues: (formStore: MultistepForm<any>, metersStore: ApartmentMetersStoreInterface) => void;
864
-
865
882
  declare type InspectionFieldsSettings = {
866
883
  [key: string]: InputParams<any>;
867
884
  };
@@ -913,4 +930,4 @@ type ApartmentOverlayProps = {
913
930
 
914
931
  declare const ApartmentInspectionOverlay: (props: ApartmentOverlayProps) => JSX.Element;
915
932
 
916
- export { AdditionalInfoFieldsSchema, AdditionalInfoStepFields, AdditionalInfoStepSchema, ApartmentInspectionModel, ApartmentInspectionOverlay, ApartmentInspectionParams, ApartmentLinkParams, ApartmentPaymentsFormFields, BasicApartmentInfoFieldsSchema, BasicApartmentInfoStepFields, BasicApartmentInfoStepSchema, CommonInspectionFields, CommonInspectionFormFields, DetailApartmentInfoFieldsSchema, DetailApartmentInfoStepFields, DetailApartmentInfoStepSchema, FillingCheckParams, FillingInfoFieldsSchema, FillingInfoFormFields, FillingInfoStepFields, FillingListInfoStepFields, HouseServicesInfoFieldsSchema, HouseServicesInfoStepFields, HouseServicesInfoStepSchema, InitialInspectionFieldsBody, InitialInspectionFormFields, InitialInspectionInfoFields, InitialInspectionPostBody, InitialInspectionRoomParams, InspectionAppraisalLiteModel, _default as InspectionFeedback, InspectionFieldsSettings, InspectionFillingCard, InspectionFillingCardProps, InspectionFillingItemFields, InspectionFillingListFields, InspectionFillingParams, InspectionImpairmentLiteModel, InspectionMeterCommonFields, InspectionMeterFields, InspectionMeterValueModel, InspectionMetersStepFields, InspectionPartialMetersStepFields, InspectionRoomImagesParams, InspectionRoomPhotoRequest, InspectionRoomsImagesFields, InventoryInspectionFieldsBody, InventoryInspectionFormFields, InventoryInspectionPostBody, InventoryMeterModel, MeterInfoStepProps, MeterValueModel, MeterValuesFields, MetersInfoFieldsSchema, MetersInfoStepFields, MetersInfoStepSchema, MetroStationParams, PartialMeterInfoFields, PartialMeterInfoStepProps, PartialMeterModel, PostApartmentInspectionRequest, RegularInspectionFormFields, RegularInspectionPostBody, RegularlyInspectionFieldsBody, RoomImagesParams, RoomsApartmentInfoFieldsSchema, RoomsApartmentInfoStepFields, RoomsApartmentInfoStepSchema, SecurityApartmentInfoFieldsSchema, SecurityApartmentInfoStepFields, SecurityApartmentInfoStepSchema, TelecommunicationsInfoFieldsSchema, TelecommunicationsInfoStepFields, TelecommunicationsInfoStepSchema, TenantParams, TransferInspectionFieldsBody, TransferInspectionFormFields, TransferInspectionPostBody, TransferInspectionTypes, WaterMeterFieldsSchema, apartmentFields, getAdditionalInfoStepFields, getBasicApartmentInfoFields, getDetailApartmentInfoFields, getFillingInfoFields, getHouseServicesInfoStep, getMetersInfoStepFields, getPartialMeterInfoSchema, getRoomsApartmentInfoFields, getRoomsImagesSteps, getSecurityApartmentInfoFields, getTelecommunicationsInfoStepFields, getWaterMeterFields, inspectionsRequestBody, inspectionsRequests, renderMetersSteps, useMetersValues };
933
+ export { AdditionalInfoFieldsSchema, AdditionalInfoStepFields, AdditionalInfoStepSchema, ApartmentInspectionModel, ApartmentInspectionOverlay, ApartmentInspectionParams, ApartmentLinkParams, ApartmentPaymentsFormFields, BasicApartmentInfoFieldsSchema, BasicApartmentInfoStepFields, BasicApartmentInfoStepSchema, CommonInspectionFields, CommonInspectionFormFields, DetailApartmentInfoFieldsSchema, DetailApartmentInfoStepFields, DetailApartmentInfoStepSchema, FillingCheckParams, FillingInfoFieldsSchema, FillingInfoFormFields, FillingInfoStepFields, FillingListInfoStepFields, FillingListStore, HouseServicesInfoFieldsSchema, HouseServicesInfoStepFields, HouseServicesInfoStepSchema, InitialInspectionFieldsBody, InitialInspectionFormFields, InitialInspectionInfoFields, InitialInspectionPostBody, InitialInspectionRoomParams, InspectionAppraisalLiteModel, _default as InspectionFeedback, InspectionFieldsSettings, InspectionFillingCard, InspectionFillingCardProps, InspectionFillingItemFields, InspectionFillingListFields, InspectionFillingParams, InspectionImpairmentLiteModel, InspectionMeterCommonFields, InspectionMeterFields, InspectionMeterValueModel, InspectionMetersStepFields, InspectionPartialMetersStepFields, InspectionRoomImagesParams, InspectionRoomPhotoRequest, InspectionRoomsImagesFields, InventoryInspectionFieldsBody, InventoryInspectionFormFields, InventoryInspectionPostBody, InventoryMeterModel, MeterInfoStepProps, MeterValueModel, MeterValuesFields, MetersInfoFieldsSchema, MetersInfoStepFields, MetersInfoStepSchema, MetroStationParams, PartialMeterInfoFields, PartialMeterInfoStepProps, PartialMeterModel, PostApartmentInspectionRequest, RegularInspectionFormFields, RegularInspectionPostBody, RegularlyInspectionFieldsBody, RoomImagesParams, RoomsApartmentInfoFieldsSchema, RoomsApartmentInfoStepFields, RoomsApartmentInfoStepSchema, SecurityApartmentInfoFieldsSchema, SecurityApartmentInfoStepFields, SecurityApartmentInfoStepSchema, TelecommunicationsInfoFieldsSchema, TelecommunicationsInfoStepFields, TelecommunicationsInfoStepSchema, TenantParams, TransferInspectionFieldsBody, TransferInspectionFormFields, TransferInspectionPostBody, TransferInspectionTypes, WaterMeterFieldsSchema, apartmentFields, getAdditionalInfoStepFields, getBasicApartmentInfoFields, getDetailApartmentInfoFields, getFillingInfoFields, getHouseServicesInfoStep, getMetersInfoStepFields, getPartialMeterInfoSchema, getRoomsApartmentInfoFields, getRoomsImagesSteps, getSecurityApartmentInfoFields, getTelecommunicationsInfoStepFields, getWaterMeterFields, inspectionsRequestBody, inspectionsRequests, renderMetersSteps, useMetersValues };
package/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as yup from 'yup';
2
- import { NumberField, requests, uploadFiles, ImageStore, FileStore, matchesAPIFillingTypes, CountryAutocomplete, RegionAutocomplete, CityAutocomplete, RenovationTypeValues, RenovationStyleValues, RoomTypeValues, RoomTypesValues, BooleanValues, ParkingTypesValues, fieldWithConditionSchema, defaultRequiredMessage, getApartmentPaymentFields, phoneWithConditionSchema, positiveNumberSchema, getNumbersValues, TVTypesValues, phoneNonRequiredSchema, InputFileWithVisibility, FillingTypeValues, FillingTagsAutocomplete, Tooltip, PreviewContent, Link, UserBadge, useMapCards, MapOverlay } from 'kui-crm';
2
+ import { NumberField, requests, uploadFiles, ImageStore, FileStore, matchesAPIFillingTypes, CountryAutocomplete, RegionAutocomplete, CityAutocomplete, RenovationTypeValues, RenovationStyleValues, RoomTypeValues, RoomTypesValues, BooleanValues, ParkingTypesValues, fieldWithConditionSchema, defaultRequiredMessage, getApartmentPaymentFields, phoneWithConditionSchema, positiveNumberSchema, getNumbersValues, TVTypesValues, phoneNonRequiredSchema, InputFileWithVisibility, FillingTypeValues, FillingTagsAutocomplete, Tooltip, ApartmentsAgent, PreviewContent, Link, UserBadge, useMapCards, MapOverlay } from 'kui-crm';
3
3
  import _ from 'lodash';
4
- import { clearNotValidFields, getPhoneNumberFromPhoneParams, resHandler, callPromises, getPhoneParamsFromString, addToArrayByCondition } from 'kui-utils';
4
+ import { clearNotValidFields, getPhoneNumberFromPhoneParams, resHandler, callPromises, getPhoneParamsFromString, addToArrayByCondition, Loader } from 'kui-utils';
5
5
  import to from 'await-to-js';
6
6
  import { DateTime } from 'luxon';
7
7
  import { InputWithAddressAutocomplete, DependentInput, CheckboxWithController, InputPhoneWithForm } from 'kui-complex';
@@ -11,6 +11,7 @@ import { observer } from 'mobx-react';
11
11
  import styled from '@emotion/styled';
12
12
  import { CheckIcon, CancelIcon, CommentIcon, UpdateIcon, WarningIcon, PhoneIcon, CloseIcon } from 'kui-icon';
13
13
  import { useEffect } from 'react';
14
+ import { makeAutoObservable } from 'mobx';
14
15
 
15
16
  /******************************************************************************
16
17
  Copyright (c) Microsoft Corporation.
@@ -193,7 +194,7 @@ var inspectionsRequestBody = {
193
194
  based_on: null,
194
195
  dropbox_link: inspection.dropboxLink,
195
196
  photo_groups: roomsImages,
196
- regular: this.getPartialInspectionMeters(inspection.meters),
197
+ regular: __assign(__assign({}, this.getInspectionFilling(inspection.filling)), this.getPartialInspectionMeters(inspection.meters)),
197
198
  };
198
199
  },
199
200
  getPostBodyTransferInspection: function (inspection, roomsImages) {
@@ -203,7 +204,15 @@ var inspectionsRequestBody = {
203
204
  based_on: null,
204
205
  dropbox_link: inspection.dropboxLink,
205
206
  photo_groups: roomsImages,
206
- transfer: __assign({ transfer_type: inspection.transferType }, this.getPartialInspectionMeters(inspection.meters)),
207
+ transfer: __assign(__assign({ transfer_type: inspection.transferType }, this.getInspectionFilling(inspection.filling)), this.getPartialInspectionMeters(inspection.meters)),
208
+ };
209
+ },
210
+ getInspectionFilling: function (fillingList) {
211
+ return {
212
+ filling: fillingList.map(function (filling) { return ({
213
+ apartment_feature_id: filling.id,
214
+ is_absent: !filling.check,
215
+ }); }),
207
216
  };
208
217
  },
209
218
  getPartialInspectionMeters: function (meters) {
@@ -954,7 +963,7 @@ var templateObject_1$6;
954
963
 
955
964
  var FillingCardContent = function (props) {
956
965
  var filling = props.filling, warningLabel = props.warningLabel;
957
- return (jsxs(Grid, __assign({ container: true, alignItems: "center" }, { children: [!filling.wasAvailable && (jsx(Tooltip, __assign({ content: jsx(Caption, __assign({ size: "xs" }, { children: warningLabel })) }, { children: jsx(StyledWarningIcon, { width: 17, height: 17 }) }))), jsxs(StyledLabelWrapper, { children: [jsx(Caption, __assign({ size: "s" }, { children: filling.name })), jsxs(StyledSubtitle, __assign({ size: "xs", color: "fiftyP" }, { children: [filling.numberOfSubjects ? "".concat(filling.numberOfSubjects, " pieces") : "", filling.numberOfSubjects && filling.serialNumber ? " \u2022 " : "", filling.serialNumber] }))] })] })));
966
+ return (jsxs(Grid, __assign({ container: true, alignItems: "center" }, { children: [!filling.wasMissing && (jsx(Tooltip, __assign({ content: jsx(Caption, __assign({ size: "xs" }, { children: warningLabel })) }, { children: jsx(StyledWarningIcon, { width: 17, height: 17 }) }))), jsxs(StyledLabelWrapper, { children: [jsx(Caption, __assign({ size: "s" }, { children: filling.name })), jsxs(StyledSubtitle, __assign({ size: "xs", color: "fiftyP" }, { children: [filling.numberOfSubjects ? "".concat(filling.numberOfSubjects, " pieces") : "", filling.numberOfSubjects && filling.serialNumber ? " \u2022 " : "", filling.serialNumber] }))] })] })));
958
967
  };
959
968
  var StyledWarningIcon = styled(WarningIcon)(templateObject_1$5 || (templateObject_1$5 = __makeTemplateObject(["\n margin-left: 4px;\n path {\n fill: ", ";\n }\n"], ["\n margin-left: 4px;\n path {\n fill: ", ";\n }\n"])), theme.palette.red.fiftyP);
960
969
  var StyledLabelWrapper = styled.div(templateObject_2$4 || (templateObject_2$4 = __makeTemplateObject(["\n margin-left: 8px;\n"], ["\n margin-left: 8px;\n"])));
@@ -962,8 +971,8 @@ var StyledSubtitle = styled(Caption)(templateObject_3$1 || (templateObject_3$1 =
962
971
  var templateObject_1$5, templateObject_2$4, templateObject_3$1;
963
972
 
964
973
  var InspectionFillingCard = function (props) {
965
- var className = props.className, form = props.form, index = props.index, other = __rest(props, ["className", "form", "index"]);
966
- return (jsx(StyledCard$1, __assign({ className: className }, { children: jsx(StyledCheckbox, { form: form, name: "filling.".concat(index, ".check"), label: jsx(FillingCardContent, __assign({}, other)) }) })));
974
+ var className = props.className, form = props.form, index = props.index, disabled = props.disabled, other = __rest(props, ["className", "form", "index", "disabled"]);
975
+ return (jsx(StyledCard$1, __assign({ className: className }, { children: jsx(StyledCheckbox, { form: form, name: "filling.".concat(index, ".check"), label: jsx(FillingCardContent, __assign({}, other)), disabled: disabled }) })));
967
976
  };
968
977
  var StyledCard$1 = styled(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"])));
969
978
  var StyledCheckbox = styled(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"])));
@@ -983,6 +992,39 @@ var useMetersValues = function (formStore, metersStore) {
983
992
  }, [metersStore.meters, metersStore.loader.isLoading]);
984
993
  };
985
994
 
995
+ var FillingListStore = /** @class */ (function () {
996
+ function FillingListStore() {
997
+ var _this = this;
998
+ this.fetchFillingList = function (apartmentId) { return __awaiter(_this, void 0, void 0, function () {
999
+ var response;
1000
+ return __generator(this, function (_a) {
1001
+ switch (_a.label) {
1002
+ case 0:
1003
+ this.loader.startLoading();
1004
+ return [4 /*yield*/, to(ApartmentsAgent.getFillingList(apartmentId))];
1005
+ case 1:
1006
+ response = _a.sent();
1007
+ resHandler(response, this.loader, this.updateFillingList);
1008
+ return [2 /*return*/];
1009
+ }
1010
+ });
1011
+ }); };
1012
+ this.updateFillingList = function (fillingList) {
1013
+ _this.fillingList = fillingList.map(function (filling) { return ({
1014
+ id: filling.id,
1015
+ name: filling.description,
1016
+ serialNumber: filling.serial_code,
1017
+ numberOfSubjects: filling.amount,
1018
+ wasMissing: filling.is_absent,
1019
+ }); });
1020
+ };
1021
+ this.fillingList = [];
1022
+ this.loader = new Loader();
1023
+ makeAutoObservable(this);
1024
+ }
1025
+ return FillingListStore;
1026
+ }());
1027
+
986
1028
  var ApartmentInspectionPoint = function (props) {
987
1029
  var date = props.date, onClick = props.onClick, isActive = props.isActive, apartment = props.apartment;
988
1030
  return (jsx(Button, __assign({ size: "xs", variant: isActive ? "primary" : "white", onClick: onClick }, { children: (date === null || date === void 0 ? void 0 : date.toFormat("dd.MM.yyyy")) || "".concat(Number(apartment.roomsCount), "-\u043A\u043E\u043C\u043D.") })));
@@ -1030,5 +1072,5 @@ var ApartmentInspectionOverlay = function (props) {
1030
1072
  var StyledWrapper = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n"], ["\n position: relative;\n"])));
1031
1073
  var templateObject_1;
1032
1074
 
1033
- export { AdditionalInfoFieldsSchema, AdditionalInfoStepSchema, ApartmentInspectionOverlay, BasicApartmentInfoFieldsSchema, BasicApartmentInfoStepSchema, DetailApartmentInfoFieldsSchema, DetailApartmentInfoStepSchema, FillingInfoFieldsSchema, HouseServicesInfoFieldsSchema, HouseServicesInfoStepSchema, index as InspectionFeedback, InspectionFillingCard, MetersInfoFieldsSchema, MetersInfoStepSchema, RoomsApartmentInfoFieldsSchema, RoomsApartmentInfoStepSchema, SecurityApartmentInfoFieldsSchema, SecurityApartmentInfoStepSchema, TelecommunicationsInfoFieldsSchema, TelecommunicationsInfoStepSchema, WaterMeterFieldsSchema, apartmentFields, getAdditionalInfoStepFields, getBasicApartmentInfoFields, getDetailApartmentInfoFields, getFillingInfoFields, getHouseServicesInfoStep, getMetersInfoStepFields, getPartialMeterInfoSchema, getRoomsApartmentInfoFields, getRoomsImagesSteps, getSecurityApartmentInfoFields, getTelecommunicationsInfoStepFields, getWaterMeterFields, inspectionsRequestBody, inspectionsRequests, renderMetersSteps, useMetersValues };
1075
+ export { AdditionalInfoFieldsSchema, AdditionalInfoStepSchema, ApartmentInspectionOverlay, BasicApartmentInfoFieldsSchema, BasicApartmentInfoStepSchema, DetailApartmentInfoFieldsSchema, DetailApartmentInfoStepSchema, FillingInfoFieldsSchema, FillingListStore, HouseServicesInfoFieldsSchema, HouseServicesInfoStepSchema, index as InspectionFeedback, InspectionFillingCard, MetersInfoFieldsSchema, MetersInfoStepSchema, RoomsApartmentInfoFieldsSchema, RoomsApartmentInfoStepSchema, SecurityApartmentInfoFieldsSchema, SecurityApartmentInfoStepSchema, TelecommunicationsInfoFieldsSchema, TelecommunicationsInfoStepSchema, WaterMeterFieldsSchema, apartmentFields, getAdditionalInfoStepFields, getBasicApartmentInfoFields, getDetailApartmentInfoFields, getFillingInfoFields, getHouseServicesInfoStep, getMetersInfoStepFields, getPartialMeterInfoSchema, getRoomsApartmentInfoFields, getRoomsImagesSteps, getSecurityApartmentInfoFields, getTelecommunicationsInfoStepFields, getWaterMeterFields, inspectionsRequestBody, inspectionsRequests, renderMetersSteps, useMetersValues };
1034
1076
  //# sourceMappingURL=index.js.map