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/cjs/index.js
CHANGED
@@ -614,6 +614,48 @@ var apartmentFields = {
|
|
614
614
|
}),
|
615
615
|
};
|
616
616
|
},
|
617
|
+
getApartmentPaymentInfo: function (apartment) {
|
618
|
+
return {
|
619
|
+
payerCode: apartment.payer_code,
|
620
|
+
communalServicesAccount: apartment.financial_personal_account,
|
621
|
+
managementCompany: apartment.administrative_company
|
622
|
+
? __assign(__assign({}, apartment.administrative_company), { operatingAccount: apartment.payer_code }) : null,
|
623
|
+
};
|
624
|
+
},
|
625
|
+
getInspectionPaymentInfo: function (inspection) {
|
626
|
+
return __assign(__assign({}, this.getApartmentPaymentInfo(inspection)), { countryOfResidence: inspection.country_of_residence, taxesType: inspection.taxes_type });
|
627
|
+
},
|
628
|
+
getMeterInfo: function (meter, resource) {
|
629
|
+
var _a;
|
630
|
+
return {
|
631
|
+
id: meter.id,
|
632
|
+
type: meter.meter_type,
|
633
|
+
number: meter.passport_number,
|
634
|
+
startDate: meter.activation_date
|
635
|
+
? luxon.DateTime.fromISO(meter.activation_date)
|
636
|
+
: null,
|
637
|
+
company: meter.company,
|
638
|
+
operationalAccountNumber: meter.operating_account,
|
639
|
+
resource: resource,
|
640
|
+
tariff: meter.tariff
|
641
|
+
? {
|
642
|
+
id: meter.tariff.id,
|
643
|
+
name: meter.tariff.code_name,
|
644
|
+
}
|
645
|
+
: null,
|
646
|
+
passportFile: meter.passport
|
647
|
+
? kuiCrm.FileStore.initFromFileModel(meter.passport)
|
648
|
+
: null,
|
649
|
+
images: ((_a = meter.photos) === null || _a === void 0 ? void 0 : _a.map(function (photo) { return kuiCrm.ImageStore.initFromImageModel(photo); })) ||
|
650
|
+
[],
|
651
|
+
};
|
652
|
+
},
|
653
|
+
getInventoryMetersInfo: function (inspection) {
|
654
|
+
var _this = this;
|
655
|
+
return {
|
656
|
+
meters: inspection.meters.map(function (meter) { return (__assign(__assign({}, _this.getMeterInfo(meter, meter.resource_type)), _this.getMeterValues(meter, meter.resource_type, "initialValue"))); }),
|
657
|
+
};
|
658
|
+
},
|
617
659
|
};
|
618
660
|
|
619
661
|
var getBasicApartmentInfoFields = function (handlePlaceSelect, settings) { return [
|