ptechcore_ui 1.0.68 → 1.0.69

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 (3) hide show
  1. package/dist/index.cjs +20 -377
  2. package/dist/index.js +738 -1092
  3. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -1117,341 +1117,8 @@ var VendorServices = {
1117
1117
  delete: (id) => FetchApi.delete(`${VENDORS_API_URL}${id}/`)
1118
1118
  };
1119
1119
 
1120
- // node_modules/react-router/dist/index.js
1121
- var React2 = __toESM(require("react"));
1122
-
1123
- // node_modules/@remix-run/router/dist/router.js
1124
- function _extends() {
1125
- _extends = Object.assign ? Object.assign.bind() : function(target) {
1126
- for (var i = 1; i < arguments.length; i++) {
1127
- var source = arguments[i];
1128
- for (var key in source) {
1129
- if (Object.prototype.hasOwnProperty.call(source, key)) {
1130
- target[key] = source[key];
1131
- }
1132
- }
1133
- }
1134
- return target;
1135
- };
1136
- return _extends.apply(this, arguments);
1137
- }
1138
- var Action;
1139
- (function(Action2) {
1140
- Action2["Pop"] = "POP";
1141
- Action2["Push"] = "PUSH";
1142
- Action2["Replace"] = "REPLACE";
1143
- })(Action || (Action = {}));
1144
- function invariant(value, message) {
1145
- if (value === false || value === null || typeof value === "undefined") {
1146
- throw new Error(message);
1147
- }
1148
- }
1149
- function warning(cond, message) {
1150
- if (!cond) {
1151
- if (typeof console !== "undefined") console.warn(message);
1152
- try {
1153
- throw new Error(message);
1154
- } catch (e) {
1155
- }
1156
- }
1157
- }
1158
- function parsePath(path) {
1159
- let parsedPath = {};
1160
- if (path) {
1161
- let hashIndex = path.indexOf("#");
1162
- if (hashIndex >= 0) {
1163
- parsedPath.hash = path.substr(hashIndex);
1164
- path = path.substr(0, hashIndex);
1165
- }
1166
- let searchIndex = path.indexOf("?");
1167
- if (searchIndex >= 0) {
1168
- parsedPath.search = path.substr(searchIndex);
1169
- path = path.substr(0, searchIndex);
1170
- }
1171
- if (path) {
1172
- parsedPath.pathname = path;
1173
- }
1174
- }
1175
- return parsedPath;
1176
- }
1177
- var ResultType;
1178
- (function(ResultType2) {
1179
- ResultType2["data"] = "data";
1180
- ResultType2["deferred"] = "deferred";
1181
- ResultType2["redirect"] = "redirect";
1182
- ResultType2["error"] = "error";
1183
- })(ResultType || (ResultType = {}));
1184
- function resolvePath(to, fromPathname) {
1185
- if (fromPathname === void 0) {
1186
- fromPathname = "/";
1187
- }
1188
- let {
1189
- pathname: toPathname,
1190
- search = "",
1191
- hash = ""
1192
- } = typeof to === "string" ? parsePath(to) : to;
1193
- let pathname = toPathname ? toPathname.startsWith("/") ? toPathname : resolvePathname(toPathname, fromPathname) : fromPathname;
1194
- return {
1195
- pathname,
1196
- search: normalizeSearch(search),
1197
- hash: normalizeHash(hash)
1198
- };
1199
- }
1200
- function resolvePathname(relativePath, fromPathname) {
1201
- let segments = fromPathname.replace(/\/+$/, "").split("/");
1202
- let relativeSegments = relativePath.split("/");
1203
- relativeSegments.forEach((segment) => {
1204
- if (segment === "..") {
1205
- if (segments.length > 1) segments.pop();
1206
- } else if (segment !== ".") {
1207
- segments.push(segment);
1208
- }
1209
- });
1210
- return segments.length > 1 ? segments.join("/") : "/";
1211
- }
1212
- function getInvalidPathError(char, field, dest, path) {
1213
- return "Cannot include a '" + char + "' character in a manually specified " + ("`to." + field + "` field [" + JSON.stringify(path) + "]. Please separate it out to the ") + ("`to." + dest + "` field. Alternatively you may provide the full path as ") + 'a string in <Link to="..."> and the router will parse it for you.';
1214
- }
1215
- function getPathContributingMatches(matches) {
1216
- return matches.filter((match, index) => index === 0 || match.route.path && match.route.path.length > 0);
1217
- }
1218
- function getResolveToMatches(matches, v7_relativeSplatPath) {
1219
- let pathMatches = getPathContributingMatches(matches);
1220
- if (v7_relativeSplatPath) {
1221
- return pathMatches.map((match, idx) => idx === pathMatches.length - 1 ? match.pathname : match.pathnameBase);
1222
- }
1223
- return pathMatches.map((match) => match.pathnameBase);
1224
- }
1225
- function resolveTo(toArg, routePathnames, locationPathname, isPathRelative) {
1226
- if (isPathRelative === void 0) {
1227
- isPathRelative = false;
1228
- }
1229
- let to;
1230
- if (typeof toArg === "string") {
1231
- to = parsePath(toArg);
1232
- } else {
1233
- to = _extends({}, toArg);
1234
- invariant(!to.pathname || !to.pathname.includes("?"), getInvalidPathError("?", "pathname", "search", to));
1235
- invariant(!to.pathname || !to.pathname.includes("#"), getInvalidPathError("#", "pathname", "hash", to));
1236
- invariant(!to.search || !to.search.includes("#"), getInvalidPathError("#", "search", "hash", to));
1237
- }
1238
- let isEmptyPath = toArg === "" || to.pathname === "";
1239
- let toPathname = isEmptyPath ? "/" : to.pathname;
1240
- let from;
1241
- if (toPathname == null) {
1242
- from = locationPathname;
1243
- } else {
1244
- let routePathnameIndex = routePathnames.length - 1;
1245
- if (!isPathRelative && toPathname.startsWith("..")) {
1246
- let toSegments = toPathname.split("/");
1247
- while (toSegments[0] === "..") {
1248
- toSegments.shift();
1249
- routePathnameIndex -= 1;
1250
- }
1251
- to.pathname = toSegments.join("/");
1252
- }
1253
- from = routePathnameIndex >= 0 ? routePathnames[routePathnameIndex] : "/";
1254
- }
1255
- let path = resolvePath(to, from);
1256
- let hasExplicitTrailingSlash = toPathname && toPathname !== "/" && toPathname.endsWith("/");
1257
- let hasCurrentTrailingSlash = (isEmptyPath || toPathname === ".") && locationPathname.endsWith("/");
1258
- if (!path.pathname.endsWith("/") && (hasExplicitTrailingSlash || hasCurrentTrailingSlash)) {
1259
- path.pathname += "/";
1260
- }
1261
- return path;
1262
- }
1263
- var joinPaths = (paths) => paths.join("/").replace(/\/\/+/g, "/");
1264
- var normalizeSearch = (search) => !search || search === "?" ? "" : search.startsWith("?") ? search : "?" + search;
1265
- var normalizeHash = (hash) => !hash || hash === "#" ? "" : hash.startsWith("#") ? hash : "#" + hash;
1266
- var validMutationMethodsArr = ["post", "put", "patch", "delete"];
1267
- var validMutationMethods = new Set(validMutationMethodsArr);
1268
- var validRequestMethodsArr = ["get", ...validMutationMethodsArr];
1269
- var validRequestMethods = new Set(validRequestMethodsArr);
1270
- var UNSAFE_DEFERRED_SYMBOL = Symbol("deferred");
1271
-
1272
- // node_modules/react-router/dist/index.js
1273
- function _extends2() {
1274
- _extends2 = Object.assign ? Object.assign.bind() : function(target) {
1275
- for (var i = 1; i < arguments.length; i++) {
1276
- var source = arguments[i];
1277
- for (var key in source) {
1278
- if (Object.prototype.hasOwnProperty.call(source, key)) {
1279
- target[key] = source[key];
1280
- }
1281
- }
1282
- }
1283
- return target;
1284
- };
1285
- return _extends2.apply(this, arguments);
1286
- }
1287
- var DataRouterContext = /* @__PURE__ */ React2.createContext(null);
1288
- if (process.env.NODE_ENV !== "production") {
1289
- DataRouterContext.displayName = "DataRouter";
1290
- }
1291
- var DataRouterStateContext = /* @__PURE__ */ React2.createContext(null);
1292
- if (process.env.NODE_ENV !== "production") {
1293
- DataRouterStateContext.displayName = "DataRouterState";
1294
- }
1295
- var AwaitContext = /* @__PURE__ */ React2.createContext(null);
1296
- if (process.env.NODE_ENV !== "production") {
1297
- AwaitContext.displayName = "Await";
1298
- }
1299
- var NavigationContext = /* @__PURE__ */ React2.createContext(null);
1300
- if (process.env.NODE_ENV !== "production") {
1301
- NavigationContext.displayName = "Navigation";
1302
- }
1303
- var LocationContext = /* @__PURE__ */ React2.createContext(null);
1304
- if (process.env.NODE_ENV !== "production") {
1305
- LocationContext.displayName = "Location";
1306
- }
1307
- var RouteContext = /* @__PURE__ */ React2.createContext({
1308
- outlet: null,
1309
- matches: [],
1310
- isDataRoute: false
1311
- });
1312
- if (process.env.NODE_ENV !== "production") {
1313
- RouteContext.displayName = "Route";
1314
- }
1315
- var RouteErrorContext = /* @__PURE__ */ React2.createContext(null);
1316
- if (process.env.NODE_ENV !== "production") {
1317
- RouteErrorContext.displayName = "RouteError";
1318
- }
1319
- function useInRouterContext() {
1320
- return React2.useContext(LocationContext) != null;
1321
- }
1322
- function useLocation() {
1323
- !useInRouterContext() ? process.env.NODE_ENV !== "production" ? invariant(
1324
- false,
1325
- // TODO: This error is probably because they somehow have 2 versions of the
1326
- // router loaded. We can help them understand how to avoid that.
1327
- "useLocation() may be used only in the context of a <Router> component."
1328
- ) : invariant(false) : void 0;
1329
- return React2.useContext(LocationContext).location;
1330
- }
1331
- var navigateEffectWarning = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
1332
- function useIsomorphicLayoutEffect(cb) {
1333
- let isStatic = React2.useContext(NavigationContext).static;
1334
- if (!isStatic) {
1335
- React2.useLayoutEffect(cb);
1336
- }
1337
- }
1338
- function useNavigate() {
1339
- let {
1340
- isDataRoute
1341
- } = React2.useContext(RouteContext);
1342
- return isDataRoute ? useNavigateStable() : useNavigateUnstable();
1343
- }
1344
- function useNavigateUnstable() {
1345
- !useInRouterContext() ? process.env.NODE_ENV !== "production" ? invariant(
1346
- false,
1347
- // TODO: This error is probably because they somehow have 2 versions of the
1348
- // router loaded. We can help them understand how to avoid that.
1349
- "useNavigate() may be used only in the context of a <Router> component."
1350
- ) : invariant(false) : void 0;
1351
- let dataRouterContext = React2.useContext(DataRouterContext);
1352
- let {
1353
- basename,
1354
- future,
1355
- navigator: navigator2
1356
- } = React2.useContext(NavigationContext);
1357
- let {
1358
- matches
1359
- } = React2.useContext(RouteContext);
1360
- let {
1361
- pathname: locationPathname
1362
- } = useLocation();
1363
- let routePathnamesJson = JSON.stringify(getResolveToMatches(matches, future.v7_relativeSplatPath));
1364
- let activeRef = React2.useRef(false);
1365
- useIsomorphicLayoutEffect(() => {
1366
- activeRef.current = true;
1367
- });
1368
- let navigate = React2.useCallback(function(to, options) {
1369
- if (options === void 0) {
1370
- options = {};
1371
- }
1372
- process.env.NODE_ENV !== "production" ? warning(activeRef.current, navigateEffectWarning) : void 0;
1373
- if (!activeRef.current) return;
1374
- if (typeof to === "number") {
1375
- navigator2.go(to);
1376
- return;
1377
- }
1378
- let path = resolveTo(to, JSON.parse(routePathnamesJson), locationPathname, options.relative === "path");
1379
- if (dataRouterContext == null && basename !== "/") {
1380
- path.pathname = path.pathname === "/" ? basename : joinPaths([basename, path.pathname]);
1381
- }
1382
- (!!options.replace ? navigator2.replace : navigator2.push)(path, options.state, options);
1383
- }, [basename, navigator2, routePathnamesJson, locationPathname, dataRouterContext]);
1384
- return navigate;
1385
- }
1386
- var DataRouterHook = /* @__PURE__ */ (function(DataRouterHook2) {
1387
- DataRouterHook2["UseBlocker"] = "useBlocker";
1388
- DataRouterHook2["UseRevalidator"] = "useRevalidator";
1389
- DataRouterHook2["UseNavigateStable"] = "useNavigate";
1390
- return DataRouterHook2;
1391
- })(DataRouterHook || {});
1392
- var DataRouterStateHook = /* @__PURE__ */ (function(DataRouterStateHook2) {
1393
- DataRouterStateHook2["UseBlocker"] = "useBlocker";
1394
- DataRouterStateHook2["UseLoaderData"] = "useLoaderData";
1395
- DataRouterStateHook2["UseActionData"] = "useActionData";
1396
- DataRouterStateHook2["UseRouteError"] = "useRouteError";
1397
- DataRouterStateHook2["UseNavigation"] = "useNavigation";
1398
- DataRouterStateHook2["UseRouteLoaderData"] = "useRouteLoaderData";
1399
- DataRouterStateHook2["UseMatches"] = "useMatches";
1400
- DataRouterStateHook2["UseRevalidator"] = "useRevalidator";
1401
- DataRouterStateHook2["UseNavigateStable"] = "useNavigate";
1402
- DataRouterStateHook2["UseRouteId"] = "useRouteId";
1403
- return DataRouterStateHook2;
1404
- })(DataRouterStateHook || {});
1405
- function getDataRouterConsoleError(hookName) {
1406
- return hookName + " must be used within a data router. See https://reactrouter.com/v6/routers/picking-a-router.";
1407
- }
1408
- function useDataRouterContext(hookName) {
1409
- let ctx = React2.useContext(DataRouterContext);
1410
- !ctx ? process.env.NODE_ENV !== "production" ? invariant(false, getDataRouterConsoleError(hookName)) : invariant(false) : void 0;
1411
- return ctx;
1412
- }
1413
- function useRouteContext(hookName) {
1414
- let route = React2.useContext(RouteContext);
1415
- !route ? process.env.NODE_ENV !== "production" ? invariant(false, getDataRouterConsoleError(hookName)) : invariant(false) : void 0;
1416
- return route;
1417
- }
1418
- function useCurrentRouteId(hookName) {
1419
- let route = useRouteContext(hookName);
1420
- let thisRoute = route.matches[route.matches.length - 1];
1421
- !thisRoute.route.id ? process.env.NODE_ENV !== "production" ? invariant(false, hookName + ' can only be used on routes that contain a unique "id"') : invariant(false) : void 0;
1422
- return thisRoute.route.id;
1423
- }
1424
- function useNavigateStable() {
1425
- let {
1426
- router
1427
- } = useDataRouterContext(DataRouterHook.UseNavigateStable);
1428
- let id = useCurrentRouteId(DataRouterStateHook.UseNavigateStable);
1429
- let activeRef = React2.useRef(false);
1430
- useIsomorphicLayoutEffect(() => {
1431
- activeRef.current = true;
1432
- });
1433
- let navigate = React2.useCallback(function(to, options) {
1434
- if (options === void 0) {
1435
- options = {};
1436
- }
1437
- process.env.NODE_ENV !== "production" ? warning(activeRef.current, navigateEffectWarning) : void 0;
1438
- if (!activeRef.current) return;
1439
- if (typeof to === "number") {
1440
- router.navigate(to);
1441
- } else {
1442
- router.navigate(to, _extends2({
1443
- fromRouteId: id
1444
- }, options));
1445
- }
1446
- }, [router, id]);
1447
- return navigate;
1448
- }
1449
- var START_TRANSITION = "startTransition";
1450
- var startTransitionImpl = React2[START_TRANSITION];
1451
- var neverSettledPromise = new Promise(() => {
1452
- });
1453
-
1454
1120
  // src/contexts/SessionContext.tsx
1121
+ var import_react_router = require("react-router");
1455
1122
  var import_jsx_runtime5 = require("react/jsx-runtime");
1456
1123
  var SessionContext = (0, import_react2.createContext)(void 0);
1457
1124
  var useSession = () => {
@@ -1468,7 +1135,7 @@ var SessionProvider = ({ children }) => {
1468
1135
  const saved_center_id = localStorage.getItem("active_center_id") || "";
1469
1136
  const [isLoading, setIsLoading] = (0, import_react2.useState)(true);
1470
1137
  const [showAuthModal, setShowAuthModal] = (0, import_react2.useState)(false);
1471
- const navigate = useNavigate();
1138
+ const navigate = (0, import_react_router.useNavigate)();
1472
1139
  (0, import_react2.useEffect)(() => {
1473
1140
  const initializeSession = async () => {
1474
1141
  const params = new URLSearchParams(window.location.search);
@@ -1699,7 +1366,7 @@ var ToastProvider = ({ children }) => {
1699
1366
  const error = (0, import_react3.useCallback)((message, duration) => {
1700
1367
  addToast({ message, type: "error", duration });
1701
1368
  }, [addToast]);
1702
- const warning2 = (0, import_react3.useCallback)((message, duration) => {
1369
+ const warning = (0, import_react3.useCallback)((message, duration) => {
1703
1370
  addToast({ message, type: "warning", duration });
1704
1371
  }, [addToast]);
1705
1372
  const info = (0, import_react3.useCallback)((message, duration) => {
@@ -1731,7 +1398,7 @@ var ToastProvider = ({ children }) => {
1731
1398
  removeToast,
1732
1399
  success,
1733
1400
  error,
1734
- warning: warning2,
1401
+ warning,
1735
1402
  info,
1736
1403
  confirm: confirm2
1737
1404
  };
@@ -1835,12 +1502,12 @@ var ApprovalServices = {
1835
1502
  /**
1836
1503
  * Obtenir les détails d'un cas d'approbation par process et object_id
1837
1504
  */
1838
- getDetails: (process2, object_id, token) => FetchApi.get(`${APPROVAL_API_URL}details/?process=${process2}&object_id=${object_id}`, token),
1505
+ getDetails: (process, object_id, token) => FetchApi.get(`${APPROVAL_API_URL}details/?process=${process}&object_id=${object_id}`, token),
1839
1506
  getAnswerDetails: (link_token) => FetchApi.get(`${APPROVAL_API_URL}answers/?link_token=${link_token}`),
1840
1507
  /**
1841
1508
  * Obtenir l'historique des versions d'un cas d'approbation
1842
1509
  */
1843
- getHistory: (process2, object_id, token) => FetchApi.get(`${APPROVAL_API_URL}history/?process=${process2}&object_id=${object_id}`, token),
1510
+ getHistory: (process, object_id, token) => FetchApi.get(`${APPROVAL_API_URL}history/?process=${process}&object_id=${object_id}`, token),
1844
1511
  /**
1845
1512
  * Mettre à jour un cas d'approbation
1846
1513
  */
@@ -10708,7 +10375,7 @@ var import_react25 = require("react");
10708
10375
  var import_lucide_react21 = require("lucide-react");
10709
10376
  var import_jsx_runtime31 = require("react/jsx-runtime");
10710
10377
  var ApprovalWorkflow = ({
10711
- process: process2,
10378
+ process,
10712
10379
  object_id,
10713
10380
  title = "Validation t\xE2che",
10714
10381
  readOnly = false,
@@ -10746,7 +10413,7 @@ var ApprovalWorkflow = ({
10746
10413
  } else {
10747
10414
  loadData();
10748
10415
  }
10749
- }, [process2, object_id, isOpen]);
10416
+ }, [process, object_id, isOpen]);
10750
10417
  const loadData = async () => {
10751
10418
  if (!token) {
10752
10419
  showError("Vous devez \xEAtre connect\xE9");
@@ -10777,7 +10444,7 @@ var ApprovalWorkflow = ({
10777
10444
  const loadCase = async () => {
10778
10445
  if (!token) return;
10779
10446
  try {
10780
- const response = await ApprovalServices.getDetails(process2, object_id, token);
10447
+ const response = await ApprovalServices.getDetails(process, object_id, token);
10781
10448
  if (response.success && response.data) {
10782
10449
  const caseInfo = response.data;
10783
10450
  setCaseData(caseInfo);
@@ -10837,7 +10504,7 @@ var ApprovalWorkflow = ({
10837
10504
  try {
10838
10505
  const payload = {
10839
10506
  title: formData.title,
10840
- process: process2,
10507
+ process,
10841
10508
  object_id,
10842
10509
  requested_by: loggedUser.id,
10843
10510
  description: formData.description,
@@ -10944,7 +10611,7 @@ var ApprovalWorkflow = ({
10944
10611
  if (!token) return;
10945
10612
  setLoadingHistory(true);
10946
10613
  try {
10947
- const response = await ApprovalServices.getHistory(process2, object_id, token);
10614
+ const response = await ApprovalServices.getHistory(process, object_id, token);
10948
10615
  if (response.success && response.data) {
10949
10616
  setHistory(response.data);
10950
10617
  }
@@ -19586,6 +19253,7 @@ var PurchaseRequestsPage = () => {
19586
19253
 
19587
19254
  // src/App.tsx
19588
19255
  var import_react_router_dom22 = require("react-router-dom");
19256
+ var import_react_query2 = require("@tanstack/react-query");
19589
19257
 
19590
19258
  // src/pages/Home.tsx
19591
19259
  var import_react42 = require("react");
@@ -25238,7 +24906,8 @@ var WorkSpaceRoutes = ({ module_name = "Rewise", module_id = "core", module_desc
25238
24906
  { id: "car", label: "CAR", path: "budget/car", icon: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_lucide_react73.Eye, { className: "w-4 h-4" }) }
25239
24907
  ]
25240
24908
  };
25241
- return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(ModernDoubleSidebarLayout_default, { module_name, module_description, primaryMenuItems, secondaryMenuItems, children: /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(import_react_router_dom22.Routes, { children: [
24909
+ const queryClient = new import_react_query2.QueryClient();
24910
+ return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(ModernDoubleSidebarLayout_default, { module_name, module_description, primaryMenuItems, secondaryMenuItems, children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_react_query2.QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(import_react_router_dom22.Routes, { children: [
25242
24911
  /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_react_router_dom22.Route, { path: "", element: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(WorkSpace_default, { module: module_id }) }),
25243
24912
  /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_react_router_dom22.Route, { path: "task-pilot", element: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(TaskPilot_default, {}) }),
25244
24913
  /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_react_router_dom22.Route, { path: "proculink", element: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(PurchaseRequestsPage, {}) }),
@@ -25249,7 +24918,7 @@ var WorkSpaceRoutes = ({ module_name = "Rewise", module_id = "core", module_desc
25249
24918
  /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_react_router_dom22.Route, { path: "actifs", element: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(ActifsPage_default, {}) }),
25250
24919
  /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_react_router_dom22.Route, { path: "planning", element: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(PlanningPage_default, {}) }),
25251
24920
  /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_react_router_dom22.Route, { path: "fix-it-now", element: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(FixitNow, {}) })
25252
- ] }) });
24921
+ ] }) }) });
25253
24922
  };
25254
24923
 
25255
24924
  // src/components/contracts/ContractsPage.tsx
@@ -31611,18 +31280,18 @@ var BulkSLAEvaluationModal = ({
31611
31280
  };
31612
31281
  const stats = (0, import_react86.useMemo)(() => {
31613
31282
  let achieved = 0;
31614
- let warning2 = 0;
31283
+ let warning = 0;
31615
31284
  let failed = 0;
31616
31285
  let total = 0;
31617
31286
  evaluations.forEach((e) => {
31618
31287
  if (e.value !== "" && e.status) {
31619
31288
  total++;
31620
31289
  if (e.status === "achieved") achieved++;
31621
- else if (e.status === "warning") warning2++;
31290
+ else if (e.status === "warning") warning++;
31622
31291
  else failed++;
31623
31292
  }
31624
31293
  });
31625
- return { achieved, warning: warning2, failed, total, evaluated: total };
31294
+ return { achieved, warning, failed, total, evaluated: total };
31626
31295
  }, [evaluations]);
31627
31296
  const handleSubmit = async () => {
31628
31297
  const validEvaluations = evaluations.filter((e) => e.value !== "" && !isNaN(parseFloat(e.value)));
@@ -32347,7 +32016,7 @@ var SLAManagementModal = ({
32347
32016
  const slaStats = (0, import_react87.useMemo)(() => {
32348
32017
  const indicators = contract.sla_indicators || [];
32349
32018
  const achieved = indicators.filter((i) => i.status === "achieved").length;
32350
- const warning2 = indicators.filter((i) => i.status === "warning").length;
32019
+ const warning = indicators.filter((i) => i.status === "warning").length;
32351
32020
  const failed = indicators.filter((i) => i.status === "failed").length;
32352
32021
  const total = indicators.length;
32353
32022
  const overallPerformance = total > 0 ? Math.round(indicators.reduce((sum, i) => {
@@ -32367,7 +32036,7 @@ var SLAManagementModal = ({
32367
32036
  return {
32368
32037
  total,
32369
32038
  achieved,
32370
- warning: warning2,
32039
+ warning,
32371
32040
  failed,
32372
32041
  overallPerformance,
32373
32042
  totalPenalties,
@@ -34268,29 +33937,3 @@ var PriceScheduleServices = {
34268
33937
  useTheme,
34269
33938
  useToast
34270
33939
  });
34271
- /*! Bundled license information:
34272
-
34273
- @remix-run/router/dist/router.js:
34274
- (**
34275
- * @remix-run/router v1.23.0
34276
- *
34277
- * Copyright (c) Remix Software Inc.
34278
- *
34279
- * This source code is licensed under the MIT license found in the
34280
- * LICENSE.md file in the root directory of this source tree.
34281
- *
34282
- * @license MIT
34283
- *)
34284
-
34285
- react-router/dist/index.js:
34286
- (**
34287
- * React Router v6.30.1
34288
- *
34289
- * Copyright (c) Remix Software Inc.
34290
- *
34291
- * This source code is licensed under the MIT license found in the
34292
- * LICENSE.md file in the root directory of this source tree.
34293
- *
34294
- * @license MIT
34295
- *)
34296
- */