kui-crm_actions 0.0.50 → 0.0.52

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
@@ -80,7 +80,7 @@ type InspectionTypes =
80
80
  | "initial"
81
81
  | "inventory"
82
82
  | "transfer"
83
- | "quarterly"
83
+ | "regular"
84
84
  | "appraisal"
85
85
  | "impairments"
86
86
 
@@ -130,7 +130,7 @@ type TransferInspectionTypes =
130
130
  | "tenant_maroom"
131
131
  | "maroom_landlord"
132
132
 
133
- type QuarterlyInspectionFormFields = CommonInspectionFormFields &
133
+ type RegularInspectionFormFields = CommonInspectionFormFields &
134
134
  InspectionPartialMetersStepFields &
135
135
  InspectionRoomsImagesFields
136
136
 
@@ -187,7 +187,7 @@ declare type PostApartmentInspectionRequest = {
187
187
  inspection_type: InspectionTypes;
188
188
  dropbox_link?: string;
189
189
  initial?: InitialInspectionFieldsBody;
190
- quarterly?: QuarterlyInspectionFieldsBody;
190
+ regular?: RegularlyInspectionFieldsBody;
191
191
  transfer?: TransferInspectionFieldsBody;
192
192
  };
193
193
  declare type MeterValueModel = {
@@ -241,7 +241,7 @@ declare type InitialInspectionFieldsBody = {
241
241
  city: number;
242
242
  rooms: InitialInspectionRoomParams[];
243
243
  } & Omit<Partial<ApartmentMainInfoModelFields>, "city" | "rooms">;
244
- declare type QuarterlyInspectionFieldsBody = {
244
+ declare type RegularlyInspectionFieldsBody = {
245
245
  meters: PartialMeterModel[];
246
246
  };
247
247
  declare type TransferInspectionFieldsBody = {
@@ -266,8 +266,8 @@ declare type InitialInspectionPostBody = {
266
266
  initial: InitialInspectionFieldsBody;
267
267
  photo_groups: InspectionRoomPhotoRequest[];
268
268
  } & CommonInspectionFields;
269
- declare type QuarterlyInspectionPostBody = {
270
- quarterly: QuarterlyInspectionFieldsBody;
269
+ declare type RegularInspectionPostBody = {
270
+ regular: RegularlyInspectionFieldsBody;
271
271
  photo_groups: InspectionRoomPhotoRequest[];
272
272
  } & CommonInspectionFields;
273
273
  declare type TransferInspectionPostBody = {
@@ -409,7 +409,7 @@ declare const inspectionsRequests: {
409
409
  createInspection(apartmentId: number, body: any, loader: Loader): Promise<number | undefined>;
410
410
  loadInspectionImages(loader: Loader, roomsImages: InspectionRoomImagesParams[]): Promise<InspectionRoomPhotoRequest[]>;
411
411
  createInitialInspection(data: InitialInspectionFormFields, apartmentId: number, loader: Loader): Promise<number | null | undefined>;
412
- createQuarterlyInspection(data: QuarterlyInspectionFormFields, apartmentId: number, loader: Loader): Promise<number | null | undefined>;
412
+ createRegularInspection(data: RegularInspectionFormFields, apartmentId: number, loader: Loader): Promise<number | null | undefined>;
413
413
  createTransferInspection(data: TransferInspectionFormFields, apartmentId: number, loader: Loader): Promise<number | null | undefined>;
414
414
  createInventoryInspection(data: InventoryInspectionFormFields, apartmentId: number, loader: Loader): Promise<number | null | undefined>;
415
415
  getRoomParams(room: InspectionRoomImagesParams, photos?: ImageBodyRequest[] | undefined): {
@@ -422,7 +422,7 @@ declare const inspectionsRequests: {
422
422
  declare const inspectionsRequestBody: {
423
423
  getPostBodyInitialInspection(inspection: InitialInspectionFormFields, roomsImages: InspectionRoomPhotoRequest[]): InitialInspectionPostBody;
424
424
  getInitialInspectionFields(inspection: InitialInspectionInfoFields): InitialInspectionFieldsBody;
425
- getPostBodyQuarterlyInspection(inspection: QuarterlyInspectionFormFields, roomsImages: InspectionRoomPhotoRequest[], metersImages: ImageBodyRequest[][]): QuarterlyInspectionPostBody;
425
+ getPostBodyRegularInspection(inspection: RegularInspectionFormFields, roomsImages: InspectionRoomPhotoRequest[], metersImages: ImageBodyRequest[][]): RegularInspectionPostBody;
426
426
  getPostBodyTransferInspection(inspection: TransferInspectionFormFields, roomsImages: InspectionRoomPhotoRequest[], metersImages: ImageBodyRequest[][]): TransferInspectionPostBody;
427
427
  getPartialInspectionMeters(meters: PartialMeterInfoFields[], metersImages: ImageBodyRequest[][]): {
428
428
  meters: {
@@ -829,7 +829,6 @@ type ApartmentLinkParams = {
829
829
 
830
830
  type TenantParams = {
831
831
  id: number
832
- avatar: string | null
833
832
  fullName: string
834
833
  phone: PhoneParams$1 | null
835
834
  }
@@ -855,4 +854,4 @@ type ApartmentOverlayProps = {
855
854
 
856
855
  declare const ApartmentInspectionOverlay: (props: ApartmentOverlayProps) => JSX.Element;
857
856
 
858
- export { AdditionalInfoFieldsSchema, AdditionalInfoStepFields, AdditionalInfoStepSchema, ApartmentInspectionModel, ApartmentInspectionOverlay, ApartmentInspectionParams, ApartmentLinkParams, ApartmentPaymentsFormFields, BasicApartmentInfoFieldsSchema, BasicApartmentInfoStepFields, BasicApartmentInfoStepSchema, CommonInspectionFields, CommonInspectionFormFields, DetailApartmentInfoFieldsSchema, DetailApartmentInfoStepFields, DetailApartmentInfoStepSchema, FillingInfoFieldsSchema, FillingInfoFormFields, FillingInfoStepFields, FillingListInfoStepFields, HouseServicesInfoFieldsSchema, HouseServicesInfoStepFields, HouseServicesInfoStepSchema, InitialInspectionFieldsBody, InitialInspectionFormFields, InitialInspectionInfoFields, InitialInspectionPostBody, InitialInspectionRoomParams, InspectionAppraisalLiteModel, InspectionFieldsSettings, InspectionFillingParams, InspectionImpairmentLiteModel, InspectionMeterCommonFields, InspectionMeterFields$1 as InspectionMeterFields, InspectionMeterValueModel, InspectionMetersStepFields$1 as InspectionMetersStepFields, InspectionPartialMetersStepFields, InspectionRoomImagesParams, InspectionRoomPhotoRequest, InspectionRoomPhotoTypes, InspectionRoomsImagesFields, InspectionTypes, InventoryInspectionFieldsBody, InventoryInspectionFormFields, InventoryInspectionPostBody, InventoryMeterModel, MeterInfoStepProps, MeterValueModel, MeterValuesFields, MetersInfoFieldsSchema, MetersInfoStepFields, MetersInfoStepSchema, MetroStationParams, PartialMeterInfoFields, PartialMeterInfoStepProps, PartialMeterModel, PostApartmentInspectionRequest, QuarterlyInspectionFieldsBody, QuarterlyInspectionFormFields, QuarterlyInspectionPostBody, RoomsApartmentInfoFieldsSchema, RoomsApartmentInfoStepFields, RoomsApartmentInfoStepSchema, SecurityApartmentInfoFieldsSchema, SecurityApartmentInfoStepFields, SecurityApartmentInfoStepSchema, TelecommunicationsInfoFieldsSchema, TelecommunicationsInfoStepFields, TelecommunicationsInfoStepSchema, TenantParams, TransferInspectionFieldsBody, TransferInspectionFormFields, TransferInspectionPostBody, TransferInspectionTypes, getAdditionalInfoStepFields, getApartmentPaymentFields, getBasicApartmentInfoFields, getDetailApartmentInfoFields, getFillingInfoFields, getHouseServicesInfoStep, getMetersInfoStepFields, getPartialMeterInfoFields, getPartialMeterInfoSchema, getRoomsApartmentInfoFields, getRoomsImagesSteps, getSecurityApartmentInfoFields, getTelecommunicationsInfoStepFields, inspectionsRequestBody, inspectionsRequests, renderMetersSteps, useMetersValues };
857
+ export { AdditionalInfoFieldsSchema, AdditionalInfoStepFields, AdditionalInfoStepSchema, ApartmentInspectionModel, ApartmentInspectionOverlay, ApartmentInspectionParams, ApartmentLinkParams, ApartmentPaymentsFormFields, BasicApartmentInfoFieldsSchema, BasicApartmentInfoStepFields, BasicApartmentInfoStepSchema, CommonInspectionFields, CommonInspectionFormFields, DetailApartmentInfoFieldsSchema, DetailApartmentInfoStepFields, DetailApartmentInfoStepSchema, FillingInfoFieldsSchema, FillingInfoFormFields, FillingInfoStepFields, FillingListInfoStepFields, HouseServicesInfoFieldsSchema, HouseServicesInfoStepFields, HouseServicesInfoStepSchema, InitialInspectionFieldsBody, InitialInspectionFormFields, InitialInspectionInfoFields, InitialInspectionPostBody, InitialInspectionRoomParams, InspectionAppraisalLiteModel, InspectionFieldsSettings, InspectionFillingParams, InspectionImpairmentLiteModel, InspectionMeterCommonFields, InspectionMeterFields$1 as InspectionMeterFields, InspectionMeterValueModel, InspectionMetersStepFields$1 as InspectionMetersStepFields, InspectionPartialMetersStepFields, InspectionRoomImagesParams, InspectionRoomPhotoRequest, InspectionRoomPhotoTypes, InspectionRoomsImagesFields, InspectionTypes, InventoryInspectionFieldsBody, InventoryInspectionFormFields, InventoryInspectionPostBody, InventoryMeterModel, MeterInfoStepProps, MeterValueModel, MeterValuesFields, MetersInfoFieldsSchema, MetersInfoStepFields, MetersInfoStepSchema, MetroStationParams, PartialMeterInfoFields, PartialMeterInfoStepProps, PartialMeterModel, PostApartmentInspectionRequest, RegularInspectionFormFields, RegularInspectionPostBody, RegularlyInspectionFieldsBody, RoomsApartmentInfoFieldsSchema, RoomsApartmentInfoStepFields, RoomsApartmentInfoStepSchema, SecurityApartmentInfoFieldsSchema, SecurityApartmentInfoStepFields, SecurityApartmentInfoStepSchema, TelecommunicationsInfoFieldsSchema, TelecommunicationsInfoStepFields, TelecommunicationsInfoStepSchema, TenantParams, TransferInspectionFieldsBody, TransferInspectionFormFields, TransferInspectionPostBody, TransferInspectionTypes, getAdditionalInfoStepFields, getApartmentPaymentFields, getBasicApartmentInfoFields, getDetailApartmentInfoFields, getFillingInfoFields, getHouseServicesInfoStep, getMetersInfoStepFields, getPartialMeterInfoFields, getPartialMeterInfoSchema, getRoomsApartmentInfoFields, getRoomsImagesSteps, getSecurityApartmentInfoFields, getTelecommunicationsInfoStepFields, inspectionsRequestBody, inspectionsRequests, renderMetersSteps, useMetersValues };
package/index.js CHANGED
@@ -174,14 +174,14 @@ var inspectionsRequestBody = {
174
174
  }); }),
175
175
  };
176
176
  },
177
- getPostBodyQuarterlyInspection: function (inspection, roomsImages, metersImages) {
177
+ getPostBodyRegularInspection: function (inspection, roomsImages, metersImages) {
178
178
  return {
179
179
  date: DateTime.now().toISODate(),
180
- inspection_type: "quarterly",
180
+ inspection_type: "regular",
181
181
  based_on: null,
182
182
  dropbox_link: inspection.dropboxLink,
183
183
  photo_groups: roomsImages,
184
- quarterly: this.getPartialInspectionMeters(inspection.meters, metersImages),
184
+ regular: this.getPartialInspectionMeters(inspection.meters, metersImages),
185
185
  };
186
186
  },
187
187
  getPostBodyTransferInspection: function (inspection, roomsImages, metersImages) {
@@ -355,7 +355,7 @@ var inspectionsRequests = {
355
355
  });
356
356
  });
357
357
  },
358
- createQuarterlyInspection: function (data, apartmentId, loader) {
358
+ createRegularInspection: function (data, apartmentId, loader) {
359
359
  var _a;
360
360
  return __awaiter(this, void 0, void 0, function () {
361
361
  var metersImages, files, body;
@@ -370,7 +370,7 @@ var inspectionsRequests = {
370
370
  ], metersImages, true))];
371
371
  case 1:
372
372
  files = _b.sent();
373
- body = inspectionsRequestBody.getPostBodyQuarterlyInspection(data, files[0], files.slice(1));
373
+ body = inspectionsRequestBody.getPostBodyRegularInspection(data, files[0], files.slice(1));
374
374
  return [2 /*return*/, this.createInspection(apartmentId, body, loader)];
375
375
  case 2: return [2 /*return*/, null];
376
376
  }
@@ -763,7 +763,7 @@ var ApartmentInspectionCard = function (props) {
763
763
  var apartment = inspection.apartment, tenant = inspection.tenant, metroStations = inspection.metroStations;
764
764
  var clientLink = getClientLink ? getClientLink(tenant.id) : "";
765
765
  var apartmentLink = getInspectionLink(apartment.id, inspection.id);
766
- return (jsxs(StyledCard, { children: [jsx(Link, __assign({ href: apartmentLink }, { children: jsx(StyledPreviewContent, { imageSrc: apartment.previewImage, description: "".concat(apartment.address, ", \u043A\u0432. ").concat(apartment.apartmentNumber) }) })), jsx(Grid, __assign({ container: true, spacing: 2, alignItems: "center" }, { children: metroStations.map(function (station) { return (jsx(MetroStation, { metroStation: station }, station.name)); }) })), jsxs(StyledTenantInfo, __assign({ container: true, alignItems: "center", justify: "space-between" }, { children: [clientLink ? (jsx(StyledClientLink, __assign({ href: clientLink }, { children: jsx(UserBadge, { weight: 500, user: tenant }) }))) : (jsx(UserBadge, { weight: 500, user: tenant })), !!tenant.phone && jsx(ContactPhone, { phone: tenant.phone })] })), jsx(StyledCloseButton, __assign({ isCircle: true, size: "xs", variant: "whiteWithGray", onClick: onClose }, { children: jsx(CloseIcon, { width: 6, height: 6 }) }))] }));
766
+ return (jsxs(StyledCard, { children: [jsx(Link, __assign({ href: apartmentLink }, { children: jsx(StyledPreviewContent, { imageSrc: apartment.previewImage, description: apartment.address }) })), jsx(Grid, __assign({ container: true, spacing: 2, alignItems: "center" }, { children: metroStations.map(function (station) { return (jsx(MetroStation, { metroStation: station }, station.name)); }) })), jsxs(StyledTenantInfo, __assign({ container: true, alignItems: "center", justify: "space-between" }, { children: [clientLink ? (jsx(StyledClientLink, __assign({ href: clientLink }, { children: jsx(UserBadge, { weight: 500, user: tenant }) }))) : (jsx(UserBadge, { weight: 500, user: tenant })), !!tenant.phone && jsx(ContactPhone, { phone: tenant.phone })] })), jsx(StyledCloseButton, __assign({ isCircle: true, size: "xs", variant: "whiteWithGray", onClick: onClose }, { children: jsx(CloseIcon, { width: 6, height: 6 }) }))] }));
767
767
  };
768
768
  var StyledCard = styled.div(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject(["\n width: 330px;\n background: ", ";\n border-radius: 8px;\n padding: 8px;\n position: absolute;\n bottom: 46px;\n left: -115px;\n z-index: 1;\n"], ["\n width: 330px;\n background: ", ";\n border-radius: 8px;\n padding: 8px;\n position: absolute;\n bottom: 46px;\n left: -115px;\n z-index: 1;\n"])), theme.palette.grey.zero);
769
769
  var StyledPreviewContent = styled(PreviewContent)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n margin-bottom: 8px;\n p {\n font-size: 16px;\n line-height: 24px;\n font-weight: 600;\n }\n"], ["\n margin-bottom: 8px;\n p {\n font-size: 16px;\n line-height: 24px;\n font-weight: 600;\n }\n"])));