@nice2dev/ui-erp 1.2.1 → 1.2.2
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/dist/index.cjs +96 -97
- package/dist/index.mjs +96 -97
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -216,7 +216,16 @@ const tr = {
|
|
|
216
216
|
"zoom-out": "M11 4a7 7 0 100 14 7 7 0 000-14z M21 21l-4.35-4.35 M8 11h6",
|
|
217
217
|
navigation: "M12 2l7 19-7-4-7 4z",
|
|
218
218
|
"refresh-ccw": "M1 4v6h6 M23 20v-6h-6 M20.49 9A9 9 0 005.64 5.64L1 10 M3.51 15a9 9 0 0014.85 3.36L23 14",
|
|
219
|
-
minimize: "M4 14h6v6 M20 10h-6V4 M14 10l7-7 M3 21l7-7"
|
|
219
|
+
minimize: "M4 14h6v6 M20 10h-6V4 M14 10l7-7 M3 21l7-7",
|
|
220
|
+
// 1.2.2: geometry tools and object grouping, drawn as glyphs before (Ntd* of the same names in icons)
|
|
221
|
+
point: "M12 8a4 4 0 1 0 0 8a4 4 0 1 0 0-8z M12 12h.01",
|
|
222
|
+
segment: "M6.5 17.5L17.5 6.5 M3 19a2 2 0 1 0 4 0a2 2 0 1 0-4 0 M17 5a2 2 0 1 0 4 0a2 2 0 1 0-4 0",
|
|
223
|
+
perpendicular: "M3 20h18 M12 20V4 M12 15h5v5",
|
|
224
|
+
parallel: "M4 16L14 6 M10 20L20 10",
|
|
225
|
+
midpoint: "M3 12h6 M15 12h6 M3 9v6 M21 9v6 M12 9a3 3 0 1 0 0 6a3 3 0 1 0 0-6z",
|
|
226
|
+
"angle-bisector": "M4 20h17 M4 20L16 5 M4 20l14.4-6.9 M10 20a6 6 0 0 0-2.25-4.68",
|
|
227
|
+
group: "M3 7V3h4 M17 3h4v4 M21 17v4h-4 M7 21H3v-4 M7 7h5v5H7z M12 12h5v5h-5z",
|
|
228
|
+
ungroup: "M3 3h8v8H3z M13 13h8v8h-8z"
|
|
220
229
|
}, la = {
|
|
221
230
|
xs: 12,
|
|
222
231
|
sm: 16,
|
|
@@ -231,7 +240,7 @@ function da({
|
|
|
231
240
|
style: a2,
|
|
232
241
|
color: n,
|
|
233
242
|
title: o,
|
|
234
|
-
onClick:
|
|
243
|
+
onClick: i2
|
|
235
244
|
}) {
|
|
236
245
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
237
246
|
"svg",
|
|
@@ -250,7 +259,7 @@ function da({
|
|
|
250
259
|
role: o ? "img" : "presentation",
|
|
251
260
|
"aria-label": o,
|
|
252
261
|
"aria-hidden": !o,
|
|
253
|
-
onClick:
|
|
262
|
+
onClick: i2,
|
|
254
263
|
children: [
|
|
255
264
|
o && /* @__PURE__ */ jsxRuntime.jsx("title", { children: o }),
|
|
256
265
|
/* @__PURE__ */ jsxRuntime.jsx("path", { d: e })
|
|
@@ -258,20 +267,20 @@ function da({
|
|
|
258
267
|
}
|
|
259
268
|
);
|
|
260
269
|
}
|
|
261
|
-
const
|
|
270
|
+
const ae = ({
|
|
262
271
|
name: e,
|
|
263
272
|
size: t = "md",
|
|
264
273
|
className: r,
|
|
265
274
|
style: a2,
|
|
266
275
|
color: n,
|
|
267
276
|
title: o,
|
|
268
|
-
onClick:
|
|
277
|
+
onClick: i2
|
|
269
278
|
}) => {
|
|
270
|
-
const { resolver:
|
|
271
|
-
if (
|
|
272
|
-
const d =
|
|
279
|
+
const { resolver: s } = ve.useContext(gt), c2 = typeof t == "number" ? t : la[t];
|
|
280
|
+
if (s) {
|
|
281
|
+
const d = s(e, c2);
|
|
273
282
|
if (d)
|
|
274
|
-
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: `nice-icon-wrap ${r || ""}`, style: a2, onClick:
|
|
283
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: `nice-icon-wrap ${r || ""}`, style: a2, onClick: i2, children: d });
|
|
275
284
|
}
|
|
276
285
|
const l = tr[e];
|
|
277
286
|
return l ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -283,7 +292,7 @@ const re = ({
|
|
|
283
292
|
style: a2,
|
|
284
293
|
color: n,
|
|
285
294
|
title: o,
|
|
286
|
-
onClick:
|
|
295
|
+
onClick: i2
|
|
287
296
|
}
|
|
288
297
|
) : null;
|
|
289
298
|
};
|
|
@@ -531,7 +540,7 @@ const NiceCapacityPlanner = ({
|
|
|
531
540
|
unit
|
|
532
541
|
)) }) }),
|
|
533
542
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "nice-resource-allocation__toolbar-right", children: config.showConflicts && conflicts.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nice-resource-allocation__conflicts-badge", children: [
|
|
534
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "nice-resource-allocation__badge-icon", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
543
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "nice-resource-allocation__badge-icon", children: /* @__PURE__ */ jsxRuntime.jsx(ae, { name: "warning", size: 14 }) }),
|
|
535
544
|
(conflicts.length === 1 ? t("capacityPlanner.oneConflict", "1 Conflict") : t("capacityPlanner.conflicts", "{count} Conflicts")).replace("{count}", String(conflicts.length))
|
|
536
545
|
] }) })
|
|
537
546
|
] }),
|
|
@@ -554,13 +563,10 @@ const NiceCapacityPlanner = ({
|
|
|
554
563
|
style: { backgroundColor: "var(--nice-warning-tint-30, rgba(245, 158, 11, 0.3))" }
|
|
555
564
|
}
|
|
556
565
|
),
|
|
557
|
-
/* @__PURE__ */ jsxRuntime.
|
|
558
|
-
"
|
|
559
|
-
"
|
|
560
|
-
|
|
561
|
-
config.utilizationThreshold,
|
|
562
|
-
"%)"
|
|
563
|
-
] })
|
|
566
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: t(
|
|
567
|
+
"capacityPlanner.highUtilization",
|
|
568
|
+
"High Utilization (>={utilizationThreshold}%)"
|
|
569
|
+
).replace("{utilizationThreshold}", String(config.utilizationThreshold)) })
|
|
564
570
|
] }),
|
|
565
571
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nice-resource-allocation__legend-item", children: [
|
|
566
572
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -594,7 +600,7 @@ const NiceCapacityPlanner = ({
|
|
|
594
600
|
toggleResource(resource.id);
|
|
595
601
|
},
|
|
596
602
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
597
|
-
|
|
603
|
+
ae,
|
|
598
604
|
{
|
|
599
605
|
name: expandedResources.has(resource.id) ? "chevron-down" : "chevron-right",
|
|
600
606
|
size: 14
|
|
@@ -602,15 +608,15 @@ const NiceCapacityPlanner = ({
|
|
|
602
608
|
)
|
|
603
609
|
}
|
|
604
610
|
),
|
|
605
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "nice-resource-allocation__resource-icon", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
611
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "nice-resource-allocation__resource-icon", children: /* @__PURE__ */ jsxRuntime.jsx(ae, { name: getResourceTypeIcon(resource.type), size: 16 }) }),
|
|
606
612
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nice-resource-allocation__resource-info", children: [
|
|
607
613
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "nice-resource-allocation__resource-name", children: resource.name }),
|
|
608
614
|
resource.department && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nice-resource-allocation__resource-dept", children: resource.department })
|
|
609
615
|
] }),
|
|
610
|
-
/* @__PURE__ */ jsxRuntime.
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
616
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "nice-resource-allocation__resource-capacity", children: t("capacityPlanner.hDay", "{maxCapacity}h/day").replace(
|
|
617
|
+
"{maxCapacity}",
|
|
618
|
+
String(resource.maxCapacity)
|
|
619
|
+
) })
|
|
614
620
|
]
|
|
615
621
|
}
|
|
616
622
|
),
|
|
@@ -677,10 +683,10 @@ const NiceCapacityPlanner = ({
|
|
|
677
683
|
},
|
|
678
684
|
onClick: () => setSelectedAllocation(allocation.id),
|
|
679
685
|
children: [
|
|
680
|
-
/* @__PURE__ */ jsxRuntime.
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
686
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "nice-resource-allocation__allocation-label", children: t("capacityPlanner.hDay2", "{hoursPerDay}h/day").replace(
|
|
687
|
+
"{hoursPerDay}",
|
|
688
|
+
String(allocation.hoursPerDay)
|
|
689
|
+
) }),
|
|
684
690
|
!readOnly && /* @__PURE__ */ jsxRuntime.jsx(
|
|
685
691
|
"button",
|
|
686
692
|
{
|
|
@@ -690,7 +696,7 @@ const NiceCapacityPlanner = ({
|
|
|
690
696
|
e.stopPropagation();
|
|
691
697
|
onAllocationDelete == null ? void 0 : onAllocationDelete(allocation.id);
|
|
692
698
|
},
|
|
693
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
699
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(ae, { name: "close", size: 14 })
|
|
694
700
|
}
|
|
695
701
|
)
|
|
696
702
|
]
|
|
@@ -1023,7 +1029,7 @@ const NiceInventoryManager = ({
|
|
|
1023
1029
|
onChange: (e) => setFilters((prev) => ({ ...prev, searchQuery: e.target.value }))
|
|
1024
1030
|
}
|
|
1025
1031
|
),
|
|
1026
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "nice-inventory-manager__search-icon", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1032
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "nice-inventory-manager__search-icon", children: /* @__PURE__ */ jsxRuntime.jsx(ae, { name: "search", size: 14 }) })
|
|
1027
1033
|
] }),
|
|
1028
1034
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1029
1035
|
"select",
|
|
@@ -1058,7 +1064,7 @@ const NiceInventoryManager = ({
|
|
|
1058
1064
|
className: `nice-inventory-manager__view-button ${view === v2 ? "nice-inventory-manager__view-button--active" : ""}`,
|
|
1059
1065
|
onClick: () => setView(v2),
|
|
1060
1066
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1061
|
-
|
|
1067
|
+
ae,
|
|
1062
1068
|
{
|
|
1063
1069
|
name: v2 === "grid" ? "grid" : v2 === "list" ? "list" : "table",
|
|
1064
1070
|
size: 14
|
|
@@ -1083,34 +1089,32 @@ const NiceInventoryManager = ({
|
|
|
1083
1089
|
});
|
|
1084
1090
|
setShowItemModal(true);
|
|
1085
1091
|
},
|
|
1086
|
-
children: "+ Add Item"
|
|
1092
|
+
children: t("inventoryManager.addItem", "+ Add Item")
|
|
1087
1093
|
}
|
|
1088
1094
|
)
|
|
1089
1095
|
] })
|
|
1090
1096
|
] }),
|
|
1091
1097
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nice-inventory-manager__tabs", children: [
|
|
1092
|
-
/* @__PURE__ */ jsxRuntime.
|
|
1098
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1093
1099
|
"button",
|
|
1094
1100
|
{
|
|
1095
1101
|
className: `nice-inventory-manager__tab ${activeTab === "inventory" ? "nice-inventory-manager__tab--active" : ""}`,
|
|
1096
1102
|
onClick: () => setActiveTab("inventory"),
|
|
1097
|
-
children:
|
|
1098
|
-
"
|
|
1099
|
-
items.length
|
|
1100
|
-
|
|
1101
|
-
]
|
|
1103
|
+
children: t("inventoryManager.inventory", "Inventory ({items})").replace(
|
|
1104
|
+
"{items}",
|
|
1105
|
+
String(items.length)
|
|
1106
|
+
)
|
|
1102
1107
|
}
|
|
1103
1108
|
),
|
|
1104
|
-
/* @__PURE__ */ jsxRuntime.
|
|
1109
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1105
1110
|
"button",
|
|
1106
1111
|
{
|
|
1107
1112
|
className: `nice-inventory-manager__tab ${activeTab === "transactions" ? "nice-inventory-manager__tab--active" : ""}`,
|
|
1108
1113
|
onClick: () => setActiveTab("transactions"),
|
|
1109
|
-
children:
|
|
1110
|
-
"
|
|
1111
|
-
transactions.length
|
|
1112
|
-
|
|
1113
|
-
]
|
|
1114
|
+
children: t("inventoryManager.transactions", "Transactions ({transactions})").replace(
|
|
1115
|
+
"{transactions}",
|
|
1116
|
+
String(transactions.length)
|
|
1117
|
+
)
|
|
1114
1118
|
}
|
|
1115
1119
|
),
|
|
1116
1120
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -1145,7 +1149,7 @@ const NiceInventoryManager = ({
|
|
|
1145
1149
|
onClick: (e) => e.stopPropagation()
|
|
1146
1150
|
}
|
|
1147
1151
|
),
|
|
1148
|
-
config.showImages && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nice-inventory-manager__item-image", children: ((_a2 = item.images) == null ? void 0 : _a2[0]) ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: item.images[0], alt: item.name }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nice-inventory-manager__placeholder-image", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1152
|
+
config.showImages && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nice-inventory-manager__item-image", children: ((_a2 = item.images) == null ? void 0 : _a2[0]) ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: item.images[0], alt: item.name }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nice-inventory-manager__placeholder-image", children: /* @__PURE__ */ jsxRuntime.jsx(ae, { name: "box", size: 32 }) }) }),
|
|
1149
1153
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nice-inventory-manager__item-info", children: [
|
|
1150
1154
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "nice-inventory-manager__item-sku", children: item.sku }),
|
|
1151
1155
|
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "nice-inventory-manager__item-name", children: item.name }),
|
|
@@ -1166,7 +1170,7 @@ const NiceInventoryManager = ({
|
|
|
1166
1170
|
item.unit
|
|
1167
1171
|
] }),
|
|
1168
1172
|
item.quantity <= item.reorderLevel && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "nice-inventory-manager__reorder-alert", children: [
|
|
1169
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1173
|
+
/* @__PURE__ */ jsxRuntime.jsx(ae, { name: "warning", size: 12 }),
|
|
1170
1174
|
" ",
|
|
1171
1175
|
t("inventoryManager.lowStock", "Low Stock")
|
|
1172
1176
|
] })
|
|
@@ -1191,7 +1195,7 @@ const NiceInventoryManager = ({
|
|
|
1191
1195
|
t("inventoryManager.sku", "SKU"),
|
|
1192
1196
|
" ",
|
|
1193
1197
|
sortBy === "sku" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1194
|
-
|
|
1198
|
+
ae,
|
|
1195
1199
|
{
|
|
1196
1200
|
name: sortOrder === "asc" ? "arrow-up" : "arrow-down",
|
|
1197
1201
|
size: 12
|
|
@@ -1211,7 +1215,7 @@ const NiceInventoryManager = ({
|
|
|
1211
1215
|
t("inventoryManager.name", "Name"),
|
|
1212
1216
|
" ",
|
|
1213
1217
|
sortBy === "name" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1214
|
-
|
|
1218
|
+
ae,
|
|
1215
1219
|
{
|
|
1216
1220
|
name: sortOrder === "asc" ? "arrow-up" : "arrow-down",
|
|
1217
1221
|
size: 12
|
|
@@ -1232,7 +1236,7 @@ const NiceInventoryManager = ({
|
|
|
1232
1236
|
t("inventoryManager.qty", "Qty"),
|
|
1233
1237
|
" ",
|
|
1234
1238
|
sortBy === "quantity" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1235
|
-
|
|
1239
|
+
ae,
|
|
1236
1240
|
{
|
|
1237
1241
|
name: sortOrder === "asc" ? "arrow-up" : "arrow-down",
|
|
1238
1242
|
size: 12
|
|
@@ -1254,7 +1258,7 @@ const NiceInventoryManager = ({
|
|
|
1254
1258
|
t("inventoryManager.value", "Value"),
|
|
1255
1259
|
" ",
|
|
1256
1260
|
sortBy === "value" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1257
|
-
|
|
1261
|
+
ae,
|
|
1258
1262
|
{
|
|
1259
1263
|
name: sortOrder === "asc" ? "arrow-up" : "arrow-down",
|
|
1260
1264
|
size: 12
|
|
@@ -1317,7 +1321,7 @@ const NiceInventoryManager = ({
|
|
|
1317
1321
|
setEditingItem(item);
|
|
1318
1322
|
setShowItemModal(true);
|
|
1319
1323
|
},
|
|
1320
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1324
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(ae, { name: "edit", size: 14 })
|
|
1321
1325
|
}
|
|
1322
1326
|
),
|
|
1323
1327
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1329,7 +1333,7 @@ const NiceInventoryManager = ({
|
|
|
1329
1333
|
setNewTransaction({ itemId: item.id });
|
|
1330
1334
|
setShowTransactionModal(true);
|
|
1331
1335
|
},
|
|
1332
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1336
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(ae, { name: "clipboard", size: 14 })
|
|
1333
1337
|
}
|
|
1334
1338
|
),
|
|
1335
1339
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1340,7 +1344,7 @@ const NiceInventoryManager = ({
|
|
|
1340
1344
|
e.stopPropagation();
|
|
1341
1345
|
onItemDelete == null ? void 0 : onItemDelete(item.id);
|
|
1342
1346
|
},
|
|
1343
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1347
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(ae, { name: "trash", size: 14 })
|
|
1344
1348
|
}
|
|
1345
1349
|
)
|
|
1346
1350
|
] })
|
|
@@ -1398,13 +1402,13 @@ const NiceInventoryManager = ({
|
|
|
1398
1402
|
{
|
|
1399
1403
|
className: "nice-inventory-manager__add-transaction-button",
|
|
1400
1404
|
onClick: () => setShowTransactionModal(true),
|
|
1401
|
-
children: "+ New Transaction"
|
|
1405
|
+
children: t("inventoryManager.newTransaction", "+ New Transaction")
|
|
1402
1406
|
}
|
|
1403
1407
|
),
|
|
1404
1408
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "nice-inventory-manager__transactions-list", children: recentTransactions.map((tx) => {
|
|
1405
1409
|
const item = items.find((i2) => i2.id === tx.itemId);
|
|
1406
1410
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nice-inventory-manager__transaction-item", children: [
|
|
1407
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "nice-inventory-manager__tx-icon", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1411
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "nice-inventory-manager__tx-icon", children: /* @__PURE__ */ jsxRuntime.jsx(ae, { name: getTransactionIcon(tx.type), size: 16 }) }),
|
|
1408
1412
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nice-inventory-manager__tx-info", children: [
|
|
1409
1413
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "nice-inventory-manager__tx-type", children: tx.type }),
|
|
1410
1414
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "nice-inventory-manager__tx-item", children: (item == null ? void 0 : item.name) || tx.itemId })
|
|
@@ -1420,15 +1424,15 @@ const NiceInventoryManager = ({
|
|
|
1420
1424
|
}
|
|
1421
1425
|
),
|
|
1422
1426
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "nice-inventory-manager__tx-date", children: tx.date.toLocaleString() }),
|
|
1423
|
-
tx.reference && /* @__PURE__ */ jsxRuntime.
|
|
1424
|
-
"
|
|
1425
|
-
tx.reference
|
|
1426
|
-
|
|
1427
|
+
tx.reference && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nice-inventory-manager__tx-ref", children: t("inventoryManager.ref", "Ref: {reference}").replace(
|
|
1428
|
+
"{reference}",
|
|
1429
|
+
String(tx.reference)
|
|
1430
|
+
) })
|
|
1427
1431
|
] }, tx.id);
|
|
1428
1432
|
}) })
|
|
1429
1433
|
] }),
|
|
1430
1434
|
activeTab === "reorder" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nice-inventory-manager__reorder-tab", children: reorderItems.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nice-inventory-manager__empty-state", children: [
|
|
1431
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "nice-inventory-manager__empty-icon", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1435
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "nice-inventory-manager__empty-icon", children: /* @__PURE__ */ jsxRuntime.jsx(ae, { name: "success", size: 32 }) }),
|
|
1432
1436
|
/* @__PURE__ */ jsxRuntime.jsx("p", { children: t(
|
|
1433
1437
|
"inventoryManager.allItemsAreSufficientlyStocked",
|
|
1434
1438
|
"All items are sufficiently stocked"
|
|
@@ -1439,20 +1443,15 @@ const NiceInventoryManager = ({
|
|
|
1439
1443
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "nice-inventory-manager__reorder-name", children: item.name })
|
|
1440
1444
|
] }),
|
|
1441
1445
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nice-inventory-manager__reorder-stock", children: [
|
|
1442
|
-
/* @__PURE__ */ jsxRuntime.
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
] }),
|
|
1452
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "nice-inventory-manager__reorder-qty", children: [
|
|
1453
|
-
"Order qty: ",
|
|
1454
|
-
item.reorderQuantity
|
|
1455
|
-
] })
|
|
1446
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "nice-inventory-manager__current-qty", children: t("inventoryManager.current", "Current: {quantity} {unit}").replace("{quantity}", String(item.quantity)).replace("{unit}", String(item.unit)) }),
|
|
1447
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "nice-inventory-manager__reorder-level", children: t("inventoryManager.reorderAt", "Reorder at: {reorderLevel}").replace(
|
|
1448
|
+
"{reorderLevel}",
|
|
1449
|
+
String(item.reorderLevel)
|
|
1450
|
+
) }),
|
|
1451
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "nice-inventory-manager__reorder-qty", children: t("inventoryManager.orderQty", "Order qty: {reorderQuantity}").replace(
|
|
1452
|
+
"{reorderQuantity}",
|
|
1453
|
+
String(item.reorderQuantity)
|
|
1454
|
+
) })
|
|
1456
1455
|
] }),
|
|
1457
1456
|
item.supplier && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nice-inventory-manager__supplier-name", children: item.supplier.name }),
|
|
1458
1457
|
!readOnly && onCreatePurchaseOrder && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1472,7 +1471,7 @@ const NiceInventoryManager = ({
|
|
|
1472
1471
|
className: "nice-inventory-manager__modal-overlay",
|
|
1473
1472
|
onClick: () => setShowItemModal(false),
|
|
1474
1473
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nice-inventory-manager__item-modal", onClick: (e) => e.stopPropagation(), children: [
|
|
1475
|
-
/* @__PURE__ */ jsxRuntime.jsx("h3", { children: editingItem.id ? "Edit Item" : "Add New Item" }),
|
|
1474
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { children: editingItem.id ? t("inventoryManager.editItem", "Edit Item") : t("inventoryManager.addNewItem", "Add New Item") }),
|
|
1476
1475
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nice-inventory-manager__modal-form", children: [
|
|
1477
1476
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nice-inventory-manager__form-row", children: [
|
|
1478
1477
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { children: [
|
|
@@ -1603,7 +1602,7 @@ const NiceInventoryManager = ({
|
|
|
1603
1602
|
children: t("inventoryManager.cancel", "Cancel")
|
|
1604
1603
|
}
|
|
1605
1604
|
),
|
|
1606
|
-
/* @__PURE__ */ jsxRuntime.jsx("button", { className: "nice-inventory-manager__save-button", onClick: handleItemSubmit, children: editingItem.id ? "Save Changes" : "Create Item" })
|
|
1605
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { className: "nice-inventory-manager__save-button", onClick: handleItemSubmit, children: editingItem.id ? t("inventoryManager.saveChanges", "Save Changes") : t("inventoryManager.createItem", "Create Item") })
|
|
1607
1606
|
] })
|
|
1608
1607
|
] })
|
|
1609
1608
|
}
|
|
@@ -1772,7 +1771,7 @@ const NiceInvoiceView = /* @__PURE__ */ ve.forwardRef(
|
|
|
1772
1771
|
dueDate: "Due date",
|
|
1773
1772
|
seller: "Seller",
|
|
1774
1773
|
buyer: "Buyer",
|
|
1775
|
-
description: "Description",
|
|
1774
|
+
description: t("invoiceView.description", "Description"),
|
|
1776
1775
|
qty: "Qty",
|
|
1777
1776
|
unitPrice: "Unit price",
|
|
1778
1777
|
vat: "VAT",
|
|
@@ -1852,7 +1851,7 @@ const NiceInvoiceView = /* @__PURE__ */ ve.forwardRef(
|
|
|
1852
1851
|
onClick: () => onAction == null ? void 0 : onAction("download"),
|
|
1853
1852
|
"aria-label": t("invoiceView.download", "Download"),
|
|
1854
1853
|
title: t("invoiceView.download", "Download"),
|
|
1855
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1854
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(ae, { name: "arrow-down", size: 12 })
|
|
1856
1855
|
}
|
|
1857
1856
|
),
|
|
1858
1857
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1862,7 +1861,7 @@ const NiceInvoiceView = /* @__PURE__ */ ve.forwardRef(
|
|
|
1862
1861
|
onClick: () => onAction == null ? void 0 : onAction("print"),
|
|
1863
1862
|
"aria-label": t("invoiceView.print", "Print"),
|
|
1864
1863
|
title: t("invoiceView.print", "Print"),
|
|
1865
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1864
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(ae, { name: "printer", size: 14 })
|
|
1866
1865
|
}
|
|
1867
1866
|
),
|
|
1868
1867
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1872,7 +1871,7 @@ const NiceInvoiceView = /* @__PURE__ */ ve.forwardRef(
|
|
|
1872
1871
|
onClick: () => onAction == null ? void 0 : onAction("send"),
|
|
1873
1872
|
"aria-label": t("invoiceView.send", "Send"),
|
|
1874
1873
|
title: t("invoiceView.send", "Send"),
|
|
1875
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1874
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(ae, { name: "mail", size: 14 })
|
|
1876
1875
|
}
|
|
1877
1876
|
)
|
|
1878
1877
|
] })
|
|
@@ -2041,11 +2040,14 @@ const NiceWarehouseView = /* @__PURE__ */ ve.forwardRef(
|
|
|
2041
2040
|
"aria-label": t("warehouseView.occupancyLegend", "Occupancy legend"),
|
|
2042
2041
|
children: [
|
|
2043
2042
|
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { background: colors.low } }),
|
|
2044
|
-
"
|
|
2043
|
+
" ",
|
|
2044
|
+
t("warehouseView.low", "low"),
|
|
2045
2045
|
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { background: colors.mid } }),
|
|
2046
|
-
"
|
|
2046
|
+
" ",
|
|
2047
|
+
t("warehouseView.mid", "mid"),
|
|
2047
2048
|
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { background: colors.high } }),
|
|
2048
|
-
"
|
|
2049
|
+
" ",
|
|
2050
|
+
t("warehouseView.high", "high")
|
|
2049
2051
|
]
|
|
2050
2052
|
}
|
|
2051
2053
|
)
|
|
@@ -2066,7 +2068,7 @@ const NiceWarehouseView = /* @__PURE__ */ ve.forwardRef(
|
|
|
2066
2068
|
height: cellSize,
|
|
2067
2069
|
background: colorFor(c2.occupancy, colors)
|
|
2068
2070
|
},
|
|
2069
|
-
title:
|
|
2071
|
+
title: t("warehouseView.items", "{key} — {occupancy}% ({items} items)").replace("{key}", String(key)).replace("{occupancy}", String((c2.occupancy * 100).toFixed(0))).replace("{items}", String(c2.items.length)),
|
|
2070
2072
|
onClick: () => onCellClick == null ? void 0 : onCellClick(c2),
|
|
2071
2073
|
onMouseEnter: () => setHovered(c2),
|
|
2072
2074
|
onMouseLeave: () => setHovered(null),
|
|
@@ -2083,12 +2085,7 @@ const NiceWarehouseView = /* @__PURE__ */ ve.forwardRef(
|
|
|
2083
2085
|
"/",
|
|
2084
2086
|
hovered.location.bin
|
|
2085
2087
|
] }),
|
|
2086
|
-
/* @__PURE__ */ jsxRuntime.
|
|
2087
|
-
hovered.items.length,
|
|
2088
|
-
" items · ",
|
|
2089
|
-
(hovered.occupancy * 100).toFixed(0),
|
|
2090
|
-
"% full"
|
|
2091
|
-
] }),
|
|
2088
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { children: t("warehouseView.itemsFull", "{items} items · {occupancy}% full").replace("{items}", String(hovered.items.length)).replace("{occupancy}", String((hovered.occupancy * 100).toFixed(0))) }),
|
|
2092
2089
|
/* @__PURE__ */ jsxRuntime.jsxs("ul", { children: [
|
|
2093
2090
|
hovered.items.slice(0, 5).map((it) => /* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
|
|
2094
2091
|
it.sku,
|
|
@@ -2484,12 +2481,13 @@ const NiceVatTable = /* @__PURE__ */ ve.forwardRef(
|
|
|
2484
2481
|
style,
|
|
2485
2482
|
id
|
|
2486
2483
|
}, ref) {
|
|
2484
|
+
const { t } = v();
|
|
2487
2485
|
const [internal, setInternal] = ve.useState(rates ?? NICE_VAT_PRESETS[country]);
|
|
2488
2486
|
const L = {
|
|
2489
2487
|
code: "Code",
|
|
2490
2488
|
rate: "Rate",
|
|
2491
|
-
label: "Label",
|
|
2492
|
-
description: "Description",
|
|
2489
|
+
label: t("vatTable.label", "Label"),
|
|
2490
|
+
description: t("vatTable.description", "Description"),
|
|
2493
2491
|
add: "+ Add",
|
|
2494
2492
|
remove: "Remove",
|
|
2495
2493
|
...labels
|
|
@@ -2574,7 +2572,7 @@ const NiceVatTable = /* @__PURE__ */ ve.forwardRef(
|
|
|
2574
2572
|
onChange: (e) => onCellEdit(idx, "description", e.target.value)
|
|
2575
2573
|
}
|
|
2576
2574
|
) : r.description ?? "" }),
|
|
2577
|
-
editable && /* @__PURE__ */ jsxRuntime.jsx("td", { children: /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: () => removeRow(idx), "aria-label": L.remove, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2575
|
+
editable && /* @__PURE__ */ jsxRuntime.jsx("td", { children: /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: () => removeRow(idx), "aria-label": L.remove, children: /* @__PURE__ */ jsxRuntime.jsx(ae, { name: "close", size: 14 }) }) })
|
|
2578
2576
|
] }, r.code)) })
|
|
2579
2577
|
] }),
|
|
2580
2578
|
editable && /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "nice-vat-table__add", onClick: addRow, children: L.add })
|
|
@@ -2650,6 +2648,7 @@ const NiceJpkExporter = /* @__PURE__ */ ve.forwardRef(
|
|
|
2650
2648
|
style,
|
|
2651
2649
|
id
|
|
2652
2650
|
}, ref) {
|
|
2651
|
+
const { t } = v();
|
|
2653
2652
|
const today = /* @__PURE__ */ new Date();
|
|
2654
2653
|
const [format, setFormat] = ve.useState(defaultFormat);
|
|
2655
2654
|
const [from, setFrom] = ve.useState(
|
|
@@ -2712,10 +2711,10 @@ const NiceJpkExporter = /* @__PURE__ */ ve.forwardRef(
|
|
|
2712
2711
|
/* @__PURE__ */ jsxRuntime.jsx("input", { type: "date", value: to, onChange: (e) => setTo(e.target.value) })
|
|
2713
2712
|
] }),
|
|
2714
2713
|
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: exportNow, children: L.export }),
|
|
2715
|
-
/* @__PURE__ */ jsxRuntime.
|
|
2716
|
-
invoices
|
|
2717
|
-
|
|
2718
|
-
|
|
2714
|
+
/* @__PURE__ */ jsxRuntime.jsx("small", { children: t("jpkExporter.invoicesReady", "{invoices} invoices ready").replace(
|
|
2715
|
+
"{invoices}",
|
|
2716
|
+
String(invoices.length)
|
|
2717
|
+
) })
|
|
2719
2718
|
] });
|
|
2720
2719
|
}
|
|
2721
2720
|
);
|
package/dist/index.mjs
CHANGED
|
@@ -214,7 +214,16 @@ const tr = {
|
|
|
214
214
|
"zoom-out": "M11 4a7 7 0 100 14 7 7 0 000-14z M21 21l-4.35-4.35 M8 11h6",
|
|
215
215
|
navigation: "M12 2l7 19-7-4-7 4z",
|
|
216
216
|
"refresh-ccw": "M1 4v6h6 M23 20v-6h-6 M20.49 9A9 9 0 005.64 5.64L1 10 M3.51 15a9 9 0 0014.85 3.36L23 14",
|
|
217
|
-
minimize: "M4 14h6v6 M20 10h-6V4 M14 10l7-7 M3 21l7-7"
|
|
217
|
+
minimize: "M4 14h6v6 M20 10h-6V4 M14 10l7-7 M3 21l7-7",
|
|
218
|
+
// 1.2.2: geometry tools and object grouping, drawn as glyphs before (Ntd* of the same names in icons)
|
|
219
|
+
point: "M12 8a4 4 0 1 0 0 8a4 4 0 1 0 0-8z M12 12h.01",
|
|
220
|
+
segment: "M6.5 17.5L17.5 6.5 M3 19a2 2 0 1 0 4 0a2 2 0 1 0-4 0 M17 5a2 2 0 1 0 4 0a2 2 0 1 0-4 0",
|
|
221
|
+
perpendicular: "M3 20h18 M12 20V4 M12 15h5v5",
|
|
222
|
+
parallel: "M4 16L14 6 M10 20L20 10",
|
|
223
|
+
midpoint: "M3 12h6 M15 12h6 M3 9v6 M21 9v6 M12 9a3 3 0 1 0 0 6a3 3 0 1 0 0-6z",
|
|
224
|
+
"angle-bisector": "M4 20h17 M4 20L16 5 M4 20l14.4-6.9 M10 20a6 6 0 0 0-2.25-4.68",
|
|
225
|
+
group: "M3 7V3h4 M17 3h4v4 M21 17v4h-4 M7 21H3v-4 M7 7h5v5H7z M12 12h5v5h-5z",
|
|
226
|
+
ungroup: "M3 3h8v8H3z M13 13h8v8h-8z"
|
|
218
227
|
}, la = {
|
|
219
228
|
xs: 12,
|
|
220
229
|
sm: 16,
|
|
@@ -229,7 +238,7 @@ function da({
|
|
|
229
238
|
style: a2,
|
|
230
239
|
color: n,
|
|
231
240
|
title: o,
|
|
232
|
-
onClick:
|
|
241
|
+
onClick: i2
|
|
233
242
|
}) {
|
|
234
243
|
return /* @__PURE__ */ jsxs(
|
|
235
244
|
"svg",
|
|
@@ -248,7 +257,7 @@ function da({
|
|
|
248
257
|
role: o ? "img" : "presentation",
|
|
249
258
|
"aria-label": o,
|
|
250
259
|
"aria-hidden": !o,
|
|
251
|
-
onClick:
|
|
260
|
+
onClick: i2,
|
|
252
261
|
children: [
|
|
253
262
|
o && /* @__PURE__ */ jsx("title", { children: o }),
|
|
254
263
|
/* @__PURE__ */ jsx("path", { d: e })
|
|
@@ -256,20 +265,20 @@ function da({
|
|
|
256
265
|
}
|
|
257
266
|
);
|
|
258
267
|
}
|
|
259
|
-
const
|
|
268
|
+
const ae = ({
|
|
260
269
|
name: e,
|
|
261
270
|
size: t = "md",
|
|
262
271
|
className: r,
|
|
263
272
|
style: a2,
|
|
264
273
|
color: n,
|
|
265
274
|
title: o,
|
|
266
|
-
onClick:
|
|
275
|
+
onClick: i2
|
|
267
276
|
}) => {
|
|
268
|
-
const { resolver:
|
|
269
|
-
if (
|
|
270
|
-
const d =
|
|
277
|
+
const { resolver: s } = useContext(gt), c2 = typeof t == "number" ? t : la[t];
|
|
278
|
+
if (s) {
|
|
279
|
+
const d = s(e, c2);
|
|
271
280
|
if (d)
|
|
272
|
-
return /* @__PURE__ */ jsx("span", { className: `nice-icon-wrap ${r || ""}`, style: a2, onClick:
|
|
281
|
+
return /* @__PURE__ */ jsx("span", { className: `nice-icon-wrap ${r || ""}`, style: a2, onClick: i2, children: d });
|
|
273
282
|
}
|
|
274
283
|
const l = tr[e];
|
|
275
284
|
return l ? /* @__PURE__ */ jsx(
|
|
@@ -281,7 +290,7 @@ const re = ({
|
|
|
281
290
|
style: a2,
|
|
282
291
|
color: n,
|
|
283
292
|
title: o,
|
|
284
|
-
onClick:
|
|
293
|
+
onClick: i2
|
|
285
294
|
}
|
|
286
295
|
) : null;
|
|
287
296
|
};
|
|
@@ -529,7 +538,7 @@ const NiceCapacityPlanner = ({
|
|
|
529
538
|
unit
|
|
530
539
|
)) }) }),
|
|
531
540
|
/* @__PURE__ */ jsx("div", { className: "nice-resource-allocation__toolbar-right", children: config.showConflicts && conflicts.length > 0 && /* @__PURE__ */ jsxs("div", { className: "nice-resource-allocation__conflicts-badge", children: [
|
|
532
|
-
/* @__PURE__ */ jsx("span", { className: "nice-resource-allocation__badge-icon", children: /* @__PURE__ */ jsx(
|
|
541
|
+
/* @__PURE__ */ jsx("span", { className: "nice-resource-allocation__badge-icon", children: /* @__PURE__ */ jsx(ae, { name: "warning", size: 14 }) }),
|
|
533
542
|
(conflicts.length === 1 ? t("capacityPlanner.oneConflict", "1 Conflict") : t("capacityPlanner.conflicts", "{count} Conflicts")).replace("{count}", String(conflicts.length))
|
|
534
543
|
] }) })
|
|
535
544
|
] }),
|
|
@@ -552,13 +561,10 @@ const NiceCapacityPlanner = ({
|
|
|
552
561
|
style: { backgroundColor: "var(--nice-warning-tint-30, rgba(245, 158, 11, 0.3))" }
|
|
553
562
|
}
|
|
554
563
|
),
|
|
555
|
-
/* @__PURE__ */
|
|
556
|
-
"
|
|
557
|
-
"
|
|
558
|
-
|
|
559
|
-
config.utilizationThreshold,
|
|
560
|
-
"%)"
|
|
561
|
-
] })
|
|
564
|
+
/* @__PURE__ */ jsx("span", { children: t(
|
|
565
|
+
"capacityPlanner.highUtilization",
|
|
566
|
+
"High Utilization (>={utilizationThreshold}%)"
|
|
567
|
+
).replace("{utilizationThreshold}", String(config.utilizationThreshold)) })
|
|
562
568
|
] }),
|
|
563
569
|
/* @__PURE__ */ jsxs("div", { className: "nice-resource-allocation__legend-item", children: [
|
|
564
570
|
/* @__PURE__ */ jsx(
|
|
@@ -592,7 +598,7 @@ const NiceCapacityPlanner = ({
|
|
|
592
598
|
toggleResource(resource.id);
|
|
593
599
|
},
|
|
594
600
|
children: /* @__PURE__ */ jsx(
|
|
595
|
-
|
|
601
|
+
ae,
|
|
596
602
|
{
|
|
597
603
|
name: expandedResources.has(resource.id) ? "chevron-down" : "chevron-right",
|
|
598
604
|
size: 14
|
|
@@ -600,15 +606,15 @@ const NiceCapacityPlanner = ({
|
|
|
600
606
|
)
|
|
601
607
|
}
|
|
602
608
|
),
|
|
603
|
-
/* @__PURE__ */ jsx("span", { className: "nice-resource-allocation__resource-icon", children: /* @__PURE__ */ jsx(
|
|
609
|
+
/* @__PURE__ */ jsx("span", { className: "nice-resource-allocation__resource-icon", children: /* @__PURE__ */ jsx(ae, { name: getResourceTypeIcon(resource.type), size: 16 }) }),
|
|
604
610
|
/* @__PURE__ */ jsxs("div", { className: "nice-resource-allocation__resource-info", children: [
|
|
605
611
|
/* @__PURE__ */ jsx("span", { className: "nice-resource-allocation__resource-name", children: resource.name }),
|
|
606
612
|
resource.department && /* @__PURE__ */ jsx("span", { className: "nice-resource-allocation__resource-dept", children: resource.department })
|
|
607
613
|
] }),
|
|
608
|
-
/* @__PURE__ */
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
614
|
+
/* @__PURE__ */ jsx("span", { className: "nice-resource-allocation__resource-capacity", children: t("capacityPlanner.hDay", "{maxCapacity}h/day").replace(
|
|
615
|
+
"{maxCapacity}",
|
|
616
|
+
String(resource.maxCapacity)
|
|
617
|
+
) })
|
|
612
618
|
]
|
|
613
619
|
}
|
|
614
620
|
),
|
|
@@ -675,10 +681,10 @@ const NiceCapacityPlanner = ({
|
|
|
675
681
|
},
|
|
676
682
|
onClick: () => setSelectedAllocation(allocation.id),
|
|
677
683
|
children: [
|
|
678
|
-
/* @__PURE__ */
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
684
|
+
/* @__PURE__ */ jsx("span", { className: "nice-resource-allocation__allocation-label", children: t("capacityPlanner.hDay2", "{hoursPerDay}h/day").replace(
|
|
685
|
+
"{hoursPerDay}",
|
|
686
|
+
String(allocation.hoursPerDay)
|
|
687
|
+
) }),
|
|
682
688
|
!readOnly && /* @__PURE__ */ jsx(
|
|
683
689
|
"button",
|
|
684
690
|
{
|
|
@@ -688,7 +694,7 @@ const NiceCapacityPlanner = ({
|
|
|
688
694
|
e.stopPropagation();
|
|
689
695
|
onAllocationDelete == null ? void 0 : onAllocationDelete(allocation.id);
|
|
690
696
|
},
|
|
691
|
-
children: /* @__PURE__ */ jsx(
|
|
697
|
+
children: /* @__PURE__ */ jsx(ae, { name: "close", size: 14 })
|
|
692
698
|
}
|
|
693
699
|
)
|
|
694
700
|
]
|
|
@@ -1021,7 +1027,7 @@ const NiceInventoryManager = ({
|
|
|
1021
1027
|
onChange: (e) => setFilters((prev) => ({ ...prev, searchQuery: e.target.value }))
|
|
1022
1028
|
}
|
|
1023
1029
|
),
|
|
1024
|
-
/* @__PURE__ */ jsx("span", { className: "nice-inventory-manager__search-icon", children: /* @__PURE__ */ jsx(
|
|
1030
|
+
/* @__PURE__ */ jsx("span", { className: "nice-inventory-manager__search-icon", children: /* @__PURE__ */ jsx(ae, { name: "search", size: 14 }) })
|
|
1025
1031
|
] }),
|
|
1026
1032
|
/* @__PURE__ */ jsxs(
|
|
1027
1033
|
"select",
|
|
@@ -1056,7 +1062,7 @@ const NiceInventoryManager = ({
|
|
|
1056
1062
|
className: `nice-inventory-manager__view-button ${view === v2 ? "nice-inventory-manager__view-button--active" : ""}`,
|
|
1057
1063
|
onClick: () => setView(v2),
|
|
1058
1064
|
children: /* @__PURE__ */ jsx(
|
|
1059
|
-
|
|
1065
|
+
ae,
|
|
1060
1066
|
{
|
|
1061
1067
|
name: v2 === "grid" ? "grid" : v2 === "list" ? "list" : "table",
|
|
1062
1068
|
size: 14
|
|
@@ -1081,34 +1087,32 @@ const NiceInventoryManager = ({
|
|
|
1081
1087
|
});
|
|
1082
1088
|
setShowItemModal(true);
|
|
1083
1089
|
},
|
|
1084
|
-
children: "+ Add Item"
|
|
1090
|
+
children: t("inventoryManager.addItem", "+ Add Item")
|
|
1085
1091
|
}
|
|
1086
1092
|
)
|
|
1087
1093
|
] })
|
|
1088
1094
|
] }),
|
|
1089
1095
|
/* @__PURE__ */ jsxs("div", { className: "nice-inventory-manager__tabs", children: [
|
|
1090
|
-
/* @__PURE__ */
|
|
1096
|
+
/* @__PURE__ */ jsx(
|
|
1091
1097
|
"button",
|
|
1092
1098
|
{
|
|
1093
1099
|
className: `nice-inventory-manager__tab ${activeTab === "inventory" ? "nice-inventory-manager__tab--active" : ""}`,
|
|
1094
1100
|
onClick: () => setActiveTab("inventory"),
|
|
1095
|
-
children:
|
|
1096
|
-
"
|
|
1097
|
-
items.length
|
|
1098
|
-
|
|
1099
|
-
]
|
|
1101
|
+
children: t("inventoryManager.inventory", "Inventory ({items})").replace(
|
|
1102
|
+
"{items}",
|
|
1103
|
+
String(items.length)
|
|
1104
|
+
)
|
|
1100
1105
|
}
|
|
1101
1106
|
),
|
|
1102
|
-
/* @__PURE__ */
|
|
1107
|
+
/* @__PURE__ */ jsx(
|
|
1103
1108
|
"button",
|
|
1104
1109
|
{
|
|
1105
1110
|
className: `nice-inventory-manager__tab ${activeTab === "transactions" ? "nice-inventory-manager__tab--active" : ""}`,
|
|
1106
1111
|
onClick: () => setActiveTab("transactions"),
|
|
1107
|
-
children:
|
|
1108
|
-
"
|
|
1109
|
-
transactions.length
|
|
1110
|
-
|
|
1111
|
-
]
|
|
1112
|
+
children: t("inventoryManager.transactions", "Transactions ({transactions})").replace(
|
|
1113
|
+
"{transactions}",
|
|
1114
|
+
String(transactions.length)
|
|
1115
|
+
)
|
|
1112
1116
|
}
|
|
1113
1117
|
),
|
|
1114
1118
|
/* @__PURE__ */ jsxs(
|
|
@@ -1143,7 +1147,7 @@ const NiceInventoryManager = ({
|
|
|
1143
1147
|
onClick: (e) => e.stopPropagation()
|
|
1144
1148
|
}
|
|
1145
1149
|
),
|
|
1146
|
-
config.showImages && /* @__PURE__ */ jsx("div", { className: "nice-inventory-manager__item-image", children: ((_a2 = item.images) == null ? void 0 : _a2[0]) ? /* @__PURE__ */ jsx("img", { src: item.images[0], alt: item.name }) : /* @__PURE__ */ jsx("span", { className: "nice-inventory-manager__placeholder-image", children: /* @__PURE__ */ jsx(
|
|
1150
|
+
config.showImages && /* @__PURE__ */ jsx("div", { className: "nice-inventory-manager__item-image", children: ((_a2 = item.images) == null ? void 0 : _a2[0]) ? /* @__PURE__ */ jsx("img", { src: item.images[0], alt: item.name }) : /* @__PURE__ */ jsx("span", { className: "nice-inventory-manager__placeholder-image", children: /* @__PURE__ */ jsx(ae, { name: "box", size: 32 }) }) }),
|
|
1147
1151
|
/* @__PURE__ */ jsxs("div", { className: "nice-inventory-manager__item-info", children: [
|
|
1148
1152
|
/* @__PURE__ */ jsx("span", { className: "nice-inventory-manager__item-sku", children: item.sku }),
|
|
1149
1153
|
/* @__PURE__ */ jsx("h4", { className: "nice-inventory-manager__item-name", children: item.name }),
|
|
@@ -1164,7 +1168,7 @@ const NiceInventoryManager = ({
|
|
|
1164
1168
|
item.unit
|
|
1165
1169
|
] }),
|
|
1166
1170
|
item.quantity <= item.reorderLevel && /* @__PURE__ */ jsxs("span", { className: "nice-inventory-manager__reorder-alert", children: [
|
|
1167
|
-
/* @__PURE__ */ jsx(
|
|
1171
|
+
/* @__PURE__ */ jsx(ae, { name: "warning", size: 12 }),
|
|
1168
1172
|
" ",
|
|
1169
1173
|
t("inventoryManager.lowStock", "Low Stock")
|
|
1170
1174
|
] })
|
|
@@ -1189,7 +1193,7 @@ const NiceInventoryManager = ({
|
|
|
1189
1193
|
t("inventoryManager.sku", "SKU"),
|
|
1190
1194
|
" ",
|
|
1191
1195
|
sortBy === "sku" && /* @__PURE__ */ jsx(
|
|
1192
|
-
|
|
1196
|
+
ae,
|
|
1193
1197
|
{
|
|
1194
1198
|
name: sortOrder === "asc" ? "arrow-up" : "arrow-down",
|
|
1195
1199
|
size: 12
|
|
@@ -1209,7 +1213,7 @@ const NiceInventoryManager = ({
|
|
|
1209
1213
|
t("inventoryManager.name", "Name"),
|
|
1210
1214
|
" ",
|
|
1211
1215
|
sortBy === "name" && /* @__PURE__ */ jsx(
|
|
1212
|
-
|
|
1216
|
+
ae,
|
|
1213
1217
|
{
|
|
1214
1218
|
name: sortOrder === "asc" ? "arrow-up" : "arrow-down",
|
|
1215
1219
|
size: 12
|
|
@@ -1230,7 +1234,7 @@ const NiceInventoryManager = ({
|
|
|
1230
1234
|
t("inventoryManager.qty", "Qty"),
|
|
1231
1235
|
" ",
|
|
1232
1236
|
sortBy === "quantity" && /* @__PURE__ */ jsx(
|
|
1233
|
-
|
|
1237
|
+
ae,
|
|
1234
1238
|
{
|
|
1235
1239
|
name: sortOrder === "asc" ? "arrow-up" : "arrow-down",
|
|
1236
1240
|
size: 12
|
|
@@ -1252,7 +1256,7 @@ const NiceInventoryManager = ({
|
|
|
1252
1256
|
t("inventoryManager.value", "Value"),
|
|
1253
1257
|
" ",
|
|
1254
1258
|
sortBy === "value" && /* @__PURE__ */ jsx(
|
|
1255
|
-
|
|
1259
|
+
ae,
|
|
1256
1260
|
{
|
|
1257
1261
|
name: sortOrder === "asc" ? "arrow-up" : "arrow-down",
|
|
1258
1262
|
size: 12
|
|
@@ -1315,7 +1319,7 @@ const NiceInventoryManager = ({
|
|
|
1315
1319
|
setEditingItem(item);
|
|
1316
1320
|
setShowItemModal(true);
|
|
1317
1321
|
},
|
|
1318
|
-
children: /* @__PURE__ */ jsx(
|
|
1322
|
+
children: /* @__PURE__ */ jsx(ae, { name: "edit", size: 14 })
|
|
1319
1323
|
}
|
|
1320
1324
|
),
|
|
1321
1325
|
/* @__PURE__ */ jsx(
|
|
@@ -1327,7 +1331,7 @@ const NiceInventoryManager = ({
|
|
|
1327
1331
|
setNewTransaction({ itemId: item.id });
|
|
1328
1332
|
setShowTransactionModal(true);
|
|
1329
1333
|
},
|
|
1330
|
-
children: /* @__PURE__ */ jsx(
|
|
1334
|
+
children: /* @__PURE__ */ jsx(ae, { name: "clipboard", size: 14 })
|
|
1331
1335
|
}
|
|
1332
1336
|
),
|
|
1333
1337
|
/* @__PURE__ */ jsx(
|
|
@@ -1338,7 +1342,7 @@ const NiceInventoryManager = ({
|
|
|
1338
1342
|
e.stopPropagation();
|
|
1339
1343
|
onItemDelete == null ? void 0 : onItemDelete(item.id);
|
|
1340
1344
|
},
|
|
1341
|
-
children: /* @__PURE__ */ jsx(
|
|
1345
|
+
children: /* @__PURE__ */ jsx(ae, { name: "trash", size: 14 })
|
|
1342
1346
|
}
|
|
1343
1347
|
)
|
|
1344
1348
|
] })
|
|
@@ -1396,13 +1400,13 @@ const NiceInventoryManager = ({
|
|
|
1396
1400
|
{
|
|
1397
1401
|
className: "nice-inventory-manager__add-transaction-button",
|
|
1398
1402
|
onClick: () => setShowTransactionModal(true),
|
|
1399
|
-
children: "+ New Transaction"
|
|
1403
|
+
children: t("inventoryManager.newTransaction", "+ New Transaction")
|
|
1400
1404
|
}
|
|
1401
1405
|
),
|
|
1402
1406
|
/* @__PURE__ */ jsx("div", { className: "nice-inventory-manager__transactions-list", children: recentTransactions.map((tx) => {
|
|
1403
1407
|
const item = items.find((i2) => i2.id === tx.itemId);
|
|
1404
1408
|
return /* @__PURE__ */ jsxs("div", { className: "nice-inventory-manager__transaction-item", children: [
|
|
1405
|
-
/* @__PURE__ */ jsx("span", { className: "nice-inventory-manager__tx-icon", children: /* @__PURE__ */ jsx(
|
|
1409
|
+
/* @__PURE__ */ jsx("span", { className: "nice-inventory-manager__tx-icon", children: /* @__PURE__ */ jsx(ae, { name: getTransactionIcon(tx.type), size: 16 }) }),
|
|
1406
1410
|
/* @__PURE__ */ jsxs("div", { className: "nice-inventory-manager__tx-info", children: [
|
|
1407
1411
|
/* @__PURE__ */ jsx("span", { className: "nice-inventory-manager__tx-type", children: tx.type }),
|
|
1408
1412
|
/* @__PURE__ */ jsx("span", { className: "nice-inventory-manager__tx-item", children: (item == null ? void 0 : item.name) || tx.itemId })
|
|
@@ -1418,15 +1422,15 @@ const NiceInventoryManager = ({
|
|
|
1418
1422
|
}
|
|
1419
1423
|
),
|
|
1420
1424
|
/* @__PURE__ */ jsx("span", { className: "nice-inventory-manager__tx-date", children: tx.date.toLocaleString() }),
|
|
1421
|
-
tx.reference && /* @__PURE__ */
|
|
1422
|
-
"
|
|
1423
|
-
tx.reference
|
|
1424
|
-
|
|
1425
|
+
tx.reference && /* @__PURE__ */ jsx("span", { className: "nice-inventory-manager__tx-ref", children: t("inventoryManager.ref", "Ref: {reference}").replace(
|
|
1426
|
+
"{reference}",
|
|
1427
|
+
String(tx.reference)
|
|
1428
|
+
) })
|
|
1425
1429
|
] }, tx.id);
|
|
1426
1430
|
}) })
|
|
1427
1431
|
] }),
|
|
1428
1432
|
activeTab === "reorder" && /* @__PURE__ */ jsx("div", { className: "nice-inventory-manager__reorder-tab", children: reorderItems.length === 0 ? /* @__PURE__ */ jsxs("div", { className: "nice-inventory-manager__empty-state", children: [
|
|
1429
|
-
/* @__PURE__ */ jsx("span", { className: "nice-inventory-manager__empty-icon", children: /* @__PURE__ */ jsx(
|
|
1433
|
+
/* @__PURE__ */ jsx("span", { className: "nice-inventory-manager__empty-icon", children: /* @__PURE__ */ jsx(ae, { name: "success", size: 32 }) }),
|
|
1430
1434
|
/* @__PURE__ */ jsx("p", { children: t(
|
|
1431
1435
|
"inventoryManager.allItemsAreSufficientlyStocked",
|
|
1432
1436
|
"All items are sufficiently stocked"
|
|
@@ -1437,20 +1441,15 @@ const NiceInventoryManager = ({
|
|
|
1437
1441
|
/* @__PURE__ */ jsx("span", { className: "nice-inventory-manager__reorder-name", children: item.name })
|
|
1438
1442
|
] }),
|
|
1439
1443
|
/* @__PURE__ */ jsxs("div", { className: "nice-inventory-manager__reorder-stock", children: [
|
|
1440
|
-
/* @__PURE__ */
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
] }),
|
|
1450
|
-
/* @__PURE__ */ jsxs("span", { className: "nice-inventory-manager__reorder-qty", children: [
|
|
1451
|
-
"Order qty: ",
|
|
1452
|
-
item.reorderQuantity
|
|
1453
|
-
] })
|
|
1444
|
+
/* @__PURE__ */ jsx("span", { className: "nice-inventory-manager__current-qty", children: t("inventoryManager.current", "Current: {quantity} {unit}").replace("{quantity}", String(item.quantity)).replace("{unit}", String(item.unit)) }),
|
|
1445
|
+
/* @__PURE__ */ jsx("span", { className: "nice-inventory-manager__reorder-level", children: t("inventoryManager.reorderAt", "Reorder at: {reorderLevel}").replace(
|
|
1446
|
+
"{reorderLevel}",
|
|
1447
|
+
String(item.reorderLevel)
|
|
1448
|
+
) }),
|
|
1449
|
+
/* @__PURE__ */ jsx("span", { className: "nice-inventory-manager__reorder-qty", children: t("inventoryManager.orderQty", "Order qty: {reorderQuantity}").replace(
|
|
1450
|
+
"{reorderQuantity}",
|
|
1451
|
+
String(item.reorderQuantity)
|
|
1452
|
+
) })
|
|
1454
1453
|
] }),
|
|
1455
1454
|
item.supplier && /* @__PURE__ */ jsx("span", { className: "nice-inventory-manager__supplier-name", children: item.supplier.name }),
|
|
1456
1455
|
!readOnly && onCreatePurchaseOrder && /* @__PURE__ */ jsx(
|
|
@@ -1470,7 +1469,7 @@ const NiceInventoryManager = ({
|
|
|
1470
1469
|
className: "nice-inventory-manager__modal-overlay",
|
|
1471
1470
|
onClick: () => setShowItemModal(false),
|
|
1472
1471
|
children: /* @__PURE__ */ jsxs("div", { className: "nice-inventory-manager__item-modal", onClick: (e) => e.stopPropagation(), children: [
|
|
1473
|
-
/* @__PURE__ */ jsx("h3", { children: editingItem.id ? "Edit Item" : "Add New Item" }),
|
|
1472
|
+
/* @__PURE__ */ jsx("h3", { children: editingItem.id ? t("inventoryManager.editItem", "Edit Item") : t("inventoryManager.addNewItem", "Add New Item") }),
|
|
1474
1473
|
/* @__PURE__ */ jsxs("div", { className: "nice-inventory-manager__modal-form", children: [
|
|
1475
1474
|
/* @__PURE__ */ jsxs("div", { className: "nice-inventory-manager__form-row", children: [
|
|
1476
1475
|
/* @__PURE__ */ jsxs("label", { children: [
|
|
@@ -1601,7 +1600,7 @@ const NiceInventoryManager = ({
|
|
|
1601
1600
|
children: t("inventoryManager.cancel", "Cancel")
|
|
1602
1601
|
}
|
|
1603
1602
|
),
|
|
1604
|
-
/* @__PURE__ */ jsx("button", { className: "nice-inventory-manager__save-button", onClick: handleItemSubmit, children: editingItem.id ? "Save Changes" : "Create Item" })
|
|
1603
|
+
/* @__PURE__ */ jsx("button", { className: "nice-inventory-manager__save-button", onClick: handleItemSubmit, children: editingItem.id ? t("inventoryManager.saveChanges", "Save Changes") : t("inventoryManager.createItem", "Create Item") })
|
|
1605
1604
|
] })
|
|
1606
1605
|
] })
|
|
1607
1606
|
}
|
|
@@ -1770,7 +1769,7 @@ const NiceInvoiceView = /* @__PURE__ */ forwardRef(
|
|
|
1770
1769
|
dueDate: "Due date",
|
|
1771
1770
|
seller: "Seller",
|
|
1772
1771
|
buyer: "Buyer",
|
|
1773
|
-
description: "Description",
|
|
1772
|
+
description: t("invoiceView.description", "Description"),
|
|
1774
1773
|
qty: "Qty",
|
|
1775
1774
|
unitPrice: "Unit price",
|
|
1776
1775
|
vat: "VAT",
|
|
@@ -1850,7 +1849,7 @@ const NiceInvoiceView = /* @__PURE__ */ forwardRef(
|
|
|
1850
1849
|
onClick: () => onAction == null ? void 0 : onAction("download"),
|
|
1851
1850
|
"aria-label": t("invoiceView.download", "Download"),
|
|
1852
1851
|
title: t("invoiceView.download", "Download"),
|
|
1853
|
-
children: /* @__PURE__ */ jsx(
|
|
1852
|
+
children: /* @__PURE__ */ jsx(ae, { name: "arrow-down", size: 12 })
|
|
1854
1853
|
}
|
|
1855
1854
|
),
|
|
1856
1855
|
/* @__PURE__ */ jsx(
|
|
@@ -1860,7 +1859,7 @@ const NiceInvoiceView = /* @__PURE__ */ forwardRef(
|
|
|
1860
1859
|
onClick: () => onAction == null ? void 0 : onAction("print"),
|
|
1861
1860
|
"aria-label": t("invoiceView.print", "Print"),
|
|
1862
1861
|
title: t("invoiceView.print", "Print"),
|
|
1863
|
-
children: /* @__PURE__ */ jsx(
|
|
1862
|
+
children: /* @__PURE__ */ jsx(ae, { name: "printer", size: 14 })
|
|
1864
1863
|
}
|
|
1865
1864
|
),
|
|
1866
1865
|
/* @__PURE__ */ jsx(
|
|
@@ -1870,7 +1869,7 @@ const NiceInvoiceView = /* @__PURE__ */ forwardRef(
|
|
|
1870
1869
|
onClick: () => onAction == null ? void 0 : onAction("send"),
|
|
1871
1870
|
"aria-label": t("invoiceView.send", "Send"),
|
|
1872
1871
|
title: t("invoiceView.send", "Send"),
|
|
1873
|
-
children: /* @__PURE__ */ jsx(
|
|
1872
|
+
children: /* @__PURE__ */ jsx(ae, { name: "mail", size: 14 })
|
|
1874
1873
|
}
|
|
1875
1874
|
)
|
|
1876
1875
|
] })
|
|
@@ -2039,11 +2038,14 @@ const NiceWarehouseView = /* @__PURE__ */ forwardRef(
|
|
|
2039
2038
|
"aria-label": t("warehouseView.occupancyLegend", "Occupancy legend"),
|
|
2040
2039
|
children: [
|
|
2041
2040
|
/* @__PURE__ */ jsx("span", { style: { background: colors.low } }),
|
|
2042
|
-
"
|
|
2041
|
+
" ",
|
|
2042
|
+
t("warehouseView.low", "low"),
|
|
2043
2043
|
/* @__PURE__ */ jsx("span", { style: { background: colors.mid } }),
|
|
2044
|
-
"
|
|
2044
|
+
" ",
|
|
2045
|
+
t("warehouseView.mid", "mid"),
|
|
2045
2046
|
/* @__PURE__ */ jsx("span", { style: { background: colors.high } }),
|
|
2046
|
-
"
|
|
2047
|
+
" ",
|
|
2048
|
+
t("warehouseView.high", "high")
|
|
2047
2049
|
]
|
|
2048
2050
|
}
|
|
2049
2051
|
)
|
|
@@ -2064,7 +2066,7 @@ const NiceWarehouseView = /* @__PURE__ */ forwardRef(
|
|
|
2064
2066
|
height: cellSize,
|
|
2065
2067
|
background: colorFor(c2.occupancy, colors)
|
|
2066
2068
|
},
|
|
2067
|
-
title:
|
|
2069
|
+
title: t("warehouseView.items", "{key} — {occupancy}% ({items} items)").replace("{key}", String(key)).replace("{occupancy}", String((c2.occupancy * 100).toFixed(0))).replace("{items}", String(c2.items.length)),
|
|
2068
2070
|
onClick: () => onCellClick == null ? void 0 : onCellClick(c2),
|
|
2069
2071
|
onMouseEnter: () => setHovered(c2),
|
|
2070
2072
|
onMouseLeave: () => setHovered(null),
|
|
@@ -2081,12 +2083,7 @@ const NiceWarehouseView = /* @__PURE__ */ forwardRef(
|
|
|
2081
2083
|
"/",
|
|
2082
2084
|
hovered.location.bin
|
|
2083
2085
|
] }),
|
|
2084
|
-
/* @__PURE__ */
|
|
2085
|
-
hovered.items.length,
|
|
2086
|
-
" items · ",
|
|
2087
|
-
(hovered.occupancy * 100).toFixed(0),
|
|
2088
|
-
"% full"
|
|
2089
|
-
] }),
|
|
2086
|
+
/* @__PURE__ */ jsx("div", { children: t("warehouseView.itemsFull", "{items} items · {occupancy}% full").replace("{items}", String(hovered.items.length)).replace("{occupancy}", String((hovered.occupancy * 100).toFixed(0))) }),
|
|
2090
2087
|
/* @__PURE__ */ jsxs("ul", { children: [
|
|
2091
2088
|
hovered.items.slice(0, 5).map((it) => /* @__PURE__ */ jsxs("li", { children: [
|
|
2092
2089
|
it.sku,
|
|
@@ -2482,12 +2479,13 @@ const NiceVatTable = /* @__PURE__ */ forwardRef(
|
|
|
2482
2479
|
style,
|
|
2483
2480
|
id
|
|
2484
2481
|
}, ref) {
|
|
2482
|
+
const { t } = v();
|
|
2485
2483
|
const [internal, setInternal] = useState(rates ?? NICE_VAT_PRESETS[country]);
|
|
2486
2484
|
const L = {
|
|
2487
2485
|
code: "Code",
|
|
2488
2486
|
rate: "Rate",
|
|
2489
|
-
label: "Label",
|
|
2490
|
-
description: "Description",
|
|
2487
|
+
label: t("vatTable.label", "Label"),
|
|
2488
|
+
description: t("vatTable.description", "Description"),
|
|
2491
2489
|
add: "+ Add",
|
|
2492
2490
|
remove: "Remove",
|
|
2493
2491
|
...labels
|
|
@@ -2572,7 +2570,7 @@ const NiceVatTable = /* @__PURE__ */ forwardRef(
|
|
|
2572
2570
|
onChange: (e) => onCellEdit(idx, "description", e.target.value)
|
|
2573
2571
|
}
|
|
2574
2572
|
) : r.description ?? "" }),
|
|
2575
|
-
editable && /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx("button", { type: "button", onClick: () => removeRow(idx), "aria-label": L.remove, children: /* @__PURE__ */ jsx(
|
|
2573
|
+
editable && /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx("button", { type: "button", onClick: () => removeRow(idx), "aria-label": L.remove, children: /* @__PURE__ */ jsx(ae, { name: "close", size: 14 }) }) })
|
|
2576
2574
|
] }, r.code)) })
|
|
2577
2575
|
] }),
|
|
2578
2576
|
editable && /* @__PURE__ */ jsx("button", { type: "button", className: "nice-vat-table__add", onClick: addRow, children: L.add })
|
|
@@ -2648,6 +2646,7 @@ const NiceJpkExporter = /* @__PURE__ */ forwardRef(
|
|
|
2648
2646
|
style,
|
|
2649
2647
|
id
|
|
2650
2648
|
}, ref) {
|
|
2649
|
+
const { t } = v();
|
|
2651
2650
|
const today = /* @__PURE__ */ new Date();
|
|
2652
2651
|
const [format, setFormat] = useState(defaultFormat);
|
|
2653
2652
|
const [from, setFrom] = useState(
|
|
@@ -2710,10 +2709,10 @@ const NiceJpkExporter = /* @__PURE__ */ forwardRef(
|
|
|
2710
2709
|
/* @__PURE__ */ jsx("input", { type: "date", value: to, onChange: (e) => setTo(e.target.value) })
|
|
2711
2710
|
] }),
|
|
2712
2711
|
/* @__PURE__ */ jsx("button", { type: "button", onClick: exportNow, children: L.export }),
|
|
2713
|
-
/* @__PURE__ */
|
|
2714
|
-
invoices
|
|
2715
|
-
|
|
2716
|
-
|
|
2712
|
+
/* @__PURE__ */ jsx("small", { children: t("jpkExporter.invoicesReady", "{invoices} invoices ready").replace(
|
|
2713
|
+
"{invoices}",
|
|
2714
|
+
String(invoices.length)
|
|
2715
|
+
) })
|
|
2717
2716
|
] });
|
|
2718
2717
|
}
|
|
2719
2718
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nice2dev/ui-erp",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "Enterprise Resource Planning components for Nice2Dev",
|
|
5
5
|
"author": "Nice2Dev Team",
|
|
6
6
|
"license": "MIT",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"react-dom": ">=17.0.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@nice2dev/ui-core": "^1.2.
|
|
53
|
+
"@nice2dev/ui-core": "^1.2.2",
|
|
54
54
|
"@testing-library/react": "^16.3.3",
|
|
55
55
|
"@types/react": "^19.2.18",
|
|
56
56
|
"@types/react-dom": "^19.2.7",
|