@zauru-sdk/components 6.7.0 → 6.8.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
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [6.8.0](https://github.com/intuitiva/zauru-typescript-sdk/compare/@zauru-sdk/components@6.7.0...@zauru-sdk/components@6.8.0) (2026-09-19)
7
+
8
+
9
+ ### Features
10
+
11
+ * guardar y mostrar motivo en historial de % rechazo ([02e546f](https://github.com/intuitiva/zauru-typescript-sdk/commit/02e546f716538b4c91542398e3984153145d862e))
12
+
13
+
14
+
15
+
16
+
6
17
  # [6.7.0](https://github.com/intuitiva/zauru-typescript-sdk/compare/@zauru-sdk/components@6.6.0...@zauru-sdk/components@6.7.0) (2026-09-18)
7
18
 
8
19
 
@@ -7,6 +7,7 @@ export type RejectionPercentageHistoryItem = {
7
7
  created_at?: string;
8
8
  type?: string;
9
9
  successive?: boolean;
10
+ observations?: string;
10
11
  };
11
12
  type NamedRecord = {
12
13
  id?: number;
@@ -43,6 +43,12 @@ export const RejectionPercentageHistoryList = ({ items, employees, agencies, act
43
43
  const agencyName = findName(agencies, item.agency_id) ||
44
44
  (item.agency_id != null ? `ID: ${item.agency_id}` : "No especificada");
45
45
  const description = item.description || "Sin descripción";
46
+ const observations = item.observations?.trim() ?? "";
47
+ const noteClassName = isSuccessive
48
+ ? "text-sm text-amber-900 mb-1"
49
+ : isAutomatic
50
+ ? "text-sm text-indigo-900 mb-1"
51
+ : "text-sm text-gray-700 mb-1";
46
52
  return (_jsxs("div", { className: isSuccessive
47
53
  ? "border border-amber-200 rounded-lg p-3 bg-amber-50"
48
54
  : isAutomatic
@@ -51,11 +57,7 @@ export const RejectionPercentageHistoryList = ({ items, employees, agencies, act
51
57
  ? "font-semibold text-amber-800"
52
58
  : isAutomatic
53
59
  ? "font-semibold text-indigo-800"
54
- : "font-semibold text-blue-600", children: formatSignedPercentage(Number(item.discount) || 0, isAutomatic) }), isSuccessive ? (_jsx("span", { className: "shrink-0 whitespace-nowrap rounded-full bg-amber-100 px-2 py-0.5 text-xs font-medium text-amber-800", children: "Sucesivo" })) : null, isAutomatic ? (_jsx("span", { className: "shrink-0 whitespace-nowrap rounded-full bg-indigo-100 px-2 py-0.5 text-xs font-medium text-indigo-800", children: "Autom\u00E1tico" })) : null] }), item.created_at ? (_jsx("span", { className: "text-xs text-gray-500 shrink-0", children: formatHistoryDate(item.created_at) })) : null] }), _jsx("p", { className: isSuccessive
55
- ? "text-sm text-amber-900 mb-1"
56
- : isAutomatic
57
- ? "text-sm text-indigo-900 mb-1"
58
- : "text-sm text-gray-700 mb-1", title: description, children: description }), _jsxs("div", { className: "flex justify-between gap-3 text-xs text-gray-500", children: [_jsx("span", { className: "min-w-0", children: isAutomatic
60
+ : "font-semibold text-blue-600", children: formatSignedPercentage(Number(item.discount) || 0, isAutomatic) }), isSuccessive ? (_jsx("span", { className: "shrink-0 whitespace-nowrap rounded-full bg-amber-100 px-2 py-0.5 text-xs font-medium text-amber-800", children: "Sucesivo" })) : null, isAutomatic ? (_jsx("span", { className: "shrink-0 whitespace-nowrap rounded-full bg-indigo-100 px-2 py-0.5 text-xs font-medium text-indigo-800", children: "Autom\u00E1tico" })) : null] }), item.created_at ? (_jsx("span", { className: "text-xs text-gray-500 shrink-0", children: formatHistoryDate(item.created_at) })) : null] }), _jsx("p", { className: noteClassName, title: description, children: description }), observations ? (_jsxs("p", { className: `${noteClassName} break-words whitespace-pre-wrap`, children: [_jsx("span", { className: "font-medium", children: "Motivo: " }), observations] })) : null, _jsxs("div", { className: "flex justify-between gap-3 text-xs text-gray-500", children: [_jsx("span", { className: "min-w-0", children: isAutomatic
59
61
  ? "Aplicado por el sistema"
60
62
  : `${actorLabel}: ${employeeName}` }), _jsxs("span", { className: "shrink-0", children: ["Agencia: ", agencyName] })] })] }, `${item.created_at ?? "entry"}-${item.type ?? "manual"}-${index}`));
61
63
  }) }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zauru-sdk/components",
3
- "version": "6.7.0",
3
+ "version": "6.8.0",
4
4
  "description": "Componentes reutilizables en las WebApps de Zauru.",
5
5
  "main": "./dist/esm/index.js",
6
6
  "module": "./dist/esm/index.js",
@@ -44,12 +44,12 @@
44
44
  "@reduxjs/toolkit": "^2.2.1",
45
45
  "@remix-run/node": "^2.8.1",
46
46
  "@remix-run/react": "^2.8.1",
47
- "@zauru-sdk/common": "^6.8.0",
48
- "@zauru-sdk/hooks": "^6.3.13",
47
+ "@zauru-sdk/common": "^6.8.1",
48
+ "@zauru-sdk/hooks": "^6.3.14",
49
49
  "@zauru-sdk/icons": "^6.1.0",
50
- "@zauru-sdk/redux": "^6.5.11",
51
- "@zauru-sdk/types": "^6.18.0",
52
- "@zauru-sdk/utils": "^6.18.0",
50
+ "@zauru-sdk/redux": "^6.5.12",
51
+ "@zauru-sdk/types": "^6.19.0",
52
+ "@zauru-sdk/utils": "^6.18.1",
53
53
  "browser-image-compression": "^2.0.2",
54
54
  "framer-motion": "^12.0.0",
55
55
  "jsonwebtoken": "^9.0.2",
@@ -62,5 +62,5 @@
62
62
  "styled-components": "^5.3.5",
63
63
  "zod": "^3.23.8"
64
64
  },
65
- "gitHead": "c5b785baa29fdd2ab7f42a9077ba5cbe5c7c9707"
65
+ "gitHead": "7dd259a98a24d4aba27e749c085eda117c0d657d"
66
66
  }
@@ -13,6 +13,7 @@ export type RejectionPercentageHistoryItem = {
13
13
  created_at?: string;
14
14
  type?: string;
15
15
  successive?: boolean;
16
+ observations?: string;
16
17
  };
17
18
 
18
19
  type NamedRecord = {
@@ -88,6 +89,12 @@ export const RejectionPercentageHistoryList = ({
88
89
  findName(agencies, item.agency_id) ||
89
90
  (item.agency_id != null ? `ID: ${item.agency_id}` : "No especificada");
90
91
  const description = item.description || "Sin descripción";
92
+ const observations = item.observations?.trim() ?? "";
93
+ const noteClassName = isSuccessive
94
+ ? "text-sm text-amber-900 mb-1"
95
+ : isAutomatic
96
+ ? "text-sm text-indigo-900 mb-1"
97
+ : "text-sm text-gray-700 mb-1";
91
98
 
92
99
  return (
93
100
  <div
@@ -130,18 +137,15 @@ export const RejectionPercentageHistoryList = ({
130
137
  </span>
131
138
  ) : null}
132
139
  </div>
133
- <p
134
- className={
135
- isSuccessive
136
- ? "text-sm text-amber-900 mb-1"
137
- : isAutomatic
138
- ? "text-sm text-indigo-900 mb-1"
139
- : "text-sm text-gray-700 mb-1"
140
- }
141
- title={description}
142
- >
140
+ <p className={noteClassName} title={description}>
143
141
  {description}
144
142
  </p>
143
+ {observations ? (
144
+ <p className={`${noteClassName} break-words whitespace-pre-wrap`}>
145
+ <span className="font-medium">Motivo: </span>
146
+ {observations}
147
+ </p>
148
+ ) : null}
145
149
  <div className="flex justify-between gap-3 text-xs text-gray-500">
146
150
  <span className="min-w-0">
147
151
  {isAutomatic