kui-crm_actions 0.0.79 → 0.0.80
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 +21 -0
- package/cjs/index.js.map +1 -1
- package/index.d.ts +3 -1
- package/index.js +21 -1
- package/index.js.map +1 -1
- package/package.json +1 -1
package/cjs/index.js
CHANGED
@@ -1054,6 +1054,26 @@ var FillingListStore = /** @class */ (function () {
|
|
1054
1054
|
return FillingListStore;
|
1055
1055
|
}());
|
1056
1056
|
|
1057
|
+
var useFillingList = function (apartmentId, formStore, fillingStore) {
|
1058
|
+
react.useEffect(function () {
|
1059
|
+
var _a, _b;
|
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);
|
1062
|
+
}
|
1063
|
+
}, [apartmentId]);
|
1064
|
+
react.useEffect(function () {
|
1065
|
+
var _a, _b;
|
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
|
+
formStore.updateFormFields({
|
1068
|
+
filling: fillingStore.fillingList.map(function (filling) { return ({
|
1069
|
+
id: filling.id,
|
1070
|
+
check: false,
|
1071
|
+
}); }),
|
1072
|
+
});
|
1073
|
+
}
|
1074
|
+
}, [fillingStore.fillingList, fillingStore.loader.isLoading]);
|
1075
|
+
};
|
1076
|
+
|
1057
1077
|
var ApartmentInspectionPoint = function (props) {
|
1058
1078
|
var date = props.date, onClick = props.onClick, isActive = props.isActive, apartment = props.apartment;
|
1059
1079
|
return (jsxRuntime.jsx(kuiBasic.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.") })));
|
@@ -1139,5 +1159,6 @@ exports.getWaterMeterFields = getWaterMeterFields;
|
|
1139
1159
|
exports.inspectionsRequestBody = inspectionsRequestBody;
|
1140
1160
|
exports.inspectionsRequests = inspectionsRequests;
|
1141
1161
|
exports.renderMetersSteps = renderMetersSteps;
|
1162
|
+
exports.useFillingList = useFillingList;
|
1142
1163
|
exports.useMetersValues = useMetersValues;
|
1143
1164
|
//# sourceMappingURL=index.js.map
|