ptechcore_ui 1.0.64 → 1.0.66
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 +177 -192
- package/dist/index.d.cts +3457 -0
- package/dist/index.d.ts +3457 -0
- package/dist/index.js +181 -197
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -234,7 +234,7 @@ var Buttons_default = PrimaryButton;
|
|
|
234
234
|
// src/components/common/Modals.tsx
|
|
235
235
|
var import_react_dom = require("react-dom");
|
|
236
236
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
237
|
-
var
|
|
237
|
+
var Modal = ({
|
|
238
238
|
title,
|
|
239
239
|
description,
|
|
240
240
|
sideactions,
|
|
@@ -275,7 +275,7 @@ var Modal2 = ({
|
|
|
275
275
|
] }) });
|
|
276
276
|
return (0, import_react_dom.createPortal)(modalContent, document.body);
|
|
277
277
|
};
|
|
278
|
-
var Modals_default =
|
|
278
|
+
var Modals_default = Modal;
|
|
279
279
|
|
|
280
280
|
// src/components/common/Inputs.tsx
|
|
281
281
|
var import_react_router_dom = require("react-router-dom");
|
|
@@ -321,7 +321,28 @@ var InputField = ({
|
|
|
321
321
|
error && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-xs text-[var(--color-error)]", children: error })
|
|
322
322
|
] });
|
|
323
323
|
};
|
|
324
|
-
var TextInput = ({ type = "text", ...props }) => {
|
|
324
|
+
var TextInput = ({ type = "text", multiline, rows, ...props }) => {
|
|
325
|
+
if (multiline) {
|
|
326
|
+
const { label, error, ref, ...textareaProps } = props;
|
|
327
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex flex-col gap-1 w-full", children: [
|
|
328
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("label", { className: "block text-[var(--color-text-secondary)] text-sm font-medium mb-2", children: label }),
|
|
329
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
330
|
+
"textarea",
|
|
331
|
+
{
|
|
332
|
+
...textareaProps,
|
|
333
|
+
rows,
|
|
334
|
+
className: `w-full px-3 py-2 border rounded-lg text-sm
|
|
335
|
+
bg-[var(--color-surface)] text-[var(--color-text-primary)]
|
|
336
|
+
focus:ring-2 focus:ring-[var(--color-primary)]/20 focus:border-[var(--color-primary)] focus:outline-none
|
|
337
|
+
${error ? "border-[var(--color-error)]" : "border-[var(--color-border)]"}
|
|
338
|
+
${textareaProps.disabled ? "bg-[var(--color-background)] cursor-not-allowed opacity-60" : ""}
|
|
339
|
+
${textareaProps.className || ""}
|
|
340
|
+
`
|
|
341
|
+
}
|
|
342
|
+
),
|
|
343
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-xs text-[var(--color-error)]", children: error })
|
|
344
|
+
] });
|
|
345
|
+
}
|
|
325
346
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(InputField, { ...props, type });
|
|
326
347
|
};
|
|
327
348
|
var NumberInput = (props) => {
|
|
@@ -1442,7 +1463,7 @@ var import_react4 = require("react");
|
|
|
1442
1463
|
|
|
1443
1464
|
// src/components/common/Cards.tsx
|
|
1444
1465
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
1445
|
-
var RewiseCard = ({ children, className = "" }) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: `bg-white rounded-lg shadow border border-gray-200 ${className}`, children });
|
|
1466
|
+
var RewiseCard = ({ children, className = "", style }) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: `bg-white rounded-lg shadow border border-gray-200 ${className}`, style, children });
|
|
1446
1467
|
var RewiseBasicCard = ({ title, children }) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "bg-white rounded-lg ", children: [
|
|
1447
1468
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "px-6 py-2 border-b border-gray-200", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex items-center space-x-4", children: title }) }),
|
|
1448
1469
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "p-3", children })
|
|
@@ -1935,6 +1956,29 @@ var ApprovalPreviewAnswer = ({ loadCase, answerId, caseData }) => {
|
|
|
1935
1956
|
};
|
|
1936
1957
|
var ApprovalPreviewAnswer_default = ApprovalPreviewAnswer;
|
|
1937
1958
|
|
|
1959
|
+
// src/hooks/usePermissions.ts
|
|
1960
|
+
var usePermissions = () => {
|
|
1961
|
+
const { loggedUser, activeBusinessEntity } = useSession();
|
|
1962
|
+
const hasPermission = (permissionCode) => {
|
|
1963
|
+
if (loggedUser?.is_superuser) return true;
|
|
1964
|
+
const entityPermissions = activeBusinessEntity?.user_permissions || [];
|
|
1965
|
+
return entityPermissions.includes(permissionCode);
|
|
1966
|
+
};
|
|
1967
|
+
const hasAnyPermission = (permissionCodes) => {
|
|
1968
|
+
return permissionCodes.some((code) => hasPermission(code));
|
|
1969
|
+
};
|
|
1970
|
+
const hasAllPermissions = (permissionCodes) => {
|
|
1971
|
+
return permissionCodes.every((code) => hasPermission(code));
|
|
1972
|
+
};
|
|
1973
|
+
return {
|
|
1974
|
+
hasPermission,
|
|
1975
|
+
hasAnyPermission,
|
|
1976
|
+
hasAllPermissions,
|
|
1977
|
+
isSuperuser: loggedUser?.is_superuser || false,
|
|
1978
|
+
permissions: activeBusinessEntity?.user_permissions || []
|
|
1979
|
+
};
|
|
1980
|
+
};
|
|
1981
|
+
|
|
1938
1982
|
// src/components/layout/ModernDoubleSidebarLayout.tsx
|
|
1939
1983
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1940
1984
|
var MODULE_URLS = {
|
|
@@ -2002,6 +2046,7 @@ var RewiseLayout = ({ children, module_name = "Rewise", module_description = "",
|
|
|
2002
2046
|
const navigate = (0, import_react_router_dom3.useNavigate)();
|
|
2003
2047
|
const { theme, themeType, setTheme } = useTheme();
|
|
2004
2048
|
const { loggedUser, token, activeBusinessEntity, setActiveBusinessEntity } = useSession();
|
|
2049
|
+
const { hasPermission } = usePermissions();
|
|
2005
2050
|
const moduleUrls = getModuleUrls(token || void 0);
|
|
2006
2051
|
const getOrganizationModules = () => {
|
|
2007
2052
|
if (!activeBusinessEntity) return [];
|
|
@@ -2348,7 +2393,7 @@ var RewiseLayout = ({ children, module_name = "Rewise", module_description = "",
|
|
|
2348
2393
|
className: "flex-1 py-4 overflow-y-auto",
|
|
2349
2394
|
role: "menubar",
|
|
2350
2395
|
"aria-label": "Modules principaux",
|
|
2351
|
-
children: primaryMenuItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
2396
|
+
children: primaryMenuItems.map((item) => item.permission && !hasPermission(item.permission) ? null : /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
2352
2397
|
"button",
|
|
2353
2398
|
{
|
|
2354
2399
|
onClick: () => {
|
|
@@ -2444,7 +2489,7 @@ var RewiseLayout = ({ children, module_name = "Rewise", module_description = "",
|
|
|
2444
2489
|
className: "flex-1 py-4 overflow-y-auto",
|
|
2445
2490
|
role: "menu",
|
|
2446
2491
|
"aria-label": "Sous-navigation",
|
|
2447
|
-
children: secondaryMenuItems[selectedModule]?.map((item) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
2492
|
+
children: secondaryMenuItems[selectedModule]?.map((item) => item.permission && !hasPermission(item.permission) ? null : /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
2448
2493
|
"button",
|
|
2449
2494
|
{
|
|
2450
2495
|
onClick: () => item.path && navigate(item.path),
|
|
@@ -3623,7 +3668,7 @@ var ToastItem = ({ toast }) => {
|
|
|
3623
3668
|
};
|
|
3624
3669
|
var ToastContainer = () => {
|
|
3625
3670
|
const { toasts } = useToast();
|
|
3626
|
-
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "fixed top-4 right-4 z-
|
|
3671
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "fixed top-4 right-4 z-[10000] space-y-3", children: toasts.map((toast) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ToastItem, { toast }, toast.id)) });
|
|
3627
3672
|
};
|
|
3628
3673
|
var Toast_default = ToastContainer;
|
|
3629
3674
|
|
|
@@ -3808,10 +3853,12 @@ var Tabs = ({ tabs, activeTab, onChange, variant = "filled", className = "" }) =
|
|
|
3808
3853
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
3809
3854
|
var Badge = ({
|
|
3810
3855
|
children,
|
|
3811
|
-
variant = "default"
|
|
3856
|
+
variant = "default",
|
|
3857
|
+
className = ""
|
|
3812
3858
|
}) => {
|
|
3813
3859
|
const variants = {
|
|
3814
3860
|
default: "bg-[#d1d7de] text-[#283042]",
|
|
3861
|
+
secondary: "bg-gray-100 text-gray-700",
|
|
3815
3862
|
success: "bg-[#78a6d2] text-white",
|
|
3816
3863
|
warning: "bg-[#e04927] text-white",
|
|
3817
3864
|
error: "bg-[#e04927] text-white",
|
|
@@ -3820,37 +3867,12 @@ var Badge = ({
|
|
|
3820
3867
|
blue: "bg-[#78a6d2] text-white",
|
|
3821
3868
|
green: "bg-[#78a6d2] text-white"
|
|
3822
3869
|
};
|
|
3823
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: `inline-flex items-center px-3 py-1 rounded-full text-xs font-semibold ${variants[variant]}`, children });
|
|
3870
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: `inline-flex items-center px-3 py-1 rounded-full text-xs font-semibold ${variants[variant]} ${className}`, children });
|
|
3824
3871
|
};
|
|
3825
3872
|
|
|
3826
3873
|
// src/components/common/FDrawer.tsx
|
|
3827
3874
|
var import_react8 = __toESM(require("react"), 1);
|
|
3828
3875
|
var import_react_router_dom4 = require("react-router-dom");
|
|
3829
|
-
|
|
3830
|
-
// src/hooks/usePermissions.ts
|
|
3831
|
-
var usePermissions = () => {
|
|
3832
|
-
const { loggedUser, activeBusinessEntity } = useSession();
|
|
3833
|
-
const hasPermission = (permissionCode) => {
|
|
3834
|
-
if (loggedUser?.is_superuser) return true;
|
|
3835
|
-
const entityPermissions = activeBusinessEntity?.user_permissions || [];
|
|
3836
|
-
return entityPermissions.includes(permissionCode);
|
|
3837
|
-
};
|
|
3838
|
-
const hasAnyPermission = (permissionCodes) => {
|
|
3839
|
-
return permissionCodes.some((code) => hasPermission(code));
|
|
3840
|
-
};
|
|
3841
|
-
const hasAllPermissions = (permissionCodes) => {
|
|
3842
|
-
return permissionCodes.every((code) => hasPermission(code));
|
|
3843
|
-
};
|
|
3844
|
-
return {
|
|
3845
|
-
hasPermission,
|
|
3846
|
-
hasAnyPermission,
|
|
3847
|
-
hasAllPermissions,
|
|
3848
|
-
isSuperuser: loggedUser?.is_superuser || false,
|
|
3849
|
-
permissions: activeBusinessEntity?.user_permissions || []
|
|
3850
|
-
};
|
|
3851
|
-
};
|
|
3852
|
-
|
|
3853
|
-
// src/components/common/FDrawer.tsx
|
|
3854
3876
|
var import_lucide_react6 = require("lucide-react");
|
|
3855
3877
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
3856
3878
|
var ExcelImportModal = ({
|
|
@@ -5325,23 +5347,7 @@ var SelectVendor = ({
|
|
|
5325
5347
|
label = "Ajouter un fournisseur"
|
|
5326
5348
|
}) => {
|
|
5327
5349
|
const [showModal, setShowModal] = (0, import_react10.useState)(false);
|
|
5328
|
-
const
|
|
5329
|
-
const { token, activeBusinessEntity } = useSession();
|
|
5330
|
-
const [vendors, setVendors] = (0, import_react10.useState)(() => {
|
|
5331
|
-
const cacheKey = `vendors_cache_${activeBusinessEntity?.id || "default"}`;
|
|
5332
|
-
const cached = sessionStorage.getItem(cacheKey);
|
|
5333
|
-
return cached ? JSON.parse(cached) : [];
|
|
5334
|
-
});
|
|
5335
|
-
const [loadingVendors, setLoadingVendors] = (0, import_react10.useState)(false);
|
|
5336
|
-
(0, import_react10.useEffect)(() => {
|
|
5337
|
-
const cacheKey = `vendors_cache_${activeBusinessEntity?.id || "default"}`;
|
|
5338
|
-
const cached = sessionStorage.getItem(cacheKey);
|
|
5339
|
-
if (!cached) {
|
|
5340
|
-
loadVendors();
|
|
5341
|
-
} else {
|
|
5342
|
-
setVendors(JSON.parse(cached));
|
|
5343
|
-
}
|
|
5344
|
-
}, [activeBusinessEntity?.id]);
|
|
5350
|
+
const { vendors, loadingVendors, loadVendors } = useSession();
|
|
5345
5351
|
const getVendorOptions = () => {
|
|
5346
5352
|
return vendors.filter((vendor) => vendor.id !== void 0).map((vendor) => ({
|
|
5347
5353
|
value: vendor.id,
|
|
@@ -5349,26 +5355,7 @@ var SelectVendor = ({
|
|
|
5349
5355
|
object: vendor
|
|
5350
5356
|
}));
|
|
5351
5357
|
};
|
|
5352
|
-
const loadVendors = async () => {
|
|
5353
|
-
if (!token) {
|
|
5354
|
-
console.error("Vous devez etre connect\xE9 pour voir les organisations");
|
|
5355
|
-
return;
|
|
5356
|
-
}
|
|
5357
|
-
try {
|
|
5358
|
-
setLoadingVendors(true);
|
|
5359
|
-
const result = await VendorServices.list({ business_entity_id: activeBusinessEntity?.id });
|
|
5360
|
-
setVendors(result.data);
|
|
5361
|
-
const cacheKey = `vendors_cache_${activeBusinessEntity?.id || "default"}`;
|
|
5362
|
-
sessionStorage.setItem(cacheKey, JSON.stringify(result.data));
|
|
5363
|
-
} catch (error) {
|
|
5364
|
-
console.error(error);
|
|
5365
|
-
} finally {
|
|
5366
|
-
setLoadingVendors(false);
|
|
5367
|
-
}
|
|
5368
|
-
};
|
|
5369
5358
|
const handleRefresh = () => {
|
|
5370
|
-
const cacheKey = `vendors_cache_${activeBusinessEntity?.id || "default"}`;
|
|
5371
|
-
sessionStorage.removeItem(cacheKey);
|
|
5372
5359
|
loadVendors();
|
|
5373
5360
|
};
|
|
5374
5361
|
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { children: [
|
|
@@ -5395,12 +5382,12 @@ var SelectVendor = ({
|
|
|
5395
5382
|
showModal && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
5396
5383
|
MinimalVendorForm,
|
|
5397
5384
|
{
|
|
5398
|
-
object:
|
|
5385
|
+
object: null,
|
|
5399
5386
|
isOpen: showModal,
|
|
5400
5387
|
onClose: () => setShowModal(false),
|
|
5401
5388
|
refresh: handleRefresh
|
|
5402
5389
|
},
|
|
5403
|
-
`entity-modal
|
|
5390
|
+
`entity-modal-new`
|
|
5404
5391
|
)
|
|
5405
5392
|
] });
|
|
5406
5393
|
};
|
|
@@ -18049,7 +18036,7 @@ var CatalogueProductSelector = ({
|
|
|
18049
18036
|
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex-1", children: [
|
|
18050
18037
|
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex items-center space-x-2", children: [
|
|
18051
18038
|
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "text-xs font-mono text-gray-500", children: listItem.reference }),
|
|
18052
|
-
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
18039
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Badge, { variant: listItem.type === "product" ? "info" : "default", children: listItem.type === "product" ? "Produit" : "Service" })
|
|
18053
18040
|
] }),
|
|
18054
18041
|
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("h4", { className: "font-medium text-gray-900", children: listItem.name }),
|
|
18055
18042
|
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { className: "text-sm text-gray-500", children: listItem.category })
|
|
@@ -23433,12 +23420,14 @@ var SLAEvaluationSessionServices = {
|
|
|
23433
23420
|
|
|
23434
23421
|
// src/components/contracts/ViewContractContent.tsx
|
|
23435
23422
|
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
23436
|
-
var
|
|
23423
|
+
var Button = ({ children, onClick, variant = "default", size = "md", className = "", disabled = false }) => {
|
|
23437
23424
|
const baseStyles = "inline-flex items-center justify-center font-medium rounded-lg transition-colors disabled:opacity-50";
|
|
23438
23425
|
const variantStyles2 = {
|
|
23439
23426
|
default: "bg-blue-600 text-white hover:bg-blue-700",
|
|
23427
|
+
primary: "bg-blue-600 text-white hover:bg-blue-700",
|
|
23440
23428
|
outline: "border border-gray-300 bg-white text-gray-700 hover:bg-gray-50",
|
|
23441
23429
|
ghost: "text-gray-700 hover:bg-gray-100",
|
|
23430
|
+
text: "text-gray-700 hover:bg-gray-100",
|
|
23442
23431
|
danger: "bg-red-600 text-white hover:bg-red-700"
|
|
23443
23432
|
};
|
|
23444
23433
|
const sizeStyles = {
|
|
@@ -23448,7 +23437,7 @@ var Button2 = ({ children, onClick, variant = "default", size = "md", className
|
|
|
23448
23437
|
};
|
|
23449
23438
|
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("button", { onClick, disabled, className: `${baseStyles} ${variantStyles2[variant]} ${sizeStyles[size]} ${className}`, children });
|
|
23450
23439
|
};
|
|
23451
|
-
var
|
|
23440
|
+
var Badge2 = ({
|
|
23452
23441
|
children,
|
|
23453
23442
|
className = "",
|
|
23454
23443
|
variant = "default"
|
|
@@ -23456,9 +23445,11 @@ var Badge3 = ({
|
|
|
23456
23445
|
const variantStyles2 = {
|
|
23457
23446
|
default: "bg-gray-100 text-gray-800",
|
|
23458
23447
|
outline: "border border-gray-300 bg-white text-gray-700",
|
|
23448
|
+
secondary: "bg-gray-100 text-gray-700",
|
|
23459
23449
|
success: "bg-green-100 text-green-800",
|
|
23460
23450
|
warning: "bg-yellow-100 text-yellow-800",
|
|
23461
23451
|
danger: "bg-red-100 text-red-800",
|
|
23452
|
+
error: "bg-red-100 text-red-800",
|
|
23462
23453
|
info: "bg-blue-100 text-blue-800"
|
|
23463
23454
|
};
|
|
23464
23455
|
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: `inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium ${variantStyles2[variant]} ${className}`, children });
|
|
@@ -23638,7 +23629,7 @@ var ViewContractContent = ({
|
|
|
23638
23629
|
break;
|
|
23639
23630
|
case "delete":
|
|
23640
23631
|
if (window.confirm("\xCAtes-vous s\xFBr de vouloir supprimer ce contrat ?")) {
|
|
23641
|
-
onDelete?.(contract.id);
|
|
23632
|
+
onDelete?.(String(contract.id));
|
|
23642
23633
|
}
|
|
23643
23634
|
break;
|
|
23644
23635
|
case "archive":
|
|
@@ -23830,7 +23821,7 @@ var ViewContractContent = ({
|
|
|
23830
23821
|
] }),
|
|
23831
23822
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex justify-between", children: [
|
|
23832
23823
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("dt", { className: "text-sm font-medium text-gray-500", children: "Statut" }),
|
|
23833
|
-
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("dd", { className: "text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
23824
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("dd", { className: "text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Badge2, { variant: getStatusVariant(contract.status) === "error" ? "danger" : getStatusVariant(contract.status) === "success" ? "success" : "info", children: contractStatusLabels[contract.status] || contract.status }) })
|
|
23834
23825
|
] }),
|
|
23835
23826
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex justify-between", children: [
|
|
23836
23827
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("dt", { className: "text-sm font-medium text-gray-500", children: "Cat\xE9gorie" }),
|
|
@@ -23838,7 +23829,7 @@ var ViewContractContent = ({
|
|
|
23838
23829
|
] }),
|
|
23839
23830
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex justify-between", children: [
|
|
23840
23831
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("dt", { className: "text-sm font-medium text-gray-500", children: "Niveau de risque" }),
|
|
23841
|
-
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("dd", { className: "text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
23832
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("dd", { className: "text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Badge2, { variant: contract.risk_level === "critical" || contract.risk_level === "high" ? "danger" : contract.risk_level === "medium" ? "warning" : "success", children: riskLevelLabels[contract.risk_level] }) })
|
|
23842
23833
|
] }),
|
|
23843
23834
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { children: [
|
|
23844
23835
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("dt", { className: "text-sm font-medium text-gray-500 mb-1", children: "Description" }),
|
|
@@ -23854,11 +23845,11 @@ var ViewContractContent = ({
|
|
|
23854
23845
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("dl", { className: "space-y-3", children: [
|
|
23855
23846
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex justify-between", children: [
|
|
23856
23847
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("dt", { className: "text-sm font-medium text-gray-500", children: "Raison sociale" }),
|
|
23857
|
-
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("dd", { className: "text-sm text-gray-900 font-medium", children: contract.supplier_details?.
|
|
23848
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("dd", { className: "text-sm text-gray-900 font-medium", children: contract.supplier_details?.legal_name || "Non d\xE9fini" })
|
|
23858
23849
|
] }),
|
|
23859
23850
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex justify-between", children: [
|
|
23860
23851
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("dt", { className: "text-sm font-medium text-gray-500", children: "Contact principal" }),
|
|
23861
|
-
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("dd", { className: "text-sm text-gray-900", children: contract.supplier_details?.
|
|
23852
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("dd", { className: "text-sm text-gray-900", children: contract.supplier_details?.legal_representative_name || "Non renseign\xE9" })
|
|
23862
23853
|
] }),
|
|
23863
23854
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
23864
23855
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("dt", { className: "text-sm font-medium text-gray-500", children: "Email" }),
|
|
@@ -23914,7 +23905,7 @@ var ViewContractContent = ({
|
|
|
23914
23905
|
] }),
|
|
23915
23906
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex justify-between items-center", children: [
|
|
23916
23907
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("dt", { className: "text-sm font-medium text-gray-500", children: "Renouvellement auto." }),
|
|
23917
|
-
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("dd", { children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
23908
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("dd", { children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Badge2, { variant: contract.auto_renewal ? "success" : "default", children: contract.auto_renewal ? "Activ\xE9" : "D\xE9sactiv\xE9" }) })
|
|
23918
23909
|
] }),
|
|
23919
23910
|
contract.maxRenewalPeriods && /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex justify-between", children: [
|
|
23920
23911
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("dt", { className: "text-sm font-medium text-gray-500", children: "Max. renouvellements" }),
|
|
@@ -23960,7 +23951,7 @@ var ViewContractContent = ({
|
|
|
23960
23951
|
] }),
|
|
23961
23952
|
contract.tags && contract.tags.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(RewiseCard, { className: "p-6", children: [
|
|
23962
23953
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("h3", { className: "text-lg font-semibold text-gray-900 mb-4", children: "Tags et mots-cl\xE9s" }),
|
|
23963
|
-
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "flex flex-wrap gap-2", children: contract.tags.map((tag, index) => /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
23954
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "flex flex-wrap gap-2", children: contract.tags.map((tag, index) => /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Badge2, { variant: "secondary", children: tag }, index)) })
|
|
23964
23955
|
] })
|
|
23965
23956
|
] });
|
|
23966
23957
|
const renderSupplierTab = () => /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "space-y-6", children: [
|
|
@@ -23973,11 +23964,11 @@ var ViewContractContent = ({
|
|
|
23973
23964
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
23974
23965
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { children: [
|
|
23975
23966
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("dt", { className: "text-sm font-medium text-gray-500", children: "Raison sociale" }),
|
|
23976
|
-
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("dd", { className: "text-sm text-gray-900 font-medium mt-1", children: contract.supplier_details?.
|
|
23967
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("dd", { className: "text-sm text-gray-900 font-medium mt-1", children: contract.supplier_details?.legal_name || "Non d\xE9fini" })
|
|
23977
23968
|
] }),
|
|
23978
23969
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { children: [
|
|
23979
23970
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("dt", { className: "text-sm font-medium text-gray-500", children: "SIRET" }),
|
|
23980
|
-
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("dd", { className: "text-sm text-gray-900 mt-1", children: contract.supplier_details?.
|
|
23971
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("dd", { className: "text-sm text-gray-900 mt-1", children: contract.supplier_details?.rccm || "Non renseign\xE9" })
|
|
23981
23972
|
] })
|
|
23982
23973
|
] }),
|
|
23983
23974
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
@@ -24054,7 +24045,7 @@ var ViewContractContent = ({
|
|
|
24054
24045
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("dl", { className: "space-y-3", children: [
|
|
24055
24046
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex justify-between", children: [
|
|
24056
24047
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("dt", { className: "text-sm font-medium text-gray-500", children: "Renouvellement automatique" }),
|
|
24057
|
-
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("dd", { className: "text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
24048
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("dd", { className: "text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Badge2, { variant: contract.auto_renewal ? "success" : "default", children: contract.auto_renewal ? "Oui" : "Non" }) })
|
|
24058
24049
|
] }),
|
|
24059
24050
|
contract.renewal_date && /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex justify-between", children: [
|
|
24060
24051
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("dt", { className: "text-sm font-medium text-gray-500", children: "Date de renouvellement" }),
|
|
@@ -24080,7 +24071,7 @@ var ViewContractContent = ({
|
|
|
24080
24071
|
contract.fm_services && contract.fm_services.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "space-y-4", children: contract.fm_services.map((service, index) => /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "p-4 border rounded-lg", children: [
|
|
24081
24072
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex items-center justify-between mb-2", children: [
|
|
24082
24073
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("h4", { className: "font-medium text-gray-900", children: service.service_type || service.name }),
|
|
24083
|
-
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
24074
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Badge2, { variant: service.is_active ? "success" : "default", children: service.is_active ? "Actif" : "Inactif" })
|
|
24084
24075
|
] }),
|
|
24085
24076
|
service.description && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("p", { className: "text-sm text-gray-600 mb-2", children: service.description }),
|
|
24086
24077
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "grid grid-cols-2 gap-4 text-sm", children: [
|
|
@@ -24200,7 +24191,7 @@ var ViewContractContent = ({
|
|
|
24200
24191
|
"%"
|
|
24201
24192
|
] }),
|
|
24202
24193
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("td", { className: "py-3 text-center", children: formatDate2(milestone.dueDate) }),
|
|
24203
|
-
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("td", { className: "py-3 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
24194
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("td", { className: "py-3 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Badge2, { variant: milestone.status === "paid" ? "success" : milestone.status === "overdue" ? "error" : milestone.status === "invoiced" ? "warning" : "default", children: milestone.status === "paid" ? "Pay\xE9" : milestone.status === "overdue" ? "En retard" : milestone.status === "invoiced" ? "Factur\xE9" : "En attente" }) })
|
|
24204
24195
|
] }, milestone.id)) })
|
|
24205
24196
|
] }) })
|
|
24206
24197
|
] }),
|
|
@@ -24299,7 +24290,7 @@ var ViewContractContent = ({
|
|
|
24299
24290
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("td", { className: "py-3 px-4", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "font-mono text-sm font-semibold text-[#78a6d2]", children: item.reference }) }),
|
|
24300
24291
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("td", { className: "py-3 px-4", children: [
|
|
24301
24292
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("p", { className: "font-medium text-gray-900", children: item.designation }),
|
|
24302
|
-
item.category && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
24293
|
+
item.category && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Badge2, { variant: "secondary", className: "mt-1 text-xs", children: item.category }),
|
|
24303
24294
|
item.notes && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("p", { className: "text-xs text-gray-500 mt-1", children: item.notes })
|
|
24304
24295
|
] }),
|
|
24305
24296
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("td", { className: "py-3 px-4 text-center", children: item.unit }),
|
|
@@ -24308,7 +24299,7 @@ var ViewContractContent = ({
|
|
|
24308
24299
|
item.vatRate,
|
|
24309
24300
|
"%"
|
|
24310
24301
|
] }),
|
|
24311
|
-
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("td", { className: "py-3 px-4 text-center", children: item.discount && item.discount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
24302
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("td", { className: "py-3 px-4 text-center", children: item.discount && item.discount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(Badge2, { variant: "success", children: [
|
|
24312
24303
|
"-",
|
|
24313
24304
|
item.discount,
|
|
24314
24305
|
"%"
|
|
@@ -24427,7 +24418,7 @@ var ViewContractContent = ({
|
|
|
24427
24418
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("p", { className: "text-xs text-gray-600", children: "Destination" })
|
|
24428
24419
|
] })
|
|
24429
24420
|
] }),
|
|
24430
|
-
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "mt-4 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
24421
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "mt-4 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(Badge2, { variant: "info", children: [
|
|
24431
24422
|
"Transfert des risques: ",
|
|
24432
24423
|
contract.incoterm
|
|
24433
24424
|
] }) })
|
|
@@ -24450,7 +24441,7 @@ var ViewContractContent = ({
|
|
|
24450
24441
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("h4", { className: "font-medium text-gray-900", children: guarantee.type === "performance_bond" ? "Garantie de bonne ex\xE9cution" : guarantee.type === "advance_payment" ? "Garantie de restitution d'acompte" : guarantee.type === "retention" ? "Garantie de retenue" : guarantee.type === "bid_bond" ? "Garantie de soumission" : guarantee.type === "warranty" ? "Garantie de maintenance" : guarantee.type === "bank_guarantee" ? "Garantie bancaire" : "Garantie soci\xE9t\xE9 m\xE8re" }),
|
|
24451
24442
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("p", { className: "text-sm text-gray-500", children: guarantee.description })
|
|
24452
24443
|
] }),
|
|
24453
|
-
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
24444
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Badge2, { variant: guarantee.status === "active" ? "success" : guarantee.status === "released" ? "info" : guarantee.status === "expired" ? "error" : guarantee.status === "called" ? "error" : "default", children: guarantee.status === "active" ? "Active" : guarantee.status === "released" ? "Lib\xE9r\xE9e" : guarantee.status === "expired" ? "Expir\xE9e" : guarantee.status === "called" ? "Appel\xE9e" : "En attente" })
|
|
24454
24445
|
] }),
|
|
24455
24446
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "grid grid-cols-2 md:grid-cols-4 gap-4 text-sm", children: [
|
|
24456
24447
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { children: [
|
|
@@ -24495,7 +24486,7 @@ var ViewContractContent = ({
|
|
|
24495
24486
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("h4", { className: "font-medium text-gray-900", children: insurance.type === "liability" ? "Responsabilit\xE9 civile" : insurance.type === "professional" ? "Responsabilit\xE9 professionnelle" : insurance.type === "property" ? "Assurance biens" : insurance.type === "cyber" ? "Cyber-assurance" : insurance.type === "product" ? "Responsabilit\xE9 produit" : insurance.type === "environmental" ? "Assurance environnementale" : insurance.type === "workers_comp" ? "Accidents du travail" : "Assurance automobile" }),
|
|
24496
24487
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("p", { className: "text-sm text-gray-500", children: insurance.description })
|
|
24497
24488
|
] }),
|
|
24498
|
-
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
24489
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Badge2, { variant: insurance.status === "compliant" ? "success" : insurance.status === "expired" ? "error" : insurance.status === "non_compliant" ? "error" : insurance.status === "pending" ? "warning" : "default", children: insurance.status === "compliant" ? "Conforme" : insurance.status === "expired" ? "Expir\xE9e" : insurance.status === "non_compliant" ? "Non conforme" : insurance.status === "pending" ? "En attente" : "Requise" })
|
|
24499
24490
|
] }),
|
|
24500
24491
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "grid grid-cols-2 md:grid-cols-4 gap-4 text-sm", children: [
|
|
24501
24492
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { children: [
|
|
@@ -24582,7 +24573,7 @@ var ViewContractContent = ({
|
|
|
24582
24573
|
] })
|
|
24583
24574
|
] }),
|
|
24584
24575
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "text-right", children: [
|
|
24585
|
-
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
24576
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Badge2, { variant: approver.status === "approved" ? "success" : approver.status === "rejected" ? "error" : "default", children: approver.status === "approved" ? "Approuv\xE9" : approver.status === "rejected" ? "Rejet\xE9" : "En attente" }),
|
|
24586
24577
|
approver.approvalDate && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("p", { className: "text-xs text-gray-500 mt-1", children: formatDate2(approver.approvalDate) })
|
|
24587
24578
|
] })
|
|
24588
24579
|
] }, index)) })
|
|
@@ -24601,7 +24592,7 @@ var ViewContractContent = ({
|
|
|
24601
24592
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("th", { className: "text-center py-2 text-gray-500", children: "D\xE9lai r\xE9ponse" })
|
|
24602
24593
|
] }) }),
|
|
24603
24594
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("tbody", { children: contract.governance.escalationMatrix.map((level, index) => /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("tr", { className: "border-b border-gray-100", children: [
|
|
24604
|
-
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("td", { className: "py-3", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
24595
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("td", { className: "py-3", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(Badge2, { variant: level.level === 1 ? "info" : level.level === 2 ? "warning" : "error", children: [
|
|
24605
24596
|
"Niveau ",
|
|
24606
24597
|
level.level
|
|
24607
24598
|
] }) }),
|
|
@@ -24625,7 +24616,7 @@ var ViewContractContent = ({
|
|
|
24625
24616
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("p", { className: "font-medium text-gray-900", children: member.name }),
|
|
24626
24617
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("p", { className: "text-xs text-gray-500", children: member.role })
|
|
24627
24618
|
] }),
|
|
24628
|
-
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
24619
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Badge2, { variant: member.organization === "buyer" ? "info" : "secondary", children: member.organization === "buyer" ? "Acheteur" : "Fournisseur" })
|
|
24629
24620
|
] }, index)) })
|
|
24630
24621
|
] }),
|
|
24631
24622
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { children: [
|
|
@@ -24684,7 +24675,7 @@ var ViewContractContent = ({
|
|
|
24684
24675
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "border border-gray-200 rounded-lg p-4", children: [
|
|
24685
24676
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex items-center justify-between mb-3", children: [
|
|
24686
24677
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("h4", { className: "font-medium text-gray-900", children: "RGPD" }),
|
|
24687
|
-
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
24678
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Badge2, { variant: contract.regulatoryCompliance.gdprCompliance?.status === "compliant" ? "success" : contract.regulatoryCompliance.gdprCompliance?.status === "not_applicable" ? "default" : "error", children: contract.regulatoryCompliance.gdprCompliance?.status === "compliant" ? "Conforme" : contract.regulatoryCompliance.gdprCompliance?.status === "not_applicable" ? "N/A" : "Non conforme" })
|
|
24688
24679
|
] }),
|
|
24689
24680
|
contract.regulatoryCompliance.gdprCompliance?.applicable && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "space-y-2 text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex items-center", children: [
|
|
24690
24681
|
contract.regulatoryCompliance.gdprCompliance.dataProcessingAgreement ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_lucide_react65.CheckCircle, { className: "w-4 h-4 text-green-500 mr-2" }) : /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_lucide_react65.AlertCircle, { className: "w-4 h-4 text-red-500 mr-2" }),
|
|
@@ -24694,7 +24685,7 @@ var ViewContractContent = ({
|
|
|
24694
24685
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "border border-gray-200 rounded-lg p-4", children: [
|
|
24695
24686
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex items-center justify-between mb-3", children: [
|
|
24696
24687
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("h4", { className: "font-medium text-gray-900", children: "Anti-corruption" }),
|
|
24697
|
-
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
24688
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Badge2, { variant: contract.regulatoryCompliance.antiCorruption?.status === "compliant" ? "success" : contract.regulatoryCompliance.antiCorruption?.status === "not_applicable" ? "default" : "error", children: contract.regulatoryCompliance.antiCorruption?.status === "compliant" ? "Conforme" : contract.regulatoryCompliance.antiCorruption?.status === "not_applicable" ? "N/A" : "Non conforme" })
|
|
24698
24689
|
] }),
|
|
24699
24690
|
contract.regulatoryCompliance.antiCorruption?.applicable && /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "space-y-2 text-sm", children: [
|
|
24700
24691
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex items-center", children: [
|
|
@@ -24710,7 +24701,7 @@ var ViewContractContent = ({
|
|
|
24710
24701
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "border border-gray-200 rounded-lg p-4", children: [
|
|
24711
24702
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex items-center justify-between mb-3", children: [
|
|
24712
24703
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("h4", { className: "font-medium text-gray-900", children: "Sanctions" }),
|
|
24713
|
-
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
24704
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Badge2, { variant: contract.regulatoryCompliance.sanctionsScreening?.status === "clear" ? "success" : contract.regulatoryCompliance.sanctionsScreening?.status === "pending" ? "warning" : "error", children: contract.regulatoryCompliance.sanctionsScreening?.status === "clear" ? "OK" : contract.regulatoryCompliance.sanctionsScreening?.status === "pending" ? "En cours" : contract.regulatoryCompliance.sanctionsScreening?.status === "flagged" ? "Signal\xE9" : "Bloqu\xE9" })
|
|
24714
24705
|
] }),
|
|
24715
24706
|
contract.regulatoryCompliance.sanctionsScreening?.lastScreeningDate && /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("p", { className: "text-sm text-gray-500", children: [
|
|
24716
24707
|
"Dernier contr\xF4le: ",
|
|
@@ -24737,7 +24728,7 @@ var ViewContractContent = ({
|
|
|
24737
24728
|
"Score: ",
|
|
24738
24729
|
risk.riskScore
|
|
24739
24730
|
] }),
|
|
24740
|
-
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
24731
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Badge2, { variant: risk.mitigationStatus === "implemented" ? "success" : risk.mitigationStatus === "in_progress" ? "warning" : "default", children: risk.mitigationStatus === "implemented" ? "Mitig\xE9" : risk.mitigationStatus === "in_progress" ? "En cours" : risk.mitigationStatus === "monitoring" ? "Surveillance" : "Planifi\xE9" })
|
|
24741
24732
|
] })
|
|
24742
24733
|
] }),
|
|
24743
24734
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("p", { className: "text-sm text-gray-600 mb-2", children: risk.description }),
|
|
@@ -24829,7 +24820,7 @@ var ViewContractContent = ({
|
|
|
24829
24820
|
] }),
|
|
24830
24821
|
contract.esgCriteria.environmental?.certifications && contract.esgCriteria.environmental.certifications.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "mt-3 pt-3 border-t border-gray-200", children: [
|
|
24831
24822
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("p", { className: "text-xs text-gray-500 mb-2", children: "Certifications" }),
|
|
24832
|
-
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "flex flex-wrap gap-1", children: contract.esgCriteria.environmental.certifications.map((cert, i) => /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
24823
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "flex flex-wrap gap-1", children: contract.esgCriteria.environmental.certifications.map((cert, i) => /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Badge2, { variant: "secondary", className: "text-xs", children: cert }, i)) })
|
|
24833
24824
|
] })
|
|
24834
24825
|
] })
|
|
24835
24826
|
] }),
|
|
@@ -24857,7 +24848,7 @@ var ViewContractContent = ({
|
|
|
24857
24848
|
] }),
|
|
24858
24849
|
contract.esgCriteria.social?.certifications && contract.esgCriteria.social.certifications.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "mt-3 pt-3 border-t border-gray-200", children: [
|
|
24859
24850
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("p", { className: "text-xs text-gray-500 mb-2", children: "Certifications" }),
|
|
24860
|
-
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "flex flex-wrap gap-1", children: contract.esgCriteria.social.certifications.map((cert, i) => /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
24851
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "flex flex-wrap gap-1", children: contract.esgCriteria.social.certifications.map((cert, i) => /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Badge2, { variant: "secondary", className: "text-xs", children: cert }, i)) })
|
|
24861
24852
|
] })
|
|
24862
24853
|
] })
|
|
24863
24854
|
] }),
|
|
@@ -24890,8 +24881,8 @@ var ViewContractContent = ({
|
|
|
24890
24881
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("h3", { className: "text-lg font-semibold text-gray-900 mb-4", children: "Alignement avec les Objectifs de D\xE9veloppement Durable (ODD)" }),
|
|
24891
24882
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "flex flex-wrap gap-2", children: contract.esgCriteria.sdgAlignment.map((sdg) => /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "px-3 py-2 bg-blue-50 rounded-lg text-center", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("p", { className: "text-lg font-bold text-blue-600", children: [
|
|
24892
24883
|
"ODD ",
|
|
24893
|
-
sdg
|
|
24894
|
-
] }) }, sdg)) })
|
|
24884
|
+
sdg.goal
|
|
24885
|
+
] }) }, sdg.goal)) })
|
|
24895
24886
|
] })
|
|
24896
24887
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(RewiseCard, { className: "p-8 text-center", children: [
|
|
24897
24888
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_lucide_react65.Leaf, { className: "w-16 h-16 text-gray-400 mx-auto mb-4" }),
|
|
@@ -24924,11 +24915,11 @@ var ViewContractContent = ({
|
|
|
24924
24915
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex-1", children: [
|
|
24925
24916
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex items-center space-x-2 mb-1", children: [
|
|
24926
24917
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("h4", { className: "font-medium text-gray-900", children: obligation.title }),
|
|
24927
|
-
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
24918
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Badge2, { variant: obligation.obligor === "buyer" ? "info" : obligation.obligor === "supplier" ? "secondary" : "default", children: obligation.obligor === "buyer" ? "Acheteur" : obligation.obligor === "supplier" ? "Fournisseur" : "Partag\xE9e" })
|
|
24928
24919
|
] }),
|
|
24929
24920
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("p", { className: "text-sm text-gray-600", children: obligation.description })
|
|
24930
24921
|
] }),
|
|
24931
|
-
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
24922
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Badge2, { variant: obligation.status === "completed" ? "success" : obligation.status === "overdue" ? "error" : obligation.status === "in_progress" ? "warning" : "default", children: obligation.status === "completed" ? "Termin\xE9e" : obligation.status === "overdue" ? "En retard" : obligation.status === "in_progress" ? "En cours" : obligation.status === "waived" ? "Annul\xE9e" : "En attente" })
|
|
24932
24923
|
] }),
|
|
24933
24924
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex items-center space-x-4 text-sm text-gray-500", children: [
|
|
24934
24925
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "capitalize", children: obligation.type.replace("_", " ") }),
|
|
@@ -24950,7 +24941,7 @@ var ViewContractContent = ({
|
|
|
24950
24941
|
obligation.responsiblePerson
|
|
24951
24942
|
] })
|
|
24952
24943
|
] }),
|
|
24953
|
-
obligation.priority === "critical" || obligation.priority === "high" ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "mt-2", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
24944
|
+
obligation.priority === "critical" || obligation.priority === "high" ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "mt-2", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(Badge2, { variant: obligation.priority === "critical" ? "error" : "warning", children: [
|
|
24954
24945
|
"Priorit\xE9 ",
|
|
24955
24946
|
obligation.priority === "critical" ? "critique" : "haute"
|
|
24956
24947
|
] }) }) : null
|
|
@@ -24968,7 +24959,7 @@ var ViewContractContent = ({
|
|
|
24968
24959
|
contract.sla_indicators?.length || 0,
|
|
24969
24960
|
")"
|
|
24970
24961
|
] }),
|
|
24971
|
-
onOpenSLA && /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
24962
|
+
onOpenSLA && /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(Button, { onClick: () => onOpenSLA(contract), children: [
|
|
24972
24963
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_lucide_react65.BarChart3, { className: "w-4 h-4 mr-2" }),
|
|
24973
24964
|
"G\xE9rer les SLA"
|
|
24974
24965
|
] })
|
|
@@ -24979,41 +24970,41 @@ var ViewContractContent = ({
|
|
|
24979
24970
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("h4", { className: "font-medium text-gray-900", children: sla.name }),
|
|
24980
24971
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("p", { className: "text-sm text-gray-500", children: sla.description })
|
|
24981
24972
|
] }),
|
|
24982
|
-
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
24973
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Badge2, { variant: sla.status === "achieved" ? "success" : sla.status === "warning" ? "warning" : "error", children: sla.status === "achieved" ? "Atteint" : sla.status === "warning" ? "Attention" : "Non atteint" })
|
|
24983
24974
|
] }),
|
|
24984
24975
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "mb-3", children: [
|
|
24985
24976
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex items-center justify-between text-sm mb-1", children: [
|
|
24986
24977
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "text-gray-500", children: "Performance" }),
|
|
24987
24978
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("span", { className: "font-medium", children: [
|
|
24988
|
-
sla.
|
|
24979
|
+
sla.current_value || 0,
|
|
24989
24980
|
" / ",
|
|
24990
|
-
sla.
|
|
24981
|
+
sla.target_value,
|
|
24991
24982
|
" ",
|
|
24992
|
-
sla.
|
|
24983
|
+
sla.measurement_unit
|
|
24993
24984
|
] })
|
|
24994
24985
|
] }),
|
|
24995
24986
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "bg-gray-200 rounded-full h-2", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
24996
24987
|
"div",
|
|
24997
24988
|
{
|
|
24998
24989
|
className: `h-2 rounded-full ${sla.status === "achieved" ? "bg-green-500" : sla.status === "warning" ? "bg-yellow-500" : "bg-red-500"}`,
|
|
24999
|
-
style: { width: `${Math.min(100, (sla.
|
|
24990
|
+
style: { width: `${Math.min(100, (sla.current_value || 0) / (sla.target_value || 1) * 100)}%` }
|
|
25000
24991
|
}
|
|
25001
24992
|
) })
|
|
25002
24993
|
] }),
|
|
25003
24994
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex items-center space-x-4 text-sm text-gray-500", children: [
|
|
25004
24995
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("span", { children: [
|
|
25005
24996
|
"Fr\xE9quence: ",
|
|
25006
|
-
sla.
|
|
24997
|
+
sla.measurement_frequency === "daily" ? "Quotidien" : sla.measurement_frequency === "weekly" ? "Hebdomadaire" : sla.measurement_frequency === "monthly" ? "Mensuel" : sla.measurement_frequency === "quarterly" ? "Trimestriel" : "Annuel"
|
|
25007
24998
|
] }),
|
|
25008
|
-
sla.
|
|
24999
|
+
sla.last_evaluation && /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("span", { children: [
|
|
25009
25000
|
"Derni\xE8re mesure: ",
|
|
25010
|
-
formatDate2(sla.
|
|
25001
|
+
formatDate2(sla.last_evaluation)
|
|
25011
25002
|
] })
|
|
25012
25003
|
] })
|
|
25013
25004
|
] }, sla.id)) }) : /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(RewiseCard, { className: "p-8 text-center", children: [
|
|
25014
25005
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_lucide_react65.TrendingUp, { className: "w-12 h-12 text-gray-400 mx-auto mb-4" }),
|
|
25015
25006
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("p", { className: "text-gray-500 mb-4", children: "Aucun indicateur SLA d\xE9fini pour ce contrat" }),
|
|
25016
|
-
onOpenSLA && /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
25007
|
+
onOpenSLA && /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(Button, { onClick: () => onOpenSLA(contract), children: [
|
|
25017
25008
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_lucide_react65.Target, { className: "w-4 h-4 mr-2" }),
|
|
25018
25009
|
"Configurer les SLA"
|
|
25019
25010
|
] })
|
|
@@ -25080,15 +25071,15 @@ var ViewContractContent = ({
|
|
|
25080
25071
|
] }),
|
|
25081
25072
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex items-center gap-6", children: [
|
|
25082
25073
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
25083
|
-
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
25074
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Badge2, { variant: "success", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("span", { className: "flex items-center gap-1", children: [
|
|
25084
25075
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_lucide_react65.CheckCircle, { className: "w-3 h-3" }),
|
|
25085
25076
|
session.achieved_count
|
|
25086
25077
|
] }) }),
|
|
25087
|
-
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
25078
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Badge2, { variant: "warning", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("span", { className: "flex items-center gap-1", children: [
|
|
25088
25079
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_lucide_react65.AlertTriangle, { className: "w-3 h-3" }),
|
|
25089
25080
|
session.warning_count
|
|
25090
25081
|
] }) }),
|
|
25091
|
-
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
25082
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Badge2, { variant: "danger", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("span", { className: "flex items-center gap-1", children: [
|
|
25092
25083
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_lucide_react65.AlertCircle, { className: "w-3 h-3" }),
|
|
25093
25084
|
session.failed_count
|
|
25094
25085
|
] }) })
|
|
@@ -25117,7 +25108,7 @@ var ViewContractContent = ({
|
|
|
25117
25108
|
] })
|
|
25118
25109
|
] });
|
|
25119
25110
|
})(),
|
|
25120
|
-
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
25111
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Badge2, { variant: session.status === "validated" ? "success" : session.status === "completed" ? "info" : "default", children: session.status === "validated" ? "Valid\xE9e" : session.status === "completed" ? "Termin\xE9e" : "Brouillon" }),
|
|
25121
25112
|
session.evaluated_by_name && /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex items-center gap-1 text-sm text-gray-500", children: [
|
|
25122
25113
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_lucide_react65.User, { className: "w-4 h-4" }),
|
|
25123
25114
|
session.evaluated_by_name
|
|
@@ -25190,7 +25181,7 @@ var ViewContractContent = ({
|
|
|
25190
25181
|
]
|
|
25191
25182
|
}
|
|
25192
25183
|
) }),
|
|
25193
|
-
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("td", { className: "px-4 py-2 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
25184
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("td", { className: "px-4 py-2 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Badge2, { variant: evaluation.status === "achieved" ? "success" : evaluation.status === "warning" ? "warning" : "danger", children: evaluation.status === "achieved" ? "Atteint" : evaluation.status === "warning" ? "Attention" : "Non atteint" }) }),
|
|
25194
25185
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("td", { className: "px-4 py-2 truncate max-w-xs text-gray-500", children: evaluation.comments || "-" })
|
|
25195
25186
|
] }, evaluation.id);
|
|
25196
25187
|
}) })
|
|
@@ -25224,9 +25215,9 @@ var ViewContractContent = ({
|
|
|
25224
25215
|
] })
|
|
25225
25216
|
] }),
|
|
25226
25217
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex items-center space-x-2", children: [
|
|
25227
|
-
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
25228
|
-
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
25229
|
-
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
25218
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Badge2, { variant: "default", children: doc.type === "contract" ? "Contrat" : doc.type === "annex" ? "Annexe" : doc.type === "amendment" ? "Avenant" : doc.type === "sla" ? "SLA" : doc.type === "evaluation" ? "\xC9valuation" : doc.type === "certificate" ? "Certificat" : "Autre" }),
|
|
25219
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Button, { variant: "text", size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_lucide_react65.Eye, { className: "w-4 h-4" }) }),
|
|
25220
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Button, { variant: "text", size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_lucide_react65.Download, { className: "w-4 h-4" }) })
|
|
25230
25221
|
] })
|
|
25231
25222
|
] }) }, doc.id)) })
|
|
25232
25223
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(RewiseCard, { className: "p-8 text-center", children: [
|
|
@@ -25245,7 +25236,7 @@ var ViewContractContent = ({
|
|
|
25245
25236
|
"Avenant ",
|
|
25246
25237
|
amendment.number
|
|
25247
25238
|
] }),
|
|
25248
|
-
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
25239
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Badge2, { variant: amendment.status === "active" ? "success" : amendment.status === "approved" ? "info" : "default", children: amendment.status === "active" ? "Actif" : amendment.status === "approved" ? "Approuv\xE9" : "Brouillon" })
|
|
25249
25240
|
] }),
|
|
25250
25241
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("p", { className: "text-sm text-gray-600 mb-2", children: amendment.description }),
|
|
25251
25242
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("p", { className: "text-xs text-gray-500", children: [
|
|
@@ -25294,14 +25285,14 @@ var ViewContractContent = ({
|
|
|
25294
25285
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("p", { className: "text-sm text-[#283042]/60 mt-1", children: [
|
|
25295
25286
|
contract.number,
|
|
25296
25287
|
" \u2022 ",
|
|
25297
|
-
contract.supplier_details?.
|
|
25288
|
+
contract.supplier_details?.legal_name || "Fournisseur non d\xE9fini"
|
|
25298
25289
|
] })
|
|
25299
25290
|
] }),
|
|
25300
|
-
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
25291
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Badge2, { variant: getStatusVariant(contract.status), children: contractStatusLabels[contract.status] })
|
|
25301
25292
|
] }),
|
|
25302
25293
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex items-center space-x-2", children: [
|
|
25303
25294
|
onEdit && /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
25304
|
-
|
|
25295
|
+
Button,
|
|
25305
25296
|
{
|
|
25306
25297
|
variant: "outline",
|
|
25307
25298
|
size: "sm",
|
|
@@ -25313,7 +25304,7 @@ var ViewContractContent = ({
|
|
|
25313
25304
|
}
|
|
25314
25305
|
),
|
|
25315
25306
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
25316
|
-
|
|
25307
|
+
Button,
|
|
25317
25308
|
{
|
|
25318
25309
|
variant: "outline",
|
|
25319
25310
|
size: "sm",
|
|
@@ -25325,7 +25316,7 @@ var ViewContractContent = ({
|
|
|
25325
25316
|
}
|
|
25326
25317
|
),
|
|
25327
25318
|
onDelete && /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
25328
|
-
|
|
25319
|
+
Button,
|
|
25329
25320
|
{
|
|
25330
25321
|
variant: "outline",
|
|
25331
25322
|
size: "sm",
|
|
@@ -25352,7 +25343,7 @@ var ViewContractContent = ({
|
|
|
25352
25343
|
] })
|
|
25353
25344
|
] }),
|
|
25354
25345
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
25355
|
-
|
|
25346
|
+
Button,
|
|
25356
25347
|
{
|
|
25357
25348
|
variant: "outline",
|
|
25358
25349
|
size: "sm",
|
|
@@ -25389,7 +25380,7 @@ var ViewContractContent = ({
|
|
|
25389
25380
|
] }),
|
|
25390
25381
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex items-center justify-end space-x-3 p-6 border-t border-gray-200", children: [
|
|
25391
25382
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
25392
|
-
|
|
25383
|
+
Button,
|
|
25393
25384
|
{
|
|
25394
25385
|
variant: "outline",
|
|
25395
25386
|
onClick: () => handleAction("archive"),
|
|
@@ -25401,7 +25392,7 @@ var ViewContractContent = ({
|
|
|
25401
25392
|
}
|
|
25402
25393
|
),
|
|
25403
25394
|
isExpiringSoon && /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
25404
|
-
|
|
25395
|
+
Button,
|
|
25405
25396
|
{
|
|
25406
25397
|
variant: "primary",
|
|
25407
25398
|
onClick: () => handleAction("renew"),
|
|
@@ -27522,7 +27513,7 @@ var ContractModal = ({
|
|
|
27522
27513
|
};
|
|
27523
27514
|
if (mode === "view") {
|
|
27524
27515
|
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
27525
|
-
|
|
27516
|
+
Modal,
|
|
27526
27517
|
{
|
|
27527
27518
|
title: contractData?.title ?? "",
|
|
27528
27519
|
open: isOpen,
|
|
@@ -27542,7 +27533,7 @@ var ContractModal = ({
|
|
|
27542
27533
|
);
|
|
27543
27534
|
}
|
|
27544
27535
|
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
27545
|
-
|
|
27536
|
+
Modal,
|
|
27546
27537
|
{
|
|
27547
27538
|
title: mode === "edit" ? "Modifier le Contrat" : "Cr\xE9er un Nouveau Contrat",
|
|
27548
27539
|
open: isOpen,
|
|
@@ -27567,7 +27558,7 @@ var ContractModal = ({
|
|
|
27567
27558
|
var import_react75 = require("react");
|
|
27568
27559
|
var import_lucide_react67 = require("lucide-react");
|
|
27569
27560
|
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
27570
|
-
var
|
|
27561
|
+
var Badge3 = ({
|
|
27571
27562
|
children,
|
|
27572
27563
|
className = "",
|
|
27573
27564
|
variant = "default"
|
|
@@ -27621,7 +27612,7 @@ var ContractReportsModal = ({
|
|
|
27621
27612
|
(c) => (c.supplier_details?.id?.toString() || c.supplier?.toString()) === supplierId
|
|
27622
27613
|
);
|
|
27623
27614
|
return {
|
|
27624
|
-
supplier: contract?.supplier_details || { id: Number(supplierId),
|
|
27615
|
+
supplier: contract?.supplier_details || { id: Number(supplierId), legal_name: "Inconnu", vendor_number: "" },
|
|
27625
27616
|
...stats
|
|
27626
27617
|
};
|
|
27627
27618
|
}).sort((a, b) => b.avgScore - a.avgScore);
|
|
@@ -27692,7 +27683,7 @@ var ContractReportsModal = ({
|
|
|
27692
27683
|
};
|
|
27693
27684
|
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
27694
27685
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex items-center space-x-3", children: [
|
|
27695
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
27686
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Badge3, { variant: status === "active" ? "default" : "outline", children: statusLabels[status] || status }),
|
|
27696
27687
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("span", { className: "text-sm text-gray-600", children: [
|
|
27697
27688
|
count,
|
|
27698
27689
|
" contrats"
|
|
@@ -27720,7 +27711,7 @@ var ContractReportsModal = ({
|
|
|
27720
27711
|
getExpiringContracts().slice(0, 5).map((contract) => /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex items-center justify-between p-3 bg-orange-50 rounded-lg", children: [
|
|
27721
27712
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { children: [
|
|
27722
27713
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("p", { className: "font-medium", children: contract.number || contract.id }),
|
|
27723
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("p", { className: "text-sm text-gray-600", children: contract.supplier_details?.
|
|
27714
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("p", { className: "text-sm text-gray-600", children: contract.supplier_details?.legal_name || "Non d\xE9fini" })
|
|
27724
27715
|
] }),
|
|
27725
27716
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "text-right", children: [
|
|
27726
27717
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("p", { className: "text-sm text-orange-600 font-medium", children: contract.end_date ? new Date(contract.end_date).toLocaleDateString("fr-FR") : "N/A" }),
|
|
@@ -27741,8 +27732,8 @@ var ContractReportsModal = ({
|
|
|
27741
27732
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "space-y-4", children: getSupplierPerformance().slice(0, 10).map((supplier) => /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex items-center justify-between p-4 bg-gray-50 rounded-lg", children: [
|
|
27742
27733
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex-1", children: [
|
|
27743
27734
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex items-center space-x-3 mb-2", children: [
|
|
27744
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("h4", { className: "font-medium", children: supplier?.supplier?.
|
|
27745
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
|
|
27735
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("h4", { className: "font-medium", children: supplier?.supplier?.legal_name || "Non d\xE9fini" }),
|
|
27736
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(Badge3, { variant: "outline", children: [
|
|
27746
27737
|
supplier.totalContracts,
|
|
27747
27738
|
" contrats"
|
|
27748
27739
|
] })
|
|
@@ -27761,7 +27752,7 @@ var ContractReportsModal = ({
|
|
|
27761
27752
|
] })
|
|
27762
27753
|
] })
|
|
27763
27754
|
] }),
|
|
27764
|
-
supplier.slaBreaches > 0 && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "ml-4", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
|
|
27755
|
+
supplier.slaBreaches > 0 && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "ml-4", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(Badge3, { variant: "outline", className: "text-red-600", children: [
|
|
27765
27756
|
supplier.slaBreaches,
|
|
27766
27757
|
" violations SLA"
|
|
27767
27758
|
] }) })
|
|
@@ -27789,9 +27780,9 @@ var ContractReportsModal = ({
|
|
|
27789
27780
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex items-start justify-between mb-3", children: [
|
|
27790
27781
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { children: [
|
|
27791
27782
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("h4", { className: "font-medium", children: contract.number || contract.id }),
|
|
27792
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("p", { className: "text-sm text-gray-600", children: contract.supplier_details?.
|
|
27783
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("p", { className: "text-sm text-gray-600", children: contract.supplier_details?.legal_name || "Non d\xE9fini" })
|
|
27793
27784
|
] }),
|
|
27794
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
27785
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Badge3, { className: slaStatus === "achieved" ? "text-green-600 bg-green-100" : slaStatus === "warning" ? "text-yellow-600 bg-yellow-100" : "text-red-600 bg-red-100", children: slaStatus === "achieved" ? "Atteint" : slaStatus === "warning" ? "Attention" : slaStatus === "failed" ? "\xC9chou\xE9" : "N/A" })
|
|
27795
27786
|
] }),
|
|
27796
27787
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "grid grid-cols-2 gap-4 text-sm", children: [
|
|
27797
27788
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { children: [
|
|
@@ -27825,7 +27816,7 @@ var ContractReportsModal = ({
|
|
|
27825
27816
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "space-y-4", children: getSupplierPerformance().map((supplier) => /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "p-4 border rounded-lg", children: [
|
|
27826
27817
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex items-start justify-between mb-4", children: [
|
|
27827
27818
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { children: [
|
|
27828
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("h4", { className: "font-medium text-lg", children: supplier?.supplier?.
|
|
27819
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("h4", { className: "font-medium text-lg", children: supplier?.supplier?.legal_name || "Non d\xE9fini" }),
|
|
27829
27820
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("p", { className: "text-sm text-gray-600", children: [
|
|
27830
27821
|
supplier.totalContracts,
|
|
27831
27822
|
" contrat",
|
|
@@ -27847,7 +27838,7 @@ var ContractReportsModal = ({
|
|
|
27847
27838
|
] }),
|
|
27848
27839
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { children: [
|
|
27849
27840
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("p", { className: "text-sm text-gray-500", children: "Statut" }),
|
|
27850
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
27841
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Badge3, { className: supplier.avgScore >= 80 ? "text-green-600 bg-green-100" : supplier.avgScore >= 60 ? "text-yellow-600 bg-yellow-100" : "text-red-600 bg-red-100", children: supplier.avgScore >= 80 ? "Excellent" : supplier.avgScore >= 60 ? "Satisfaisant" : "\uFFFD am\uFFFDliorer" })
|
|
27851
27842
|
] })
|
|
27852
27843
|
] })
|
|
27853
27844
|
] }, supplier?.supplier?.id || "unknown")) })
|
|
@@ -27905,7 +27896,7 @@ var ContractReportsModal = ({
|
|
|
27905
27896
|
};
|
|
27906
27897
|
}).sort((a, b) => b.totalValue - a.totalValue).slice(0, 10).map((supplier) => /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
27907
27898
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex items-center space-x-3", children: [
|
|
27908
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: "font-medium", children: supplier?.supplier?.
|
|
27899
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: "font-medium", children: supplier?.supplier?.legal_name || "Non d\xE9fini" }),
|
|
27909
27900
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("span", { className: "text-sm text-gray-600", children: [
|
|
27910
27901
|
supplier.totalContracts,
|
|
27911
27902
|
" contrats"
|
|
@@ -27941,7 +27932,7 @@ var ContractReportsModal = ({
|
|
|
27941
27932
|
];
|
|
27942
27933
|
if (!isOpen) return null;
|
|
27943
27934
|
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
27944
|
-
|
|
27935
|
+
Modal,
|
|
27945
27936
|
{
|
|
27946
27937
|
open: isOpen,
|
|
27947
27938
|
onClose,
|
|
@@ -27985,12 +27976,13 @@ var ContractReportsModal = ({
|
|
|
27985
27976
|
var import_react76 = require("react");
|
|
27986
27977
|
var import_lucide_react68 = require("lucide-react");
|
|
27987
27978
|
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
27988
|
-
var
|
|
27979
|
+
var Button2 = ({ children, onClick, variant = "default", size = "md", className = "" }) => {
|
|
27989
27980
|
const baseStyles = "inline-flex items-center justify-center font-medium rounded-lg transition-colors";
|
|
27990
27981
|
const variantStyles2 = {
|
|
27991
27982
|
default: "bg-blue-600 text-white hover:bg-blue-700",
|
|
27992
27983
|
outline: "border border-gray-300 bg-white text-gray-700 hover:bg-gray-50",
|
|
27993
|
-
ghost: "text-gray-700 hover:bg-gray-100"
|
|
27984
|
+
ghost: "text-gray-700 hover:bg-gray-100",
|
|
27985
|
+
text: "text-gray-700 hover:bg-gray-100"
|
|
27994
27986
|
};
|
|
27995
27987
|
const sizeStyles = {
|
|
27996
27988
|
sm: "px-2 py-1 text-xs",
|
|
@@ -27999,7 +27991,7 @@ var Button3 = ({ children, onClick, variant = "default", size = "md", className
|
|
|
27999
27991
|
};
|
|
28000
27992
|
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("button", { onClick, className: `${baseStyles} ${variantStyles2[variant]} ${sizeStyles[size]} ${className}`, children });
|
|
28001
27993
|
};
|
|
28002
|
-
var
|
|
27994
|
+
var Badge4 = ({
|
|
28003
27995
|
children,
|
|
28004
27996
|
className = "",
|
|
28005
27997
|
variant = "default"
|
|
@@ -28103,7 +28095,7 @@ var AlertsManagementModal = ({
|
|
|
28103
28095
|
type: "evaluation_due",
|
|
28104
28096
|
priority: "medium",
|
|
28105
28097
|
title: "\xC9valuation fournisseur requise",
|
|
28106
|
-
message: `Le fournisseur "${contract.supplier_details?.
|
|
28098
|
+
message: `Le fournisseur "${contract.supplier_details?.legal_name || "Non d\xE9fini"}" devrait \xEAtre \xE9valu\xE9 avant l'expiration du contrat`,
|
|
28107
28099
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
28108
28100
|
isRead: false,
|
|
28109
28101
|
actions: ["schedule_evaluation"]
|
|
@@ -28251,22 +28243,22 @@ var AlertsManagementModal = ({
|
|
|
28251
28243
|
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "flex-1", children: [
|
|
28252
28244
|
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "flex items-center space-x-2 mb-1", children: [
|
|
28253
28245
|
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("h4", { className: "font-medium text-gray-900", children: alert2.title }),
|
|
28254
|
-
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
28255
|
-
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
28246
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Badge4, { className: getPriorityColor(alert2.priority), children: getPriorityLabel(alert2.priority) }),
|
|
28247
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Badge4, { variant: "outline", children: getAlertTypeLabel(alert2.type) })
|
|
28256
28248
|
] }),
|
|
28257
28249
|
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("p", { className: "text-sm text-gray-600 mb-2", children: alert2.message }),
|
|
28258
28250
|
contract && /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("p", { className: "text-xs text-gray-500", children: [
|
|
28259
28251
|
"Contrat: ",
|
|
28260
28252
|
contract.number,
|
|
28261
28253
|
" - ",
|
|
28262
|
-
contract.supplier_details?.
|
|
28254
|
+
contract.supplier_details?.legal_name || "Non d\xE9fini"
|
|
28263
28255
|
] }),
|
|
28264
28256
|
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("p", { className: "text-xs text-gray-400", children: new Date(alert2.createdAt).toLocaleString("fr-FR") })
|
|
28265
28257
|
] })
|
|
28266
28258
|
] }),
|
|
28267
28259
|
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "flex items-center space-x-2", children: [
|
|
28268
|
-
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
28269
|
-
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
28260
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Button2, { variant: "text", size: "sm", onClick: () => markAsRead(alert2.id), children: alert2.isRead ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react68.EyeOff, { className: "w-4 h-4" }) : /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react68.Eye, { className: "w-4 h-4" }) }),
|
|
28261
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Button2, { variant: "text", size: "sm", onClick: () => dismissAlert(alert2.id), children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react68.X, { className: "w-4 h-4" }) })
|
|
28270
28262
|
] })
|
|
28271
28263
|
] }),
|
|
28272
28264
|
alert2.actions && alert2.actions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "flex items-center space-x-2 pt-2 border-t", children: [
|
|
@@ -28294,8 +28286,8 @@ var AlertsManagementModal = ({
|
|
|
28294
28286
|
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "flex-1", children: [
|
|
28295
28287
|
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "flex items-center space-x-3 mb-2", children: [
|
|
28296
28288
|
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("h4", { className: "font-medium text-lg", children: rule.name }),
|
|
28297
|
-
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
28298
|
-
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
28289
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Badge4, { className: getPriorityColor(rule.priority), children: getPriorityLabel(rule.priority) }),
|
|
28290
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Badge4, { variant: rule.isActive ? "default" : "outline", children: rule.isActive ? "Active" : "Inactive" })
|
|
28299
28291
|
] }),
|
|
28300
28292
|
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("p", { className: "text-gray-600 mb-3", children: rule.description }),
|
|
28301
28293
|
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "flex items-center space-x-4 text-sm text-gray-500", children: [
|
|
@@ -28314,9 +28306,9 @@ var AlertsManagementModal = ({
|
|
|
28314
28306
|
] })
|
|
28315
28307
|
] }),
|
|
28316
28308
|
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "flex items-center space-x-2", children: [
|
|
28317
|
-
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
28309
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Button2, { variant: "text", size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react68.Edit, { className: "w-4 h-4" }) }),
|
|
28318
28310
|
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
28319
|
-
|
|
28311
|
+
Button2,
|
|
28320
28312
|
{
|
|
28321
28313
|
variant: "text",
|
|
28322
28314
|
size: "sm",
|
|
@@ -28324,7 +28316,7 @@ var AlertsManagementModal = ({
|
|
|
28324
28316
|
children: rule.isActive ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react68.EyeOff, { className: "w-4 h-4" }) : /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react68.Eye, { className: "w-4 h-4" })
|
|
28325
28317
|
}
|
|
28326
28318
|
),
|
|
28327
|
-
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
28319
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Button2, { variant: "text", size: "sm", className: "text-red-600", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react68.Trash2, { className: "w-4 h-4" }) })
|
|
28328
28320
|
] })
|
|
28329
28321
|
] }),
|
|
28330
28322
|
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
@@ -28340,7 +28332,7 @@ var AlertsManagementModal = ({
|
|
|
28340
28332
|
] }),
|
|
28341
28333
|
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { children: [
|
|
28342
28334
|
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("h5", { className: "font-medium mb-2", children: "Actions" }),
|
|
28343
|
-
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "flex items-center space-x-2", children: rule.actions.map((action, index) => /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
|
|
28335
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "flex items-center space-x-2", children: rule.actions.map((action, index) => /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(Badge4, { variant: "outline", children: [
|
|
28344
28336
|
action.type === "email" ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react68.Mail, { className: "w-3 h-3 mr-1" }) : action.type === "sms" ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react68.Smartphone, { className: "w-3 h-3 mr-1" }) : /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react68.Bell, { className: "w-3 h-3 mr-1" }),
|
|
28345
28337
|
action.type
|
|
28346
28338
|
] }, index)) })
|
|
@@ -28421,7 +28413,7 @@ var AlertsManagementModal = ({
|
|
|
28421
28413
|
{ id: "settings", label: "Param\xE8tres", icon: import_lucide_react68.Settings }
|
|
28422
28414
|
];
|
|
28423
28415
|
if (!isOpen) return null;
|
|
28424
|
-
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
28416
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Modal, { open: isOpen, onClose, width: "90%", title: "Gestion des alertes", description: "Surveillance et notifications automatiques", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "flex flex-col max-h-[85vh]", children: [
|
|
28425
28417
|
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "border-b", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
28426
28418
|
Tabs,
|
|
28427
28419
|
{
|
|
@@ -28583,7 +28575,7 @@ var BulkSLAEvaluationModal = ({
|
|
|
28583
28575
|
borderColor: colors.border
|
|
28584
28576
|
};
|
|
28585
28577
|
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
28586
|
-
|
|
28578
|
+
Modal,
|
|
28587
28579
|
{
|
|
28588
28580
|
title: "Session d'\xE9valuation SLA",
|
|
28589
28581
|
description: `${contract.supplier_details?.legal_name || "Fournisseur"} - ${contract.number}`,
|
|
@@ -30426,7 +30418,7 @@ var SLAManagementModal = ({
|
|
|
30426
30418
|
{ id: "notes", label: "Notes", icon: import_lucide_react70.MessageSquare }
|
|
30427
30419
|
];
|
|
30428
30420
|
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
30429
|
-
|
|
30421
|
+
Modal,
|
|
30430
30422
|
{
|
|
30431
30423
|
open: isOpen,
|
|
30432
30424
|
onClose,
|
|
@@ -30517,7 +30509,7 @@ var AddSLAIndicatorModal = ({
|
|
|
30517
30509
|
indicator,
|
|
30518
30510
|
isEdit = false
|
|
30519
30511
|
}) => {
|
|
30520
|
-
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
30512
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Modal, { open: isOpen, onClose, width: "w-[50vw]", title: isEdit ? "Modifier l'indicateur SLA" : "Ajouter un indicateur SLA", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "p-4", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
30521
30513
|
SLAIndicatorForm,
|
|
30522
30514
|
{
|
|
30523
30515
|
indicator,
|
|
@@ -30558,7 +30550,7 @@ var AddSLAEvaluationModal = ({
|
|
|
30558
30550
|
setComments("");
|
|
30559
30551
|
onClose();
|
|
30560
30552
|
};
|
|
30561
|
-
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
30553
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Modal, { open: isOpen, onClose, width: "w-[50vw]", title: "Ajouter une mesure SLA", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("form", { onSubmit: handleSubmit, className: "p-4 space-y-4", children: [
|
|
30562
30554
|
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { children: [
|
|
30563
30555
|
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("label", { className: "block text-sm font-medium mb-1", style: { color: colors.text.secondary }, children: "Indicateur" }),
|
|
30564
30556
|
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("p", { className: "font-medium", style: { color: colors.text.primary }, children: indicator.name }),
|
|
@@ -30770,7 +30762,7 @@ var SLAEvaluationForm = ({
|
|
|
30770
30762
|
{
|
|
30771
30763
|
label: "Date d'\xE9valuation *",
|
|
30772
30764
|
value: formData.evaluation_date || "",
|
|
30773
|
-
onChange: (
|
|
30765
|
+
onChange: (e) => handleInputChange("evaluation_date", e.target.value),
|
|
30774
30766
|
error: errors.evaluation_date
|
|
30775
30767
|
}
|
|
30776
30768
|
) }),
|
|
@@ -30779,7 +30771,7 @@ var SLAEvaluationForm = ({
|
|
|
30779
30771
|
{
|
|
30780
30772
|
label: `Valeur mesur\xE9e * (${indicator?.measurement_unit})`,
|
|
30781
30773
|
value: formData.value || 0,
|
|
30782
|
-
onChange: (
|
|
30774
|
+
onChange: (e) => handleInputChange("value", e.target.value),
|
|
30783
30775
|
step: 0.01,
|
|
30784
30776
|
min: 0,
|
|
30785
30777
|
error: errors.value
|
|
@@ -30818,8 +30810,8 @@ var SLAEvaluationForm = ({
|
|
|
30818
30810
|
{
|
|
30819
30811
|
label: "Mesur\xE9 par",
|
|
30820
30812
|
value: evaluatedByName,
|
|
30821
|
-
onChange: (
|
|
30822
|
-
setEvaluatedByName(value);
|
|
30813
|
+
onChange: (e) => {
|
|
30814
|
+
setEvaluatedByName(e.target.value);
|
|
30823
30815
|
if (errors.evaluated_by) {
|
|
30824
30816
|
const newErrors = { ...errors };
|
|
30825
30817
|
delete newErrors.evaluated_by;
|
|
@@ -30878,7 +30870,6 @@ var SLAEvaluationForm = ({
|
|
|
30878
30870
|
};
|
|
30879
30871
|
|
|
30880
30872
|
// src/components/contracts/components/AddSLAIndicatorModal.tsx
|
|
30881
|
-
var import_lucide_react71 = require("lucide-react");
|
|
30882
30873
|
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
30883
30874
|
var AddSLAIndicatorModal2 = ({
|
|
30884
30875
|
isOpen,
|
|
@@ -30892,26 +30883,20 @@ var AddSLAIndicatorModal2 = ({
|
|
|
30892
30883
|
onSubmit(indicatorData);
|
|
30893
30884
|
onClose();
|
|
30894
30885
|
};
|
|
30895
|
-
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
30896
|
-
|
|
30897
|
-
|
|
30898
|
-
|
|
30899
|
-
|
|
30900
|
-
|
|
30901
|
-
|
|
30902
|
-
|
|
30903
|
-
|
|
30904
|
-
|
|
30905
|
-
onCancel: onClose,
|
|
30906
|
-
onShowToast,
|
|
30907
|
-
isEdit
|
|
30908
|
-
}
|
|
30909
|
-
) })
|
|
30910
|
-
] }) });
|
|
30886
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Modals_default, { title: isEdit ? "Modifier l'indicateur SLA" : "Nouvel indicateur SLA", open: isOpen, onClose, width: "w-[80vw]", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "flex flex-col max-h-[75vh]", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
30887
|
+
SLAIndicatorForm,
|
|
30888
|
+
{
|
|
30889
|
+
indicator,
|
|
30890
|
+
onSubmit: handleSubmit,
|
|
30891
|
+
onCancel: onClose,
|
|
30892
|
+
onShowToast,
|
|
30893
|
+
isEdit
|
|
30894
|
+
}
|
|
30895
|
+
) }) }) });
|
|
30911
30896
|
};
|
|
30912
30897
|
|
|
30913
30898
|
// src/components/contracts/components/AddSLAEvaluationModal.tsx
|
|
30914
|
-
var
|
|
30899
|
+
var import_lucide_react71 = require("lucide-react");
|
|
30915
30900
|
var import_jsx_runtime100 = require("react/jsx-runtime");
|
|
30916
30901
|
var AddSLAEvaluationModal2 = ({
|
|
30917
30902
|
isOpen,
|
|
@@ -30928,7 +30913,7 @@ var AddSLAEvaluationModal2 = ({
|
|
|
30928
30913
|
onSubmit(evaluationData);
|
|
30929
30914
|
onClose();
|
|
30930
30915
|
};
|
|
30931
|
-
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
30916
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Modal, { title: isEdit ? "Modifier l'\xE9valuation SLA" : "Nouvelle \xE9valuation SLA", open: isOpen, onClose, width: "w-[900px]", children: /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: "flex flex-col h-[80vh]", children: [
|
|
30932
30917
|
/* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(
|
|
30933
30918
|
"div",
|
|
30934
30919
|
{
|
|
@@ -30950,7 +30935,7 @@ var AddSLAEvaluationModal2 = ({
|
|
|
30950
30935
|
e.currentTarget.style.color = colors.text.secondary;
|
|
30951
30936
|
e.currentTarget.style.backgroundColor = "transparent";
|
|
30952
30937
|
},
|
|
30953
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
30938
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_lucide_react71.X, { className: "w-5 h-5" })
|
|
30954
30939
|
}
|
|
30955
30940
|
)
|
|
30956
30941
|
]
|