@redneckz/wildless-cms-uni-blocks 0.14.722 → 0.14.724

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.
Files changed (148) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +136 -151
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/bundle/components/ApplicationLeadForm/LeadFormState.d.ts +0 -1
  5. package/bundle/components/CreditCardForm/SuccessStatusCardContent.d.ts +1 -0
  6. package/bundle/hooks/useRetailFormStore.d.ts +2 -0
  7. package/bundle/services/retail/adaptors/getFamilyStatusAndIncomeData.d.ts +1 -0
  8. package/bundle/ui-kit/DraftDialog/utils.d.ts +1 -1
  9. package/bundle/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  10. package/dist/components/ApplicationLeadForm/LeadFormState.d.ts +0 -1
  11. package/dist/components/CreditCardForm/CreditCardFormStatusTracker.js +3 -3
  12. package/dist/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -1
  13. package/dist/components/CreditCardForm/SuccessStatusCardContent.d.ts +1 -0
  14. package/dist/components/CreditCardForm/SuccessStatusCardContent.js +37 -0
  15. package/dist/components/CreditCardForm/SuccessStatusCardContent.js.map +1 -0
  16. package/dist/components/CreditCardForm/useCreditCardFormAPI.js +2 -5
  17. package/dist/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
  18. package/dist/components/CreditForm/useCreditFormAPI.js +0 -1
  19. package/dist/components/CreditForm/useCreditFormAPI.js.map +1 -1
  20. package/dist/hooks/useRetailFormStore.d.ts +2 -0
  21. package/dist/hooks/useRetailFormStore.js.map +1 -1
  22. package/dist/services/retail/adaptors/getFamilyStatusAndIncomeData.d.ts +1 -0
  23. package/dist/services/retail/adaptors/getFamilyStatusAndIncomeData.js +5 -3
  24. package/dist/services/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
  25. package/dist/ui-kit/DraftDialog/utils.d.ts +1 -1
  26. package/dist/ui-kit/DraftDialog/utils.js +2 -1
  27. package/dist/ui-kit/DraftDialog/utils.js.map +1 -1
  28. package/dist/ui-kit/FormField/Fields/RetirementIncomeField.js +1 -10
  29. package/dist/ui-kit/FormField/Fields/RetirementIncomeField.js.map +1 -1
  30. package/dist/ui-kit/FormField/Fields/WagesField.js +1 -10
  31. package/dist/ui-kit/FormField/Fields/WagesField.js.map +1 -1
  32. package/dist/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  33. package/lib/components/ApplicationLeadForm/LeadFormState.d.ts +0 -1
  34. package/lib/components/CreditCardForm/CreditCardFormStatusTracker.js +3 -3
  35. package/lib/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -1
  36. package/lib/components/CreditCardForm/SuccessStatusCardContent.d.ts +1 -0
  37. package/lib/components/CreditCardForm/SuccessStatusCardContent.js +35 -0
  38. package/lib/components/CreditCardForm/SuccessStatusCardContent.js.map +1 -0
  39. package/lib/components/CreditCardForm/useCreditCardFormAPI.js +2 -5
  40. package/lib/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
  41. package/lib/components/CreditForm/useCreditFormAPI.js +0 -1
  42. package/lib/components/CreditForm/useCreditFormAPI.js.map +1 -1
  43. package/lib/hooks/useRetailFormStore.d.ts +2 -0
  44. package/lib/hooks/useRetailFormStore.js.map +1 -1
  45. package/lib/services/retail/adaptors/getFamilyStatusAndIncomeData.d.ts +1 -0
  46. package/lib/services/retail/adaptors/getFamilyStatusAndIncomeData.js +3 -2
  47. package/lib/services/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
  48. package/lib/ui-kit/DraftDialog/utils.d.ts +1 -1
  49. package/lib/ui-kit/DraftDialog/utils.js +2 -1
  50. package/lib/ui-kit/DraftDialog/utils.js.map +1 -1
  51. package/lib/ui-kit/FormField/Fields/RetirementIncomeField.js +1 -10
  52. package/lib/ui-kit/FormField/Fields/RetirementIncomeField.js.map +1 -1
  53. package/lib/ui-kit/FormField/Fields/WagesField.js +1 -10
  54. package/lib/ui-kit/FormField/Fields/WagesField.js.map +1 -1
  55. package/lib/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  56. package/mobile/bundle/bundle.umd.js +136 -151
  57. package/mobile/bundle/bundle.umd.min.js +1 -1
  58. package/mobile/bundle/components/ApplicationLeadForm/LeadFormState.d.ts +0 -1
  59. package/mobile/bundle/components/CreditCardForm/SuccessStatusCardContent.d.ts +1 -0
  60. package/mobile/bundle/hooks/useRetailFormStore.d.ts +2 -0
  61. package/mobile/bundle/services/retail/adaptors/getFamilyStatusAndIncomeData.d.ts +1 -0
  62. package/mobile/bundle/ui-kit/DraftDialog/utils.d.ts +1 -1
  63. package/mobile/bundle/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  64. package/mobile/dist/components/ApplicationLeadForm/LeadFormState.d.ts +0 -1
  65. package/mobile/dist/components/CreditCardForm/CreditCardFormStatusTracker.js +3 -3
  66. package/mobile/dist/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -1
  67. package/mobile/dist/components/CreditCardForm/SuccessStatusCardContent.d.ts +1 -0
  68. package/mobile/dist/components/CreditCardForm/SuccessStatusCardContent.js +37 -0
  69. package/mobile/dist/components/CreditCardForm/SuccessStatusCardContent.js.map +1 -0
  70. package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.js +2 -5
  71. package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
  72. package/mobile/dist/components/CreditForm/useCreditFormAPI.js +0 -1
  73. package/mobile/dist/components/CreditForm/useCreditFormAPI.js.map +1 -1
  74. package/mobile/dist/hooks/useRetailFormStore.d.ts +2 -0
  75. package/mobile/dist/hooks/useRetailFormStore.js.map +1 -1
  76. package/mobile/dist/services/retail/adaptors/getFamilyStatusAndIncomeData.d.ts +1 -0
  77. package/mobile/dist/services/retail/adaptors/getFamilyStatusAndIncomeData.js +5 -3
  78. package/mobile/dist/services/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
  79. package/mobile/dist/ui-kit/DraftDialog/utils.d.ts +1 -1
  80. package/mobile/dist/ui-kit/DraftDialog/utils.js +2 -1
  81. package/mobile/dist/ui-kit/DraftDialog/utils.js.map +1 -1
  82. package/mobile/dist/ui-kit/FormField/Fields/RetirementIncomeField.js +1 -10
  83. package/mobile/dist/ui-kit/FormField/Fields/RetirementIncomeField.js.map +1 -1
  84. package/mobile/dist/ui-kit/FormField/Fields/WagesField.js +1 -10
  85. package/mobile/dist/ui-kit/FormField/Fields/WagesField.js.map +1 -1
  86. package/mobile/dist/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  87. package/mobile/lib/components/ApplicationLeadForm/LeadFormState.d.ts +0 -1
  88. package/mobile/lib/components/CreditCardForm/CreditCardFormStatusTracker.js +3 -3
  89. package/mobile/lib/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -1
  90. package/mobile/lib/components/CreditCardForm/SuccessStatusCardContent.d.ts +1 -0
  91. package/mobile/lib/components/CreditCardForm/SuccessStatusCardContent.js +35 -0
  92. package/mobile/lib/components/CreditCardForm/SuccessStatusCardContent.js.map +1 -0
  93. package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.js +2 -5
  94. package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
  95. package/mobile/lib/components/CreditForm/useCreditFormAPI.js +0 -1
  96. package/mobile/lib/components/CreditForm/useCreditFormAPI.js.map +1 -1
  97. package/mobile/lib/hooks/useRetailFormStore.d.ts +2 -0
  98. package/mobile/lib/hooks/useRetailFormStore.js.map +1 -1
  99. package/mobile/lib/services/retail/adaptors/getFamilyStatusAndIncomeData.d.ts +1 -0
  100. package/mobile/lib/services/retail/adaptors/getFamilyStatusAndIncomeData.js +3 -2
  101. package/mobile/lib/services/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
  102. package/mobile/lib/ui-kit/DraftDialog/utils.d.ts +1 -1
  103. package/mobile/lib/ui-kit/DraftDialog/utils.js +2 -1
  104. package/mobile/lib/ui-kit/DraftDialog/utils.js.map +1 -1
  105. package/mobile/lib/ui-kit/FormField/Fields/RetirementIncomeField.js +1 -10
  106. package/mobile/lib/ui-kit/FormField/Fields/RetirementIncomeField.js.map +1 -1
  107. package/mobile/lib/ui-kit/FormField/Fields/WagesField.js +1 -10
  108. package/mobile/lib/ui-kit/FormField/Fields/WagesField.js.map +1 -1
  109. package/mobile/lib/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  110. package/mobile/src/components/ApplicationLeadForm/LeadFormState.ts +0 -1
  111. package/mobile/src/components/CreditCardForm/CreditCardFormStatusTracker.tsx +3 -3
  112. package/mobile/src/components/CreditCardForm/SuccessStatusCardContent.tsx +45 -0
  113. package/mobile/src/components/CreditCardForm/useCreditCardFormAPI.tsx +2 -5
  114. package/mobile/src/components/CreditForm/useCreditFormAPI.tsx +0 -1
  115. package/mobile/src/hooks/useRetailFormStore.tsx +2 -0
  116. package/mobile/src/services/retail/adaptors/getFamilyStatusAndIncomeData.ts +4 -2
  117. package/mobile/src/ui-kit/DraftDialog/utils.ts +2 -3
  118. package/mobile/src/ui-kit/FormField/Fields/RetirementIncomeField.tsx +9 -25
  119. package/mobile/src/ui-kit/FormField/Fields/WagesField.tsx +9 -25
  120. package/mobile/src/ui-kit/FormField/NameFieldDef.ts +0 -1
  121. package/package.json +1 -1
  122. package/src/components/ApplicationLeadForm/LeadFormState.ts +0 -1
  123. package/src/components/CreditCardForm/CreditCardFormStatusTracker.tsx +3 -3
  124. package/src/components/CreditCardForm/SuccessStatusCardContent.tsx +45 -0
  125. package/src/components/CreditCardForm/useCreditCardFormAPI.tsx +2 -5
  126. package/src/components/CreditForm/useCreditFormAPI.tsx +0 -1
  127. package/src/hooks/useRetailFormStore.tsx +2 -0
  128. package/src/services/retail/adaptors/getFamilyStatusAndIncomeData.ts +4 -2
  129. package/src/ui-kit/DraftDialog/utils.ts +2 -3
  130. package/src/ui-kit/FormField/Fields/RetirementIncomeField.tsx +9 -25
  131. package/src/ui-kit/FormField/Fields/WagesField.tsx +9 -25
  132. package/src/ui-kit/FormField/NameFieldDef.ts +0 -1
  133. package/bundle/components/CreditCardForm/SuccessStatusContent.d.ts +0 -1
  134. package/dist/components/CreditCardForm/SuccessStatusContent.d.ts +0 -1
  135. package/dist/components/CreditCardForm/SuccessStatusContent.js +0 -32
  136. package/dist/components/CreditCardForm/SuccessStatusContent.js.map +0 -1
  137. package/lib/components/CreditCardForm/SuccessStatusContent.d.ts +0 -1
  138. package/lib/components/CreditCardForm/SuccessStatusContent.js +0 -30
  139. package/lib/components/CreditCardForm/SuccessStatusContent.js.map +0 -1
  140. package/mobile/bundle/components/CreditCardForm/SuccessStatusContent.d.ts +0 -1
  141. package/mobile/dist/components/CreditCardForm/SuccessStatusContent.d.ts +0 -1
  142. package/mobile/dist/components/CreditCardForm/SuccessStatusContent.js +0 -32
  143. package/mobile/dist/components/CreditCardForm/SuccessStatusContent.js.map +0 -1
  144. package/mobile/lib/components/CreditCardForm/SuccessStatusContent.d.ts +0 -1
  145. package/mobile/lib/components/CreditCardForm/SuccessStatusContent.js +0 -30
  146. package/mobile/lib/components/CreditCardForm/SuccessStatusContent.js.map +0 -1
  147. package/mobile/src/components/CreditCardForm/SuccessStatusContent.tsx +0 -37
  148. package/src/components/CreditCardForm/SuccessStatusContent.tsx +0 -37
@@ -1,3 +1,4 @@
1
+ import { countIncomeAverage } from '../../services/retail/adaptors/getFamilyStatusAndIncomeData.js';
1
2
  export const creditCodesToProgrammIdMap = {
2
3
  credit_cash: '10',
3
4
  credit_cash_single_doc: '28',
@@ -23,12 +24,12 @@ export const creditProgramCodeToProductIdMap = {
23
24
  export const getParticipantIncomes = (participantIncomes) => {
24
25
  const wages = participantIncomes?.find((contact) => contact.incomeTypeCd.key === "WAGES" /* EIncomesType.WAGES */)?.value;
25
26
  const mandatoryPayments = participantIncomes?.find((contact) => contact.incomeTypeCd.key === "MANDATORY_PAYMENTS" /* EIncomesType.MANDATORY_PAYMENTS */)?.value;
26
- const incomeAverage = participantIncomes?.find((contact) => contact.incomeTypeCd.key === "INCOME_AVERAGE" /* EIncomesType.INCOME_AVERAGE */)?.value;
27
27
  const additionalIncome = participantIncomes?.find((contact) => contact.incomeTypeCd.key === "ADDITIONAL_INCOME" /* EIncomesType.ADDITIONAL_INCOME */)?.value;
28
28
  const otherIncome = participantIncomes?.find((contact) => contact.incomeTypeCd.key === "OTHER_INCOME" /* EIncomesType.OTHER_INCOME */)?.value;
29
29
  const otherPayments = participantIncomes?.find((contact) => contact.incomeTypeCd.key === "OTHER_PAYMENTS" /* EIncomesType.OTHER_PAYMENTS */)?.value;
30
30
  const rentalIncome = participantIncomes?.find((contact) => contact.incomeTypeCd.key === "RENTAL_INCOME" /* EIncomesType.RENTAL_INCOME */)?.value;
31
31
  const retirementIncome = participantIncomes?.find((contact) => contact.incomeTypeCd.key === "RETIREMENT_INCOME" /* EIncomesType.RETIREMENT_INCOME */)?.value;
32
+ const incomeAverage = countIncomeAverage(wages, retirementIncome);
32
33
  return {
33
34
  wages,
34
35
  mandatoryPayments,
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/ui-kit/DraftDialog/utils.ts"],"names":[],"mappings":"AA+BA,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,WAAW,EAAE,IAAI;IACjB,sBAAsB,EAAE,IAAI;IAC5B,UAAU,EAAE,IAAI;IAChB,mBAAmB,EAAE,IAAI;IACzB,eAAe,EAAE,IAAI;IACrB,cAAc,EAAE,IAAI;IACpB,UAAU,EAAE,IAAI;IAChB,qBAAqB,EAAE,IAAI;IAC3B,aAAa,EAAE,IAAI;IACnB,WAAW,EAAE,IAAI;IACjB,gBAAgB,EAAE,IAAI;CACvB,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,SAAS,EAAE,IAAI;IACf,UAAU,EAAE,IAAI;IAChB,WAAW,EAAE,IAAI;CAClB,CAAC;AAEF,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC7C,GAAG,0BAA0B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AAO,MAAM,EAAE,GAAG;QAChB,CAAC,CAAC;YACE,GAAG,EAAE,MAAM,CAAC,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ;SAC9C;QACH,CAAC,CAAC,IAAI,CAAC;AACX,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,MAAkB,EAAsB,EAAE;IACvE,OAAO,MAAM,EAAE,GAAG;QAChB,CAAC,CAAC;YACE,GAAG,EAAE,MAAM,CAAC,GAAG;YACf,IAAI,EAAE,MAAM,CAAC,KAAK;SACnB;QACH,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC,CAAC"}
@@ -1,16 +1,7 @@
1
1
  import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
2
2
  import { JSX } from '@redneckz/uni-jsx';
3
- import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
4
3
  import { InputControl } from '../../Input/InputControl.js';
5
4
  import { validatorObj } from '../getObjectValidator.js';
6
5
  import { getValidation } from '../getValidation.js';
7
- export const RetirementIncomeField = JSX(({ field, input }) => {
8
- const currentWages = field('wages')?.value;
9
- const onChange = useCallback((_) => {
10
- const incomesSum = Number(_) + Number(currentWages || 0);
11
- field('retirementIncome')?.onChange?.(_);
12
- field('incomeAverage')?.onChange?.(String(incomesSum));
13
- }, [currentWages]);
14
- return (_jsx(InputControl, { label: "\u041F\u0435\u043D\u0441\u0438\u043E\u043D\u043D\u044B\u0435 \u0434\u043E\u0445\u043E\u0434\u044B", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", isInteger: true, ...getValidation(field('retirementIncome'), validatorObj.retirementIncome, input?.required), ...input, onChange: onChange }));
15
- });
6
+ export const RetirementIncomeField = JSX(({ field, input }) => (_jsx(InputControl, { label: "\u041F\u0435\u043D\u0441\u0438\u043E\u043D\u043D\u044B\u0435 \u0434\u043E\u0445\u043E\u0434\u044B", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", isInteger: true, ...getValidation(field('retirementIncome'), validatorObj.retirementIncome, input?.required), ...input })));
16
7
  //# sourceMappingURL=RetirementIncomeField.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RetirementIncomeField.js","sourceRoot":"","sources":["../../../../src/ui-kit/FormField/Fields/RetirementIncomeField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAmB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE;IAC9E,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC;IAE3C,MAAM,QAAQ,GAAG,WAAW,CAC1B,CAAC,CAAS,EAAE,EAAE;QACZ,MAAM,UAAU,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,YAAY,IAAI,CAAC,CAAC,CAAC;QAEzD,KAAK,CAAC,kBAAkB,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC;QACzC,KAAK,CAAC,eAAe,CAAC,EAAE,QAAQ,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;IACzD,CAAC,EACD,CAAC,YAAY,CAAC,CACf,CAAC;IAEF,OAAO,CACL,KAAC,YAAY,IACX,KAAK,EAAC,mGAAmB,EACzB,WAAW,EAAC,6FAAkB,EAC9B,SAAS,EAAE,IAAI,KACX,aAAa,CAAC,KAAK,CAAC,kBAAkB,CAAC,EAAE,YAAY,CAAC,gBAAgB,EAAE,KAAK,EAAE,QAAQ,CAAC,KACxF,KAAK,EACT,QAAQ,EAAE,QAAQ,GAClB,CACH,CAAC;AACJ,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"RetirementIncomeField.js","sourceRoot":"","sources":["../../../../src/ui-kit/FormField/Fields/RetirementIncomeField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAmB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAC/E,KAAC,YAAY,IACX,KAAK,EAAC,mGAAmB,EACzB,WAAW,EAAC,6FAAkB,EAC9B,SAAS,EAAE,IAAI,KACX,aAAa,CAAC,KAAK,CAAC,kBAAkB,CAAC,EAAE,YAAY,CAAC,gBAAgB,EAAE,KAAK,EAAE,QAAQ,CAAC,KACxF,KAAK,GACT,CACH,CAAC,CAAC"}
@@ -1,16 +1,7 @@
1
1
  import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
2
2
  import { JSX } from '@redneckz/uni-jsx';
3
- import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
4
3
  import { InputControl } from '../../Input/InputControl.js';
5
4
  import { validatorObj } from '../getObjectValidator.js';
6
5
  import { getValidation } from '../getValidation.js';
7
- export const WagesField = JSX(({ field, input }) => {
8
- const currentRetirementIncome = field('retirementIncome')?.value;
9
- const onChange = useCallback((_) => {
10
- const incomesSum = Number(_) + Number(currentRetirementIncome || 0);
11
- field('wages')?.onChange?.(_);
12
- field('incomeAverage')?.onChange?.(String(incomesSum));
13
- }, [currentRetirementIncome]);
14
- return (_jsx(InputControl, { label: "\u0421\u043E\u0432\u043E\u043A\u0443\u043F\u043D\u044B\u0439 \u0434\u043E\u0445\u043E\u0434 \u0432 \u043C\u0435\u0441\u044F\u0446 \u043F\u043E\u0441\u043B\u0435 \u0432\u044B\u0447\u0435\u0442\u0430 \u043D\u0430\u043B\u043E\u0433\u043E\u0432 (\u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0430, \u043F\u0440\u0435\u043C\u0438\u0438)", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", isInteger: true, ...getValidation(field('wages'), validatorObj.wages, input?.required), ...input, onChange: onChange }));
15
- });
6
+ export const WagesField = JSX(({ field, input }) => (_jsx(InputControl, { label: "\u0421\u043E\u0432\u043E\u043A\u0443\u043F\u043D\u044B\u0439 \u0434\u043E\u0445\u043E\u0434 \u0432 \u043C\u0435\u0441\u044F\u0446 \u043F\u043E\u0441\u043B\u0435 \u0432\u044B\u0447\u0435\u0442\u0430 \u043D\u0430\u043B\u043E\u0433\u043E\u0432 (\u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0430, \u043F\u0440\u0435\u043C\u0438\u0438)", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", isInteger: true, ...getValidation(field('wages'), validatorObj.wages, input?.required), ...input })));
16
7
  //# sourceMappingURL=WagesField.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"WagesField.js","sourceRoot":"","sources":["../../../../src/ui-kit/FormField/Fields/WagesField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE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,KAAK,EAAE,EAAE,EAAE,CAAC,CACpE,KAAC,YAAY,IACX,KAAK,EAAC,2UAAkE,EACxE,WAAW,EAAC,6FAAkB,EAC9B,SAAS,EAAE,IAAI,KACX,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,CAAC,KAClE,KAAK,GACT,CACH,CAAC,CAAC"}
@@ -1 +1 @@
1
- export declare type NameFieldDef = 'surname' | 'name' | 'middleName' | 'education' | 'housing' | 'employment' | 'organization' | 'organizationPhone' | 'organizationAddress' | 'amountWorkers' | 'employerActivities' | 'employerOrganization' | 'positionOrganization' | 'dulSerie' | 'dulNumber' | 'dulIssueDateField' | 'dulSubdivisionCode' | 'dulIssuedBy' | 'email' | 'phone' | 'fullName' | 'inn' | 'comment' | 'region' | 'addressBranch' | 'typeForm' | 'registrationDate' | 'birthday' | 'limitedBirthday' | 'birthPlace' | 'sex' | 'isClient' | 'consentToReceiveMaterials' | 'acquiringType' | 'onlineCheckout' | 'posTerminal' | 'serviceDirection' | 'serviceType' | 'feedbackMethod' | 'bankEmpolee' | 'applicationDate' | 'secondaryPhone' | 'vedTypes' | 'term' | 'amount' | 'annualRevenue' | 'collectionCount' | 'desiredMeetingDate' | 'product' | 'localities' | 'partnerComments' | 'consentDataProcessing' | 'consentInformFlg' | 'consentOthersFlg' | 'consentPfrFlg' | 'consentProviderFlg' | 'processPersonalDataFlg' | 'legalForm' | 'organizationName' | 'generalSeniority' | 'lastJobExperience' | 'experience5Years' | 'jobsNumber' | 'beginDate' | 'addressFact' | 'familyStatus' | 'children' | 'familyMembers' | 'dependents' | 'totalIncome' | 'expenses' | 'snils' | 'conscription' | 'armyIdFlg' | 'addressRegistration' | 'participantDateRegistration' | 'retirementIncome' | 'otherIncome' | 'incomeAverage' | 'mandatoryPayments' | 'additionalIncome' | 'otherPayments' | 'rentalIncome' | 'wages' | 'creditInRshbCd' | 'disablePeopleFlg' | 'bankruptcyFlg' | 'shareholderFlg' | 'legalEntityName' | 'bankEmployeeCode' | 'partInBusiness' | 'regionRetail' | 'addressRetail' | 'addressMatch' | 'addressCourier' | 'deliveryDate' | 'methodObtain' | 'paymentSystem' | 'currency' | 'cardCategory' | 'codeWord' | 'calculator' | 'confirmationIncome';
1
+ export declare type NameFieldDef = 'surname' | 'name' | 'middleName' | 'education' | 'housing' | 'employment' | 'organization' | 'organizationPhone' | 'organizationAddress' | 'amountWorkers' | 'employerActivities' | 'employerOrganization' | 'positionOrganization' | 'dulSerie' | 'dulNumber' | 'dulIssueDateField' | 'dulSubdivisionCode' | 'dulIssuedBy' | 'email' | 'phone' | 'fullName' | 'inn' | 'comment' | 'region' | 'addressBranch' | 'typeForm' | 'registrationDate' | 'birthday' | 'limitedBirthday' | 'birthPlace' | 'sex' | 'isClient' | 'consentToReceiveMaterials' | 'acquiringType' | 'onlineCheckout' | 'posTerminal' | 'serviceDirection' | 'serviceType' | 'feedbackMethod' | 'bankEmpolee' | 'applicationDate' | 'secondaryPhone' | 'vedTypes' | 'term' | 'amount' | 'annualRevenue' | 'collectionCount' | 'desiredMeetingDate' | 'product' | 'localities' | 'partnerComments' | 'consentDataProcessing' | 'consentInformFlg' | 'consentOthersFlg' | 'consentPfrFlg' | 'consentProviderFlg' | 'processPersonalDataFlg' | 'legalForm' | 'organizationName' | 'generalSeniority' | 'lastJobExperience' | 'experience5Years' | 'jobsNumber' | 'beginDate' | 'addressFact' | 'familyStatus' | 'children' | 'familyMembers' | 'dependents' | 'totalIncome' | 'expenses' | 'snils' | 'conscription' | 'armyIdFlg' | 'addressRegistration' | 'participantDateRegistration' | 'retirementIncome' | 'otherIncome' | 'mandatoryPayments' | 'additionalIncome' | 'otherPayments' | 'rentalIncome' | 'wages' | 'creditInRshbCd' | 'disablePeopleFlg' | 'bankruptcyFlg' | 'shareholderFlg' | 'legalEntityName' | 'bankEmployeeCode' | 'partInBusiness' | 'regionRetail' | 'addressRetail' | 'addressMatch' | 'addressCourier' | 'deliveryDate' | 'methodObtain' | 'paymentSystem' | 'currency' | 'cardCategory' | 'codeWord' | 'calculator' | 'confirmationIncome';
@@ -117,7 +117,6 @@ export interface LeadFormState extends FormConsents, FormStateDeliveryType {
117
117
  participantDateRegistration?: Date | string;
118
118
  retirementIncome?: number;
119
119
  otherIncome?: number;
120
- incomeAverage?: number;
121
120
  mandatoryPayments?: number;
122
121
  additionalIncome?: number;
123
122
  otherPayments?: number;
@@ -8,7 +8,7 @@ import { type VNode } from '../../model/VNode';
8
8
  import { FailedStatusContent } from './FailedStatusContent';
9
9
  import { PendingStatusContent } from './PendingStatusContent';
10
10
  import { ReworkStatusContent } from './ReworkStatusContent';
11
- import { SuccessStatusContent } from './SuccessStatusContent';
11
+ import { SuccessStatusCardContent } from './SuccessStatusCardContent';
12
12
 
13
13
  const SIGNAL_TYPES: SignalType[] = [
14
14
  'CREATE_APPLICATION_SHORT_SIGNAL',
@@ -52,8 +52,8 @@ const renderStatus = (status: STATUS_TYPE, handleExpire: () => void) => {
52
52
  CANCELLED: <FailedStatusContent />,
53
53
  FAILED: <FailedStatusContent />,
54
54
  DRAFT: <FailedStatusContent />,
55
- APPROVED: <SuccessStatusContent />,
56
- PRE_DECISION: <SuccessStatusContent />,
55
+ APPROVED: <SuccessStatusCardContent />,
56
+ PRE_DECISION: <SuccessStatusCardContent />,
57
57
  REVISION: <ReworkStatusContent />,
58
58
  };
59
59
 
@@ -0,0 +1,45 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import { useRetailFormStore, type StatusInfoState } from '../../hooks/useRetailFormStore';
3
+ import { formatDate } from '../../utils/formatDate';
4
+ import { CreditCardFormStatus } from './CreditCardFormStatus';
5
+
6
+ export const SuccessStatusCardContent = JSX(() => {
7
+ const { statusInfo } = useRetailFormStore();
8
+
9
+ return (
10
+ <CreditCardFormStatus
11
+ title="Банк одобрил вам кредит"
12
+ description="Обратитесь в отделение банка, чтобы завершить оформление и получит ваш кредит"
13
+ sectionInfo={getSectionInfo(statusInfo)}
14
+ buttonText="Вернуться на главную"
15
+ />
16
+ );
17
+ });
18
+
19
+ const getSectionInfo = (statusInfo: StatusInfoState | null) => {
20
+ const sectionInfo = [
21
+ {
22
+ label: 'Название продукта',
23
+ description: 'Кредитная карта',
24
+ },
25
+ {
26
+ label: 'Категория',
27
+ description: statusInfo?.cardCategory,
28
+ },
29
+ ];
30
+
31
+ if (statusInfo?.deliveryAddress && statusInfo?.deliveryDate) {
32
+ return sectionInfo.concat([
33
+ {
34
+ label: 'Адрес доставки',
35
+ description: statusInfo?.deliveryAddress,
36
+ },
37
+ {
38
+ label: 'Дата доставки',
39
+ description: formatDate(statusInfo?.deliveryDate),
40
+ },
41
+ ]);
42
+ }
43
+
44
+ return sectionInfo;
45
+ };
@@ -40,12 +40,9 @@ export const useCreditCardFormAPI = ({
40
40
  retailFormStore.statusInfo = {
41
41
  regionRetail: leadForm?.regionRetail?.text,
42
42
  addressRetail: leadForm?.addressRetail?.text,
43
+ deliveryAddress: leadForm?.addressCourier?.fullAddress,
43
44
  cardCategory: leadForm?.cardCategory?.text,
44
- calculator: {
45
- monthsValue: leadForm?.calculator?.monthsValue,
46
- moneyValue: leadForm?.calculator?.moneyValue,
47
- isAnnuity: leadForm?.calculator?.isAnnuity,
48
- },
45
+ deliveryDate: leadForm?.deliveryDate,
49
46
  };
50
47
  retailFormStore.leadForm = initialState;
51
48
  }
@@ -41,7 +41,6 @@ export const useCreditFormAPI = ({
41
41
  retailFormStore.statusInfo = {
42
42
  regionRetail: leadForm?.regionRetail?.text,
43
43
  addressRetail: leadForm?.addressRetail?.text,
44
- cardCategory: leadForm?.cardCategory?.text,
45
44
  calculator: {
46
45
  monthsValue: leadForm?.calculator?.monthsValue,
47
46
  moneyValue: leadForm?.calculator?.moneyValue,
@@ -6,6 +6,8 @@ export type StatusInfoState = {
6
6
  regionRetail?: string;
7
7
  addressRetail?: string;
8
8
  cardCategory?: string;
9
+ deliveryDate?: Date | string;
10
+ deliveryAddress?: string;
9
11
  calculator?: {
10
12
  monthsValue?: number;
11
13
  moneyValue?: number;
@@ -11,7 +11,6 @@ export const getFamilyStatusAndIncomeData = (formData: LeadFormState): Partial<P
11
11
  confirmationIncome,
12
12
  wages,
13
13
  mandatoryPayments,
14
- incomeAverage,
15
14
  additionalIncome,
16
15
  otherIncome,
17
16
  otherPayments,
@@ -32,7 +31,7 @@ export const getFamilyStatusAndIncomeData = (formData: LeadFormState): Partial<P
32
31
  participantIncomes: getParticipantIncomes({
33
32
  wages,
34
33
  mandatoryPayments,
35
- incomeAverage,
34
+ incomeAverage: countIncomeAverage(wages, retirementIncome),
36
35
  additionalIncome,
37
36
  otherIncome,
38
37
  otherPayments,
@@ -43,3 +42,6 @@ export const getFamilyStatusAndIncomeData = (formData: LeadFormState): Partial<P
43
42
  armyIdFlg,
44
43
  };
45
44
  };
45
+
46
+ export const countIncomeAverage = (wages?: number, retirementIncome?: number) =>
47
+ Number(wages) + Number(retirementIncome);
@@ -1,6 +1,7 @@
1
1
  /* eslint-disable camelcase */
2
2
  import { type LeadProps } from '../../api/RetailAPI/model/LeadFormData';
3
3
  import { type Participant } from '../../api/RetailAPI/updateUserTask';
4
+ import { countIncomeAverage } from '../../services/retail/adaptors/getFamilyStatusAndIncomeData';
4
5
  import { type Option } from '../Select/Option';
5
6
 
6
7
  export const enum EContactType {
@@ -61,9 +62,6 @@ export const getParticipantIncomes = (participantIncomes: Participant['participa
61
62
  const mandatoryPayments = participantIncomes?.find(
62
63
  (contact) => contact.incomeTypeCd.key === EIncomesType.MANDATORY_PAYMENTS,
63
64
  )?.value;
64
- const incomeAverage = participantIncomes?.find(
65
- (contact) => contact.incomeTypeCd.key === EIncomesType.INCOME_AVERAGE,
66
- )?.value;
67
65
  const additionalIncome = participantIncomes?.find(
68
66
  (contact) => contact.incomeTypeCd.key === EIncomesType.ADDITIONAL_INCOME,
69
67
  )?.value;
@@ -79,6 +77,7 @@ export const getParticipantIncomes = (participantIncomes: Participant['participa
79
77
  const retirementIncome = participantIncomes?.find(
80
78
  (contact) => contact.incomeTypeCd.key === EIncomesType.RETIREMENT_INCOME,
81
79
  )?.value;
80
+ const incomeAverage = countIncomeAverage(wages, retirementIncome);
82
81
 
83
82
  return {
84
83
  wages,
@@ -1,31 +1,15 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
- import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
3
2
  import { InputControl } from '../../Input/InputControl';
4
3
  import type { CustomFieldProps } from '../CustomFieldProps';
5
4
  import { validatorObj } from '../getObjectValidator';
6
5
  import { getValidation } from '../getValidation';
7
6
 
8
- export const RetirementIncomeField = JSX<CustomFieldProps>(({ field, input }) => {
9
- const currentWages = field('wages')?.value;
10
-
11
- const onChange = useCallback(
12
- (_: string) => {
13
- const incomesSum = Number(_) + Number(currentWages || 0);
14
-
15
- field('retirementIncome')?.onChange?.(_);
16
- field('incomeAverage')?.onChange?.(String(incomesSum));
17
- },
18
- [currentWages],
19
- );
20
-
21
- return (
22
- <InputControl
23
- label="Пенсионные доходы"
24
- placeholder="Введите значение"
25
- isInteger={true}
26
- {...getValidation(field('retirementIncome'), validatorObj.retirementIncome, input?.required)}
27
- {...input}
28
- onChange={onChange}
29
- />
30
- );
31
- });
7
+ export const RetirementIncomeField = JSX<CustomFieldProps>(({ field, input }) => (
8
+ <InputControl
9
+ label="Пенсионные доходы"
10
+ placeholder="Введите значение"
11
+ isInteger={true}
12
+ {...getValidation(field('retirementIncome'), validatorObj.retirementIncome, input?.required)}
13
+ {...input}
14
+ />
15
+ ));
@@ -1,31 +1,15 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
- import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
3
2
  import { InputControl } from '../../Input/InputControl';
4
3
  import type { CustomFieldProps } from '../CustomFieldProps';
5
4
  import { validatorObj } from '../getObjectValidator';
6
5
  import { getValidation } from '../getValidation';
7
6
 
8
- export const WagesField = JSX<CustomFieldProps>(({ field, input }) => {
9
- const currentRetirementIncome = field('retirementIncome')?.value;
10
-
11
- const onChange = useCallback(
12
- (_: string) => {
13
- const incomesSum = Number(_) + Number(currentRetirementIncome || 0);
14
-
15
- field('wages')?.onChange?.(_);
16
- field('incomeAverage')?.onChange?.(String(incomesSum));
17
- },
18
- [currentRetirementIncome],
19
- );
20
-
21
- return (
22
- <InputControl
23
- label="Совокупный доход в месяц после вычета налогов (зарплата, премии)"
24
- placeholder="Введите значение"
25
- isInteger={true}
26
- {...getValidation(field('wages'), validatorObj.wages, input?.required)}
27
- {...input}
28
- onChange={onChange}
29
- />
30
- );
31
- });
7
+ export const WagesField = JSX<CustomFieldProps>(({ field, input }) => (
8
+ <InputControl
9
+ label="Совокупный доход в месяц после вычета налогов (зарплата, премии)"
10
+ placeholder="Введите значение"
11
+ isInteger={true}
12
+ {...getValidation(field('wages'), validatorObj.wages, input?.required)}
13
+ {...input}
14
+ />
15
+ ));
@@ -77,7 +77,6 @@ export type NameFieldDef =
77
77
  | 'participantDateRegistration'
78
78
  | 'retirementIncome'
79
79
  | 'otherIncome'
80
- | 'incomeAverage'
81
80
  | 'mandatoryPayments'
82
81
  | 'additionalIncome'
83
82
  | 'otherPayments'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redneckz/wildless-cms-uni-blocks",
3
- "version": "0.14.722",
3
+ "version": "0.14.724",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "ЦК",
@@ -117,7 +117,6 @@ export interface LeadFormState extends FormConsents, FormStateDeliveryType {
117
117
  participantDateRegistration?: Date | string;
118
118
  retirementIncome?: number;
119
119
  otherIncome?: number;
120
- incomeAverage?: number;
121
120
  mandatoryPayments?: number;
122
121
  additionalIncome?: number;
123
122
  otherPayments?: number;
@@ -8,7 +8,7 @@ import { type VNode } from '../../model/VNode';
8
8
  import { FailedStatusContent } from './FailedStatusContent';
9
9
  import { PendingStatusContent } from './PendingStatusContent';
10
10
  import { ReworkStatusContent } from './ReworkStatusContent';
11
- import { SuccessStatusContent } from './SuccessStatusContent';
11
+ import { SuccessStatusCardContent } from './SuccessStatusCardContent';
12
12
 
13
13
  const SIGNAL_TYPES: SignalType[] = [
14
14
  'CREATE_APPLICATION_SHORT_SIGNAL',
@@ -52,8 +52,8 @@ const renderStatus = (status: STATUS_TYPE, handleExpire: () => void) => {
52
52
  CANCELLED: <FailedStatusContent />,
53
53
  FAILED: <FailedStatusContent />,
54
54
  DRAFT: <FailedStatusContent />,
55
- APPROVED: <SuccessStatusContent />,
56
- PRE_DECISION: <SuccessStatusContent />,
55
+ APPROVED: <SuccessStatusCardContent />,
56
+ PRE_DECISION: <SuccessStatusCardContent />,
57
57
  REVISION: <ReworkStatusContent />,
58
58
  };
59
59
 
@@ -0,0 +1,45 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import { useRetailFormStore, type StatusInfoState } from '../../hooks/useRetailFormStore';
3
+ import { formatDate } from '../../utils/formatDate';
4
+ import { CreditCardFormStatus } from './CreditCardFormStatus';
5
+
6
+ export const SuccessStatusCardContent = JSX(() => {
7
+ const { statusInfo } = useRetailFormStore();
8
+
9
+ return (
10
+ <CreditCardFormStatus
11
+ title="Банк одобрил вам кредит"
12
+ description="Обратитесь в отделение банка, чтобы завершить оформление и получит ваш кредит"
13
+ sectionInfo={getSectionInfo(statusInfo)}
14
+ buttonText="Вернуться на главную"
15
+ />
16
+ );
17
+ });
18
+
19
+ const getSectionInfo = (statusInfo: StatusInfoState | null) => {
20
+ const sectionInfo = [
21
+ {
22
+ label: 'Название продукта',
23
+ description: 'Кредитная карта',
24
+ },
25
+ {
26
+ label: 'Категория',
27
+ description: statusInfo?.cardCategory,
28
+ },
29
+ ];
30
+
31
+ if (statusInfo?.deliveryAddress && statusInfo?.deliveryDate) {
32
+ return sectionInfo.concat([
33
+ {
34
+ label: 'Адрес доставки',
35
+ description: statusInfo?.deliveryAddress,
36
+ },
37
+ {
38
+ label: 'Дата доставки',
39
+ description: formatDate(statusInfo?.deliveryDate),
40
+ },
41
+ ]);
42
+ }
43
+
44
+ return sectionInfo;
45
+ };
@@ -40,12 +40,9 @@ export const useCreditCardFormAPI = ({
40
40
  retailFormStore.statusInfo = {
41
41
  regionRetail: leadForm?.regionRetail?.text,
42
42
  addressRetail: leadForm?.addressRetail?.text,
43
+ deliveryAddress: leadForm?.addressCourier?.fullAddress,
43
44
  cardCategory: leadForm?.cardCategory?.text,
44
- calculator: {
45
- monthsValue: leadForm?.calculator?.monthsValue,
46
- moneyValue: leadForm?.calculator?.moneyValue,
47
- isAnnuity: leadForm?.calculator?.isAnnuity,
48
- },
45
+ deliveryDate: leadForm?.deliveryDate,
49
46
  };
50
47
  retailFormStore.leadForm = initialState;
51
48
  }
@@ -41,7 +41,6 @@ export const useCreditFormAPI = ({
41
41
  retailFormStore.statusInfo = {
42
42
  regionRetail: leadForm?.regionRetail?.text,
43
43
  addressRetail: leadForm?.addressRetail?.text,
44
- cardCategory: leadForm?.cardCategory?.text,
45
44
  calculator: {
46
45
  monthsValue: leadForm?.calculator?.monthsValue,
47
46
  moneyValue: leadForm?.calculator?.moneyValue,
@@ -6,6 +6,8 @@ export type StatusInfoState = {
6
6
  regionRetail?: string;
7
7
  addressRetail?: string;
8
8
  cardCategory?: string;
9
+ deliveryDate?: Date | string;
10
+ deliveryAddress?: string;
9
11
  calculator?: {
10
12
  monthsValue?: number;
11
13
  moneyValue?: number;
@@ -11,7 +11,6 @@ export const getFamilyStatusAndIncomeData = (formData: LeadFormState): Partial<P
11
11
  confirmationIncome,
12
12
  wages,
13
13
  mandatoryPayments,
14
- incomeAverage,
15
14
  additionalIncome,
16
15
  otherIncome,
17
16
  otherPayments,
@@ -32,7 +31,7 @@ export const getFamilyStatusAndIncomeData = (formData: LeadFormState): Partial<P
32
31
  participantIncomes: getParticipantIncomes({
33
32
  wages,
34
33
  mandatoryPayments,
35
- incomeAverage,
34
+ incomeAverage: countIncomeAverage(wages, retirementIncome),
36
35
  additionalIncome,
37
36
  otherIncome,
38
37
  otherPayments,
@@ -43,3 +42,6 @@ export const getFamilyStatusAndIncomeData = (formData: LeadFormState): Partial<P
43
42
  armyIdFlg,
44
43
  };
45
44
  };
45
+
46
+ export const countIncomeAverage = (wages?: number, retirementIncome?: number) =>
47
+ Number(wages) + Number(retirementIncome);
@@ -1,6 +1,7 @@
1
1
  /* eslint-disable camelcase */
2
2
  import { type LeadProps } from '../../api/RetailAPI/model/LeadFormData';
3
3
  import { type Participant } from '../../api/RetailAPI/updateUserTask';
4
+ import { countIncomeAverage } from '../../services/retail/adaptors/getFamilyStatusAndIncomeData';
4
5
  import { type Option } from '../Select/Option';
5
6
 
6
7
  export const enum EContactType {
@@ -61,9 +62,6 @@ export const getParticipantIncomes = (participantIncomes: Participant['participa
61
62
  const mandatoryPayments = participantIncomes?.find(
62
63
  (contact) => contact.incomeTypeCd.key === EIncomesType.MANDATORY_PAYMENTS,
63
64
  )?.value;
64
- const incomeAverage = participantIncomes?.find(
65
- (contact) => contact.incomeTypeCd.key === EIncomesType.INCOME_AVERAGE,
66
- )?.value;
67
65
  const additionalIncome = participantIncomes?.find(
68
66
  (contact) => contact.incomeTypeCd.key === EIncomesType.ADDITIONAL_INCOME,
69
67
  )?.value;
@@ -79,6 +77,7 @@ export const getParticipantIncomes = (participantIncomes: Participant['participa
79
77
  const retirementIncome = participantIncomes?.find(
80
78
  (contact) => contact.incomeTypeCd.key === EIncomesType.RETIREMENT_INCOME,
81
79
  )?.value;
80
+ const incomeAverage = countIncomeAverage(wages, retirementIncome);
82
81
 
83
82
  return {
84
83
  wages,
@@ -1,31 +1,15 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
- import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
3
2
  import { InputControl } from '../../Input/InputControl';
4
3
  import type { CustomFieldProps } from '../CustomFieldProps';
5
4
  import { validatorObj } from '../getObjectValidator';
6
5
  import { getValidation } from '../getValidation';
7
6
 
8
- export const RetirementIncomeField = JSX<CustomFieldProps>(({ field, input }) => {
9
- const currentWages = field('wages')?.value;
10
-
11
- const onChange = useCallback(
12
- (_: string) => {
13
- const incomesSum = Number(_) + Number(currentWages || 0);
14
-
15
- field('retirementIncome')?.onChange?.(_);
16
- field('incomeAverage')?.onChange?.(String(incomesSum));
17
- },
18
- [currentWages],
19
- );
20
-
21
- return (
22
- <InputControl
23
- label="Пенсионные доходы"
24
- placeholder="Введите значение"
25
- isInteger={true}
26
- {...getValidation(field('retirementIncome'), validatorObj.retirementIncome, input?.required)}
27
- {...input}
28
- onChange={onChange}
29
- />
30
- );
31
- });
7
+ export const RetirementIncomeField = JSX<CustomFieldProps>(({ field, input }) => (
8
+ <InputControl
9
+ label="Пенсионные доходы"
10
+ placeholder="Введите значение"
11
+ isInteger={true}
12
+ {...getValidation(field('retirementIncome'), validatorObj.retirementIncome, input?.required)}
13
+ {...input}
14
+ />
15
+ ));
@@ -1,31 +1,15 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
- import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
3
2
  import { InputControl } from '../../Input/InputControl';
4
3
  import type { CustomFieldProps } from '../CustomFieldProps';
5
4
  import { validatorObj } from '../getObjectValidator';
6
5
  import { getValidation } from '../getValidation';
7
6
 
8
- export const WagesField = JSX<CustomFieldProps>(({ field, input }) => {
9
- const currentRetirementIncome = field('retirementIncome')?.value;
10
-
11
- const onChange = useCallback(
12
- (_: string) => {
13
- const incomesSum = Number(_) + Number(currentRetirementIncome || 0);
14
-
15
- field('wages')?.onChange?.(_);
16
- field('incomeAverage')?.onChange?.(String(incomesSum));
17
- },
18
- [currentRetirementIncome],
19
- );
20
-
21
- return (
22
- <InputControl
23
- label="Совокупный доход в месяц после вычета налогов (зарплата, премии)"
24
- placeholder="Введите значение"
25
- isInteger={true}
26
- {...getValidation(field('wages'), validatorObj.wages, input?.required)}
27
- {...input}
28
- onChange={onChange}
29
- />
30
- );
31
- });
7
+ export const WagesField = JSX<CustomFieldProps>(({ field, input }) => (
8
+ <InputControl
9
+ label="Совокупный доход в месяц после вычета налогов (зарплата, премии)"
10
+ placeholder="Введите значение"
11
+ isInteger={true}
12
+ {...getValidation(field('wages'), validatorObj.wages, input?.required)}
13
+ {...input}
14
+ />
15
+ ));
@@ -77,7 +77,6 @@ export type NameFieldDef =
77
77
  | 'participantDateRegistration'
78
78
  | 'retirementIncome'
79
79
  | 'otherIncome'
80
- | 'incomeAverage'
81
80
  | 'mandatoryPayments'
82
81
  | 'additionalIncome'
83
82
  | 'otherPayments'
@@ -1 +0,0 @@
1
- export declare const SuccessStatusContent: import("@redneckz/uni-jsx").UNIComponent<{}, any, any>;
@@ -1 +0,0 @@
1
- export declare const SuccessStatusContent: import("@redneckz/uni-jsx").UNIComponent<{}, any, any>;