kui-crm 0.0.211 → 0.0.213

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 CHANGED
@@ -3277,10 +3277,12 @@ var getValuesFields = function (resource, variant, meterType, inputsSettings) {
3277
3277
  var name = "".concat(variant, "Value");
3278
3278
  if (resource === "electricity") {
3279
3279
  return __spreadArray(__spreadArray([
3280
- __assign(__assign({ label: "".concat(label, " T1"), name: "".concat(name, "T1") }, valueOptions$1), inputsSettings === null || inputsSettings === void 0 ? void 0 : inputsSettings["".concat(name, "T1")])
3281
- ], kuiUtils.addToArrayByCondition(meterType !== "T1", __assign(__assign({ label: "".concat(label, " T2"), name: "".concat(name, "T2") }, valueOptions$1), inputsSettings === null || inputsSettings === void 0 ? void 0 : inputsSettings["".concat(name, "T2")])), true), kuiUtils.addToArrayByCondition(meterType === "T3", __assign(__assign({ label: "".concat(label, " T3"), name: "".concat(name, "T3") }, valueOptions$1), inputsSettings === null || inputsSettings === void 0 ? void 0 : inputsSettings["".concat(name, "T3")])), true);
3280
+ __assign(__assign({ label: "".concat(label, " T1"), name: "".concat(name, "T1"), isRequired: true }, valueOptions$1), inputsSettings === null || inputsSettings === void 0 ? void 0 : inputsSettings["".concat(name, "T1")])
3281
+ ], kuiUtils.addToArrayByCondition(meterType !== "T1", __assign(__assign({ label: "".concat(label, " T2"), name: "".concat(name, "T2"), isRequired: true }, valueOptions$1), inputsSettings === null || inputsSettings === void 0 ? void 0 : inputsSettings["".concat(name, "T2")])), true), kuiUtils.addToArrayByCondition(meterType === "T3", __assign(__assign({ label: "".concat(label, " T3"), name: "".concat(name, "T3"), isRequired: true }, valueOptions$1), inputsSettings === null || inputsSettings === void 0 ? void 0 : inputsSettings["".concat(name, "T3")])), true);
3282
3282
  }
3283
- return [__assign(__assign({ label: label, name: name }, valueOptions$1), inputsSettings === null || inputsSettings === void 0 ? void 0 : inputsSettings[name])];
3283
+ return [
3284
+ __assign(__assign({ label: label, name: name, isRequired: true }, valueOptions$1), inputsSettings === null || inputsSettings === void 0 ? void 0 : inputsSettings[name]),
3285
+ ];
3284
3286
  };
3285
3287
  var commonMeterFields = function (_a, inputsSettings) {
3286
3288
  var withPassport = _a.withPassport, isNewResource = _a.isNewResource, withLastValue = _a.withLastValue, resource = _a.resource, tariffFilter = _a.tariffFilter, disableOperatingAccount = _a.disableOperatingAccount, handleCompanyChange = _a.handleCompanyChange, withNextCheck = _a.withNextCheck, apartmentId = _a.apartmentId;
@@ -3297,7 +3299,7 @@ var settingsFields = function (inputsSettings) { return [
3297
3299
  __assign({ label: "No tariff", name: "noTariff", variant: "custom", CustomInput: CheckboxWithHint, hintMessage: "Readings do not directly affect the cost, the expense must be entered from the receipt", size: 6 }, inputsSettings === null || inputsSettings === void 0 ? void 0 : inputsSettings.noTariff),
3298
3300
  ]; };
3299
3301
  var basicFieldsOfNewResourceMeter = function (settings, inputsSettings) { return __spreadArray(__spreadArray(__spreadArray([], settingsFields(inputsSettings), true), [
3300
- __assign({ label: "Number", name: "number" }, inputsSettings === null || inputsSettings === void 0 ? void 0 : inputsSettings.number)
3302
+ __assign({ label: "Number", name: "number", isRequired: true }, inputsSettings === null || inputsSettings === void 0 ? void 0 : inputsSettings.number)
3301
3303
  ], false), getValuesFields(settings.resource, "initial", settings.meterType, inputsSettings), true); };
3302
3304
  var fieldsOfNewResourceMeter = function (settings, inputsSettings) { return __spreadArray(__spreadArray([], basicFieldsOfNewResourceMeter(settings, inputsSettings), true), commonMeterFields(settings, inputsSettings), true); };
3303
3305
  var fieldsOfOldResourceMeter = function (settings, inputsSettings) { return __spreadArray(__spreadArray(__spreadArray(__spreadArray([], settingsFields(inputsSettings), true), fieldsToColumns(getValuesFields(settings.resource, "last", settings.meterType, inputsSettings), getValuesFields(settings.resource, "initial", settings.meterType, inputsSettings)), true), [
@@ -4101,9 +4103,9 @@ var getApartmentDetailInfoFields = function (roomsCount, bedroomsCount, settings
4101
4103
  var getApartmentPaymentFields = function (settings) { return [
4102
4104
  __assign({ name: "payerCode", label: "Payer code" }, settings === null || settings === void 0 ? void 0 : settings.payerCode),
4103
4105
  __assign({ name: "communalServicesAccount", label: "Operational account number" }, settings === null || settings === void 0 ? void 0 : settings.communalServicesAccount),
4104
- __assign({ name: "company", label: "Administrative company", variant: "custom", CustomInput: CompanyAutocomplete$1 }, settings === null || settings === void 0 ? void 0 : settings.company),
4105
- __assign({ name: "countryOfResidence", label: "Country of Residence", variant: "custom", CustomInput: CountryAutocomplete$1 }, settings === null || settings === void 0 ? void 0 : settings.countryOfResidence),
4106
- __assign({ label: "Tax type", name: "taxesType", variant: "select", options: TaxTypeValues }, settings === null || settings === void 0 ? void 0 : settings.taxesType),
4106
+ __assign({ name: "company", label: "Administrative company", variant: "custom", CustomInput: CompanyAutocomplete$1, isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.company),
4107
+ __assign({ name: "countryOfResidence", label: "Country of Residence", variant: "custom", CustomInput: CountryAutocomplete$1, isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.countryOfResidence),
4108
+ __assign({ label: "Tax type", name: "taxesType", variant: "select", options: TaxTypeValues, isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.taxesType),
4107
4109
  ]; };
4108
4110
 
4109
4111
  var getFillingInfoFields = function (withType, type, setType) { return __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], kuiUtils.addToArrayByCondition(withType, {
@@ -4151,21 +4153,21 @@ var getPartialMeterInfoFields = function (resource, type, meter, withCheckValue,
4151
4153
  var prefixName = name ? "".concat(name, ".") : "";
4152
4154
  if (resource === "electricity") {
4153
4155
  return __spreadArray(__spreadArray([
4154
- __assign({ label: "Number", name: "".concat(prefixName, "number") }, settings === null || settings === void 0 ? void 0 : settings.number),
4156
+ __assign({ label: "Number", name: "".concat(prefixName, "number"), isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.number),
4155
4157
  __assign(__assign({ label: "T1 value", name: "".concat(prefixName, "T1"), maxValue: ((_a = meter === null || meter === void 0 ? void 0 : meter.maxValue) === null || _a === void 0 ? void 0 : _a.T1) && withCheckValue
4156
4158
  ? Number(meter.maxValue.T1)
4157
- : null, placeholder: (_b = meter === null || meter === void 0 ? void 0 : meter.values) === null || _b === void 0 ? void 0 : _b.T1 }, valueOptions), settings === null || settings === void 0 ? void 0 : settings.t1)
4159
+ : null, placeholder: (_b = meter === null || meter === void 0 ? void 0 : meter.values) === null || _b === void 0 ? void 0 : _b.T1, isRequired: true }, valueOptions), settings === null || settings === void 0 ? void 0 : settings.t1)
4158
4160
  ], kuiUtils.addToArrayByCondition(type !== "T1", __assign(__assign({ label: "T2 value", name: "".concat(prefixName, "T2"), maxValue: ((_c = meter === null || meter === void 0 ? void 0 : meter.maxValue) === null || _c === void 0 ? void 0 : _c.T2) && withCheckValue
4159
4161
  ? Number(meter.maxValue.T2)
4160
- : null, placeholder: (_d = meter === null || meter === void 0 ? void 0 : meter.values) === null || _d === void 0 ? void 0 : _d.T2 }, valueOptions), settings === null || settings === void 0 ? void 0 : settings.t2)), true), kuiUtils.addToArrayByCondition(type === "T3", __assign(__assign({ label: "T3 value", name: "".concat(prefixName, "T3"), maxValue: ((_e = meter === null || meter === void 0 ? void 0 : meter.maxValue) === null || _e === void 0 ? void 0 : _e.T3) && withCheckValue
4162
+ : null, placeholder: (_d = meter === null || meter === void 0 ? void 0 : meter.values) === null || _d === void 0 ? void 0 : _d.T2, isRequired: true }, valueOptions), settings === null || settings === void 0 ? void 0 : settings.t2)), true), kuiUtils.addToArrayByCondition(type === "T3", __assign(__assign({ label: "T3 value", name: "".concat(prefixName, "T3"), maxValue: ((_e = meter === null || meter === void 0 ? void 0 : meter.maxValue) === null || _e === void 0 ? void 0 : _e.T3) && withCheckValue
4161
4163
  ? Number(meter.maxValue.T3)
4162
- : null, placeholder: (_f = meter === null || meter === void 0 ? void 0 : meter.values) === null || _f === void 0 ? void 0 : _f.T3 }, valueOptions), settings === null || settings === void 0 ? void 0 : settings.t3)), true);
4164
+ : null, placeholder: (_f = meter === null || meter === void 0 ? void 0 : meter.values) === null || _f === void 0 ? void 0 : _f.T3, isRequired: true }, valueOptions), settings === null || settings === void 0 ? void 0 : settings.t3)), true);
4163
4165
  }
4164
4166
  return [
4165
- __assign({ label: "Number", name: "".concat(prefixName, "number") }, settings === null || settings === void 0 ? void 0 : settings.number),
4167
+ __assign({ label: "Number", name: "".concat(prefixName, "number"), isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.number),
4166
4168
  __assign(__assign({ label: "Value", name: "".concat(prefixName, "value"), maxValue: ((_g = meter === null || meter === void 0 ? void 0 : meter.maxValue) === null || _g === void 0 ? void 0 : _g.value) && withCheckValue
4167
4169
  ? Number(meter.maxValue.value)
4168
- : null, placeholder: (_h = meter === null || meter === void 0 ? void 0 : meter.values) === null || _h === void 0 ? void 0 : _h.value }, valueOptions), settings === null || settings === void 0 ? void 0 : settings.value),
4170
+ : null, placeholder: (_h = meter === null || meter === void 0 ? void 0 : meter.values) === null || _h === void 0 ? void 0 : _h.value, isRequired: true }, valueOptions), settings === null || settings === void 0 ? void 0 : settings.value),
4169
4171
  ];
4170
4172
  };
4171
4173