cozy-ui 103.9.0 → 103.10.0

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/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ # [103.10.0](https://github.com/cozy/cozy-ui/compare/v103.9.0...v103.10.0) (2024-03-05)
2
+
3
+
4
+ ### Features
5
+
6
+ * **Viewer:** Add `€` for net social amount and pay_sheet number value ([a8e6800](https://github.com/cozy/cozy-ui/commit/a8e6800))
7
+ * **Viewer:** Add translate for reference tax number ([99da6d6](https://github.com/cozy/cozy-ui/commit/99da6d6))
8
+
1
9
  # [103.9.0](https://github.com/cozy/cozy-ui/compare/v103.8.2...v103.9.0) (2024-03-04)
2
10
 
3
11
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-ui",
3
- "version": "103.9.0",
3
+ "version": "103.10.0",
4
4
  "description": "Cozy apps UI SDK",
5
5
  "main": "./index.js",
6
6
  "bin": {
@@ -12,7 +12,13 @@ import QualificationListItemText from './QualificationListItemText'
12
12
  import { useI18n } from '../../providers/I18n'
13
13
  import MidEllipsis from '../../MidEllipsis'
14
14
 
15
- export const makeInformationValue = ({ name, value, t, scannerT }) => {
15
+ export const makeInformationValue = ({
16
+ name,
17
+ value,
18
+ qualificationLabel,
19
+ t,
20
+ scannerT
21
+ }) => {
16
22
  if (typeof value !== 'number' && !value) {
17
23
  return t('Viewer.panel.qualification.noInfo')
18
24
  }
@@ -25,7 +31,11 @@ export const makeInformationValue = ({ name, value, t, scannerT }) => {
25
31
  if (name === 'contractType') {
26
32
  return scannerT(`Scan.attributes.contractType.${value}`, { _: value })
27
33
  }
28
- if (name === 'refTaxIncome') {
34
+ if (
35
+ name === 'refTaxIncome' ||
36
+ name === 'netSocialAmount' ||
37
+ (name === 'number' && qualificationLabel === 'pay_sheet')
38
+ ) {
29
39
  return `${value} €`
30
40
  }
31
41
 
@@ -39,7 +49,13 @@ const QualificationListItemInformation = forwardRef(
39
49
  const { name, value } = formatedMetadataQualification
40
50
  const qualificationLabel = file.metadata.qualification.label
41
51
 
42
- const currentValue = makeInformationValue({ name, value, t, scannerT })
52
+ const currentValue = makeInformationValue({
53
+ name,
54
+ value,
55
+ qualificationLabel,
56
+ t,
57
+ scannerT
58
+ })
43
59
  const title =
44
60
  name === 'number'
45
61
  ? t(
@@ -88,6 +88,18 @@
88
88
  "pay_sheet": {
89
89
  "number": "Gross remuneration"
90
90
  },
91
+ "tax_return": {
92
+ "number": "Reference tax number"
93
+ },
94
+ "tax_notice": {
95
+ "number": "Reference tax number"
96
+ },
97
+ "real_estate_tax": {
98
+ "number": "Reference tax number"
99
+ },
100
+ "tax_timetable": {
101
+ "number": "Reference tax number"
102
+ },
91
103
  "country": "Beneficiary nationality",
92
104
  "refTaxIncome": "Reference tax income",
93
105
  "contractType": "Contract type",
@@ -88,6 +88,18 @@
88
88
  "pay_sheet": {
89
89
  "number": "Rémunération brute"
90
90
  },
91
+ "tax_return": {
92
+ "number": "Numéro fiscal de référence"
93
+ },
94
+ "tax_notice": {
95
+ "number": "Numéro fiscal de référence"
96
+ },
97
+ "real_estate_tax": {
98
+ "number": "Numéro fiscal de référence"
99
+ },
100
+ "tax_timetable": {
101
+ "number": "Numéro fiscal de référence"
102
+ },
91
103
  "country": "Nationalité du bénéficiaire",
92
104
  "refTaxIncome": "Revenu fiscal de référence",
93
105
  "contractType": "Type de contrat",
@@ -12,6 +12,7 @@ import MidEllipsis from "cozy-ui/transpiled/react/MidEllipsis";
12
12
  export var makeInformationValue = function makeInformationValue(_ref) {
13
13
  var name = _ref.name,
14
14
  value = _ref.value,
15
+ qualificationLabel = _ref.qualificationLabel,
15
16
  t = _ref.t,
16
17
  scannerT = _ref.scannerT;
17
18
 
@@ -31,7 +32,7 @@ export var makeInformationValue = function makeInformationValue(_ref) {
31
32
  });
32
33
  }
33
34
 
34
- if (name === 'refTaxIncome') {
35
+ if (name === 'refTaxIncome' || name === 'netSocialAmount' || name === 'number' && qualificationLabel === 'pay_sheet') {
35
36
  return "".concat(value, " \u20AC");
36
37
  }
37
38
 
@@ -55,6 +56,7 @@ var QualificationListItemInformation = /*#__PURE__*/forwardRef(function (_ref2,
55
56
  var currentValue = makeInformationValue({
56
57
  name: name,
57
58
  value: value,
59
+ qualificationLabel: qualificationLabel,
58
60
  t: t,
59
61
  scannerT: scannerT
60
62
  });
@@ -89,6 +89,18 @@ var en = {
89
89
  pay_sheet: {
90
90
  number: "Gross remuneration"
91
91
  },
92
+ tax_return: {
93
+ number: "Reference tax number"
94
+ },
95
+ tax_notice: {
96
+ number: "Reference tax number"
97
+ },
98
+ real_estate_tax: {
99
+ number: "Reference tax number"
100
+ },
101
+ tax_timetable: {
102
+ number: "Reference tax number"
103
+ },
92
104
  country: "Beneficiary nationality",
93
105
  refTaxIncome: "Reference tax income",
94
106
  contractType: "Contract type",
@@ -227,6 +239,18 @@ var fr = {
227
239
  pay_sheet: {
228
240
  number: "R\xE9mun\xE9ration brute"
229
241
  },
242
+ tax_return: {
243
+ number: "Num\xE9ro fiscal de r\xE9f\xE9rence"
244
+ },
245
+ tax_notice: {
246
+ number: "Num\xE9ro fiscal de r\xE9f\xE9rence"
247
+ },
248
+ real_estate_tax: {
249
+ number: "Num\xE9ro fiscal de r\xE9f\xE9rence"
250
+ },
251
+ tax_timetable: {
252
+ number: "Num\xE9ro fiscal de r\xE9f\xE9rence"
253
+ },
230
254
  country: "Nationalit\xE9 du b\xE9n\xE9ficiaire",
231
255
  refTaxIncome: "Revenu fiscal de r\xE9f\xE9rence",
232
256
  contractType: "Type de contrat",