kui-crm_actions 0.0.69 → 0.0.70
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 +42 -0
- package/cjs/index.js.map +1 -1
- package/index.d.ts +5 -1
- package/index.js +42 -0
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
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, 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, 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, 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';
|
@@ -501,6 +501,10 @@ declare const apartmentFields: {
|
|
501
501
|
[x: string]: number;
|
502
502
|
};
|
503
503
|
getTransferMetersInfo(meters: TransferInspectionMeterModel[]): InspectionPartialMetersInfoParams;
|
504
|
+
getApartmentPaymentInfo(apartment: ApartmentModel): ApartmentPaymentInfoParams;
|
505
|
+
getInspectionPaymentInfo(inspection: FullInspectionCommonFields): InspectionPaymentInfoParams;
|
506
|
+
getMeterInfo(meter: InspectionMeterCommonInfo, resource: ResourceTypes): InspectionMeterInfoParams;
|
507
|
+
getInventoryMetersInfo(inspection: InventoryInspectionFields): InspectionMetersInfoParams;
|
504
508
|
};
|
505
509
|
|
506
510
|
declare const getBasicApartmentInfoFields: (handlePlaceSelect?: ((coords: google.maps.LatLngLiteral) => void) | undefined, settings?: InspectionFieldsSettings | undefined) => InputParams<BasicApartmentInfoStepFields>[];
|
package/index.js
CHANGED
@@ -585,6 +585,48 @@ var apartmentFields = {
|
|
585
585
|
}),
|
586
586
|
};
|
587
587
|
},
|
588
|
+
getApartmentPaymentInfo: function (apartment) {
|
589
|
+
return {
|
590
|
+
payerCode: apartment.payer_code,
|
591
|
+
communalServicesAccount: apartment.financial_personal_account,
|
592
|
+
managementCompany: apartment.administrative_company
|
593
|
+
? __assign(__assign({}, apartment.administrative_company), { operatingAccount: apartment.payer_code }) : null,
|
594
|
+
};
|
595
|
+
},
|
596
|
+
getInspectionPaymentInfo: function (inspection) {
|
597
|
+
return __assign(__assign({}, this.getApartmentPaymentInfo(inspection)), { countryOfResidence: inspection.country_of_residence, taxesType: inspection.taxes_type });
|
598
|
+
},
|
599
|
+
getMeterInfo: function (meter, resource) {
|
600
|
+
var _a;
|
601
|
+
return {
|
602
|
+
id: meter.id,
|
603
|
+
type: meter.meter_type,
|
604
|
+
number: meter.passport_number,
|
605
|
+
startDate: meter.activation_date
|
606
|
+
? DateTime.fromISO(meter.activation_date)
|
607
|
+
: null,
|
608
|
+
company: meter.company,
|
609
|
+
operationalAccountNumber: meter.operating_account,
|
610
|
+
resource: resource,
|
611
|
+
tariff: meter.tariff
|
612
|
+
? {
|
613
|
+
id: meter.tariff.id,
|
614
|
+
name: meter.tariff.code_name,
|
615
|
+
}
|
616
|
+
: null,
|
617
|
+
passportFile: meter.passport
|
618
|
+
? FileStore.initFromFileModel(meter.passport)
|
619
|
+
: null,
|
620
|
+
images: ((_a = meter.photos) === null || _a === void 0 ? void 0 : _a.map(function (photo) { return ImageStore.initFromImageModel(photo); })) ||
|
621
|
+
[],
|
622
|
+
};
|
623
|
+
},
|
624
|
+
getInventoryMetersInfo: function (inspection) {
|
625
|
+
var _this = this;
|
626
|
+
return {
|
627
|
+
meters: inspection.meters.map(function (meter) { return (__assign(__assign({}, _this.getMeterInfo(meter, meter.resource_type)), _this.getMeterValues(meter, meter.resource_type, "initialValue"))); }),
|
628
|
+
};
|
629
|
+
},
|
588
630
|
};
|
589
631
|
|
590
632
|
var getBasicApartmentInfoFields = function (handlePlaceSelect, settings) { return [
|