ptechcore_ui 1.0.64 → 1.0.65
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 +147 -126
- package/dist/index.d.cts +3456 -0
- package/dist/index.d.ts +3456 -0
- package/dist/index.js +151 -131
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -36,7 +36,7 @@ var Buttons_default = PrimaryButton;
|
|
|
36
36
|
// src/components/common/Modals.tsx
|
|
37
37
|
import { createPortal } from "react-dom";
|
|
38
38
|
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
39
|
-
var
|
|
39
|
+
var Modal = ({
|
|
40
40
|
title,
|
|
41
41
|
description,
|
|
42
42
|
sideactions,
|
|
@@ -77,7 +77,7 @@ var Modal2 = ({
|
|
|
77
77
|
] }) });
|
|
78
78
|
return createPortal(modalContent, document.body);
|
|
79
79
|
};
|
|
80
|
-
var Modals_default =
|
|
80
|
+
var Modals_default = Modal;
|
|
81
81
|
|
|
82
82
|
// src/components/common/Inputs.tsx
|
|
83
83
|
import { Link } from "react-router-dom";
|
|
@@ -123,7 +123,28 @@ var InputField = ({
|
|
|
123
123
|
error && /* @__PURE__ */ jsx3("p", { className: "text-xs text-[var(--color-error)]", children: error })
|
|
124
124
|
] });
|
|
125
125
|
};
|
|
126
|
-
var TextInput = ({ type = "text", ...props }) => {
|
|
126
|
+
var TextInput = ({ type = "text", multiline, rows, ...props }) => {
|
|
127
|
+
if (multiline) {
|
|
128
|
+
const { label, error, ref, ...textareaProps } = props;
|
|
129
|
+
return /* @__PURE__ */ jsxs2("div", { className: "flex flex-col gap-1 w-full", children: [
|
|
130
|
+
label && /* @__PURE__ */ jsx3("label", { className: "block text-[var(--color-text-secondary)] text-sm font-medium mb-2", children: label }),
|
|
131
|
+
/* @__PURE__ */ jsx3(
|
|
132
|
+
"textarea",
|
|
133
|
+
{
|
|
134
|
+
...textareaProps,
|
|
135
|
+
rows,
|
|
136
|
+
className: `w-full px-3 py-2 border rounded-lg text-sm
|
|
137
|
+
bg-[var(--color-surface)] text-[var(--color-text-primary)]
|
|
138
|
+
focus:ring-2 focus:ring-[var(--color-primary)]/20 focus:border-[var(--color-primary)] focus:outline-none
|
|
139
|
+
${error ? "border-[var(--color-error)]" : "border-[var(--color-border)]"}
|
|
140
|
+
${textareaProps.disabled ? "bg-[var(--color-background)] cursor-not-allowed opacity-60" : ""}
|
|
141
|
+
${textareaProps.className || ""}
|
|
142
|
+
`
|
|
143
|
+
}
|
|
144
|
+
),
|
|
145
|
+
error && /* @__PURE__ */ jsx3("p", { className: "text-xs text-[var(--color-error)]", children: error })
|
|
146
|
+
] });
|
|
147
|
+
}
|
|
127
148
|
return /* @__PURE__ */ jsx3(InputField, { ...props, type });
|
|
128
149
|
};
|
|
129
150
|
var NumberInput = (props) => {
|
|
@@ -1272,7 +1293,7 @@ import { useState as useState4, useEffect as useEffect3 } from "react";
|
|
|
1272
1293
|
|
|
1273
1294
|
// src/components/common/Cards.tsx
|
|
1274
1295
|
import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1275
|
-
var RewiseCard = ({ children, className = "" }) => /* @__PURE__ */ jsx7("div", { className: `bg-white rounded-lg shadow border border-gray-200 ${className}`, children });
|
|
1296
|
+
var RewiseCard = ({ children, className = "", style }) => /* @__PURE__ */ jsx7("div", { className: `bg-white rounded-lg shadow border border-gray-200 ${className}`, style, children });
|
|
1276
1297
|
var RewiseBasicCard = ({ title, children }) => /* @__PURE__ */ jsxs4("div", { className: "bg-white rounded-lg ", children: [
|
|
1277
1298
|
/* @__PURE__ */ jsx7("div", { className: "px-6 py-2 border-b border-gray-200", children: /* @__PURE__ */ jsx7("div", { className: "flex items-center space-x-4", children: title }) }),
|
|
1278
1299
|
/* @__PURE__ */ jsx7("div", { className: "p-3", children })
|
|
@@ -3638,10 +3659,12 @@ var Tabs = ({ tabs, activeTab, onChange, variant = "filled", className = "" }) =
|
|
|
3638
3659
|
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
3639
3660
|
var Badge = ({
|
|
3640
3661
|
children,
|
|
3641
|
-
variant = "default"
|
|
3662
|
+
variant = "default",
|
|
3663
|
+
className = ""
|
|
3642
3664
|
}) => {
|
|
3643
3665
|
const variants = {
|
|
3644
3666
|
default: "bg-[#d1d7de] text-[#283042]",
|
|
3667
|
+
secondary: "bg-gray-100 text-gray-700",
|
|
3645
3668
|
success: "bg-[#78a6d2] text-white",
|
|
3646
3669
|
warning: "bg-[#e04927] text-white",
|
|
3647
3670
|
error: "bg-[#e04927] text-white",
|
|
@@ -3650,7 +3673,7 @@ var Badge = ({
|
|
|
3650
3673
|
blue: "bg-[#78a6d2] text-white",
|
|
3651
3674
|
green: "bg-[#78a6d2] text-white"
|
|
3652
3675
|
};
|
|
3653
|
-
return /* @__PURE__ */ jsx13("span", { className: `inline-flex items-center px-3 py-1 rounded-full text-xs font-semibold ${variants[variant]}`, children });
|
|
3676
|
+
return /* @__PURE__ */ jsx13("span", { className: `inline-flex items-center px-3 py-1 rounded-full text-xs font-semibold ${variants[variant]} ${className}`, children });
|
|
3654
3677
|
};
|
|
3655
3678
|
|
|
3656
3679
|
// src/components/common/FDrawer.tsx
|
|
@@ -17619,8 +17642,7 @@ import {
|
|
|
17619
17642
|
CheckCircle as CheckCircle4,
|
|
17620
17643
|
Plus as Plus7,
|
|
17621
17644
|
X as X12,
|
|
17622
|
-
Loader2 as Loader27
|
|
17623
|
-
Badge as Badge2
|
|
17645
|
+
Loader2 as Loader27
|
|
17624
17646
|
} from "lucide-react";
|
|
17625
17647
|
|
|
17626
17648
|
// src/components/purchase-request/services/CatalogueServices.ts
|
|
@@ -18002,7 +18024,7 @@ var CatalogueProductSelector = ({
|
|
|
18002
18024
|
/* @__PURE__ */ jsxs49("div", { className: "flex-1", children: [
|
|
18003
18025
|
/* @__PURE__ */ jsxs49("div", { className: "flex items-center space-x-2", children: [
|
|
18004
18026
|
/* @__PURE__ */ jsx55("span", { className: "text-xs font-mono text-gray-500", children: listItem.reference }),
|
|
18005
|
-
/* @__PURE__ */ jsx55(
|
|
18027
|
+
/* @__PURE__ */ jsx55(Badge, { variant: listItem.type === "product" ? "info" : "default", children: listItem.type === "product" ? "Produit" : "Service" })
|
|
18006
18028
|
] }),
|
|
18007
18029
|
/* @__PURE__ */ jsx55("h4", { className: "font-medium text-gray-900", children: listItem.name }),
|
|
18008
18030
|
/* @__PURE__ */ jsx55("p", { className: "text-sm text-gray-500", children: listItem.category })
|
|
@@ -23609,12 +23631,14 @@ var SLAEvaluationSessionServices = {
|
|
|
23609
23631
|
|
|
23610
23632
|
// src/components/contracts/ViewContractContent.tsx
|
|
23611
23633
|
import { Fragment as Fragment22, jsx as jsx91, jsxs as jsxs85 } from "react/jsx-runtime";
|
|
23612
|
-
var
|
|
23634
|
+
var Button = ({ children, onClick, variant = "default", size = "md", className = "", disabled = false }) => {
|
|
23613
23635
|
const baseStyles = "inline-flex items-center justify-center font-medium rounded-lg transition-colors disabled:opacity-50";
|
|
23614
23636
|
const variantStyles2 = {
|
|
23615
23637
|
default: "bg-blue-600 text-white hover:bg-blue-700",
|
|
23638
|
+
primary: "bg-blue-600 text-white hover:bg-blue-700",
|
|
23616
23639
|
outline: "border border-gray-300 bg-white text-gray-700 hover:bg-gray-50",
|
|
23617
23640
|
ghost: "text-gray-700 hover:bg-gray-100",
|
|
23641
|
+
text: "text-gray-700 hover:bg-gray-100",
|
|
23618
23642
|
danger: "bg-red-600 text-white hover:bg-red-700"
|
|
23619
23643
|
};
|
|
23620
23644
|
const sizeStyles = {
|
|
@@ -23624,7 +23648,7 @@ var Button2 = ({ children, onClick, variant = "default", size = "md", className
|
|
|
23624
23648
|
};
|
|
23625
23649
|
return /* @__PURE__ */ jsx91("button", { onClick, disabled, className: `${baseStyles} ${variantStyles2[variant]} ${sizeStyles[size]} ${className}`, children });
|
|
23626
23650
|
};
|
|
23627
|
-
var
|
|
23651
|
+
var Badge2 = ({
|
|
23628
23652
|
children,
|
|
23629
23653
|
className = "",
|
|
23630
23654
|
variant = "default"
|
|
@@ -23632,9 +23656,11 @@ var Badge3 = ({
|
|
|
23632
23656
|
const variantStyles2 = {
|
|
23633
23657
|
default: "bg-gray-100 text-gray-800",
|
|
23634
23658
|
outline: "border border-gray-300 bg-white text-gray-700",
|
|
23659
|
+
secondary: "bg-gray-100 text-gray-700",
|
|
23635
23660
|
success: "bg-green-100 text-green-800",
|
|
23636
23661
|
warning: "bg-yellow-100 text-yellow-800",
|
|
23637
23662
|
danger: "bg-red-100 text-red-800",
|
|
23663
|
+
error: "bg-red-100 text-red-800",
|
|
23638
23664
|
info: "bg-blue-100 text-blue-800"
|
|
23639
23665
|
};
|
|
23640
23666
|
return /* @__PURE__ */ jsx91("span", { className: `inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium ${variantStyles2[variant]} ${className}`, children });
|
|
@@ -23814,7 +23840,7 @@ var ViewContractContent = ({
|
|
|
23814
23840
|
break;
|
|
23815
23841
|
case "delete":
|
|
23816
23842
|
if (window.confirm("\xCAtes-vous s\xFBr de vouloir supprimer ce contrat ?")) {
|
|
23817
|
-
onDelete?.(contract.id);
|
|
23843
|
+
onDelete?.(String(contract.id));
|
|
23818
23844
|
}
|
|
23819
23845
|
break;
|
|
23820
23846
|
case "archive":
|
|
@@ -24006,7 +24032,7 @@ var ViewContractContent = ({
|
|
|
24006
24032
|
] }),
|
|
24007
24033
|
/* @__PURE__ */ jsxs85("div", { className: "flex justify-between", children: [
|
|
24008
24034
|
/* @__PURE__ */ jsx91("dt", { className: "text-sm font-medium text-gray-500", children: "Statut" }),
|
|
24009
|
-
/* @__PURE__ */ jsx91("dd", { className: "text-sm", children: /* @__PURE__ */ jsx91(
|
|
24035
|
+
/* @__PURE__ */ jsx91("dd", { className: "text-sm", children: /* @__PURE__ */ jsx91(Badge2, { variant: getStatusVariant(contract.status) === "error" ? "danger" : getStatusVariant(contract.status) === "success" ? "success" : "info", children: contractStatusLabels[contract.status] || contract.status }) })
|
|
24010
24036
|
] }),
|
|
24011
24037
|
/* @__PURE__ */ jsxs85("div", { className: "flex justify-between", children: [
|
|
24012
24038
|
/* @__PURE__ */ jsx91("dt", { className: "text-sm font-medium text-gray-500", children: "Cat\xE9gorie" }),
|
|
@@ -24014,7 +24040,7 @@ var ViewContractContent = ({
|
|
|
24014
24040
|
] }),
|
|
24015
24041
|
/* @__PURE__ */ jsxs85("div", { className: "flex justify-between", children: [
|
|
24016
24042
|
/* @__PURE__ */ jsx91("dt", { className: "text-sm font-medium text-gray-500", children: "Niveau de risque" }),
|
|
24017
|
-
/* @__PURE__ */ jsx91("dd", { className: "text-sm", children: /* @__PURE__ */ jsx91(
|
|
24043
|
+
/* @__PURE__ */ jsx91("dd", { className: "text-sm", children: /* @__PURE__ */ jsx91(Badge2, { variant: contract.risk_level === "critical" || contract.risk_level === "high" ? "danger" : contract.risk_level === "medium" ? "warning" : "success", children: riskLevelLabels[contract.risk_level] }) })
|
|
24018
24044
|
] }),
|
|
24019
24045
|
/* @__PURE__ */ jsxs85("div", { children: [
|
|
24020
24046
|
/* @__PURE__ */ jsx91("dt", { className: "text-sm font-medium text-gray-500 mb-1", children: "Description" }),
|
|
@@ -24030,11 +24056,11 @@ var ViewContractContent = ({
|
|
|
24030
24056
|
/* @__PURE__ */ jsxs85("dl", { className: "space-y-3", children: [
|
|
24031
24057
|
/* @__PURE__ */ jsxs85("div", { className: "flex justify-between", children: [
|
|
24032
24058
|
/* @__PURE__ */ jsx91("dt", { className: "text-sm font-medium text-gray-500", children: "Raison sociale" }),
|
|
24033
|
-
/* @__PURE__ */ jsx91("dd", { className: "text-sm text-gray-900 font-medium", children: contract.supplier_details?.
|
|
24059
|
+
/* @__PURE__ */ jsx91("dd", { className: "text-sm text-gray-900 font-medium", children: contract.supplier_details?.legal_name || "Non d\xE9fini" })
|
|
24034
24060
|
] }),
|
|
24035
24061
|
/* @__PURE__ */ jsxs85("div", { className: "flex justify-between", children: [
|
|
24036
24062
|
/* @__PURE__ */ jsx91("dt", { className: "text-sm font-medium text-gray-500", children: "Contact principal" }),
|
|
24037
|
-
/* @__PURE__ */ jsx91("dd", { className: "text-sm text-gray-900", children: contract.supplier_details?.
|
|
24063
|
+
/* @__PURE__ */ jsx91("dd", { className: "text-sm text-gray-900", children: contract.supplier_details?.legal_representative_name || "Non renseign\xE9" })
|
|
24038
24064
|
] }),
|
|
24039
24065
|
/* @__PURE__ */ jsxs85("div", { className: "flex items-center justify-between", children: [
|
|
24040
24066
|
/* @__PURE__ */ jsx91("dt", { className: "text-sm font-medium text-gray-500", children: "Email" }),
|
|
@@ -24090,7 +24116,7 @@ var ViewContractContent = ({
|
|
|
24090
24116
|
] }),
|
|
24091
24117
|
/* @__PURE__ */ jsxs85("div", { className: "flex justify-between items-center", children: [
|
|
24092
24118
|
/* @__PURE__ */ jsx91("dt", { className: "text-sm font-medium text-gray-500", children: "Renouvellement auto." }),
|
|
24093
|
-
/* @__PURE__ */ jsx91("dd", { children: /* @__PURE__ */ jsx91(
|
|
24119
|
+
/* @__PURE__ */ jsx91("dd", { children: /* @__PURE__ */ jsx91(Badge2, { variant: contract.auto_renewal ? "success" : "default", children: contract.auto_renewal ? "Activ\xE9" : "D\xE9sactiv\xE9" }) })
|
|
24094
24120
|
] }),
|
|
24095
24121
|
contract.maxRenewalPeriods && /* @__PURE__ */ jsxs85("div", { className: "flex justify-between", children: [
|
|
24096
24122
|
/* @__PURE__ */ jsx91("dt", { className: "text-sm font-medium text-gray-500", children: "Max. renouvellements" }),
|
|
@@ -24136,7 +24162,7 @@ var ViewContractContent = ({
|
|
|
24136
24162
|
] }),
|
|
24137
24163
|
contract.tags && contract.tags.length > 0 && /* @__PURE__ */ jsxs85(RewiseCard, { className: "p-6", children: [
|
|
24138
24164
|
/* @__PURE__ */ jsx91("h3", { className: "text-lg font-semibold text-gray-900 mb-4", children: "Tags et mots-cl\xE9s" }),
|
|
24139
|
-
/* @__PURE__ */ jsx91("div", { className: "flex flex-wrap gap-2", children: contract.tags.map((tag, index) => /* @__PURE__ */ jsx91(
|
|
24165
|
+
/* @__PURE__ */ jsx91("div", { className: "flex flex-wrap gap-2", children: contract.tags.map((tag, index) => /* @__PURE__ */ jsx91(Badge2, { variant: "secondary", children: tag }, index)) })
|
|
24140
24166
|
] })
|
|
24141
24167
|
] });
|
|
24142
24168
|
const renderSupplierTab = () => /* @__PURE__ */ jsxs85("div", { className: "space-y-6", children: [
|
|
@@ -24149,11 +24175,11 @@ var ViewContractContent = ({
|
|
|
24149
24175
|
/* @__PURE__ */ jsxs85("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
24150
24176
|
/* @__PURE__ */ jsxs85("div", { children: [
|
|
24151
24177
|
/* @__PURE__ */ jsx91("dt", { className: "text-sm font-medium text-gray-500", children: "Raison sociale" }),
|
|
24152
|
-
/* @__PURE__ */ jsx91("dd", { className: "text-sm text-gray-900 font-medium mt-1", children: contract.supplier_details?.
|
|
24178
|
+
/* @__PURE__ */ jsx91("dd", { className: "text-sm text-gray-900 font-medium mt-1", children: contract.supplier_details?.legal_name || "Non d\xE9fini" })
|
|
24153
24179
|
] }),
|
|
24154
24180
|
/* @__PURE__ */ jsxs85("div", { children: [
|
|
24155
24181
|
/* @__PURE__ */ jsx91("dt", { className: "text-sm font-medium text-gray-500", children: "SIRET" }),
|
|
24156
|
-
/* @__PURE__ */ jsx91("dd", { className: "text-sm text-gray-900 mt-1", children: contract.supplier_details?.
|
|
24182
|
+
/* @__PURE__ */ jsx91("dd", { className: "text-sm text-gray-900 mt-1", children: contract.supplier_details?.rccm || "Non renseign\xE9" })
|
|
24157
24183
|
] })
|
|
24158
24184
|
] }),
|
|
24159
24185
|
/* @__PURE__ */ jsxs85("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
@@ -24230,7 +24256,7 @@ var ViewContractContent = ({
|
|
|
24230
24256
|
/* @__PURE__ */ jsxs85("dl", { className: "space-y-3", children: [
|
|
24231
24257
|
/* @__PURE__ */ jsxs85("div", { className: "flex justify-between", children: [
|
|
24232
24258
|
/* @__PURE__ */ jsx91("dt", { className: "text-sm font-medium text-gray-500", children: "Renouvellement automatique" }),
|
|
24233
|
-
/* @__PURE__ */ jsx91("dd", { className: "text-sm", children: /* @__PURE__ */ jsx91(
|
|
24259
|
+
/* @__PURE__ */ jsx91("dd", { className: "text-sm", children: /* @__PURE__ */ jsx91(Badge2, { variant: contract.auto_renewal ? "success" : "default", children: contract.auto_renewal ? "Oui" : "Non" }) })
|
|
24234
24260
|
] }),
|
|
24235
24261
|
contract.renewal_date && /* @__PURE__ */ jsxs85("div", { className: "flex justify-between", children: [
|
|
24236
24262
|
/* @__PURE__ */ jsx91("dt", { className: "text-sm font-medium text-gray-500", children: "Date de renouvellement" }),
|
|
@@ -24256,7 +24282,7 @@ var ViewContractContent = ({
|
|
|
24256
24282
|
contract.fm_services && contract.fm_services.length > 0 ? /* @__PURE__ */ jsx91("div", { className: "space-y-4", children: contract.fm_services.map((service, index) => /* @__PURE__ */ jsxs85("div", { className: "p-4 border rounded-lg", children: [
|
|
24257
24283
|
/* @__PURE__ */ jsxs85("div", { className: "flex items-center justify-between mb-2", children: [
|
|
24258
24284
|
/* @__PURE__ */ jsx91("h4", { className: "font-medium text-gray-900", children: service.service_type || service.name }),
|
|
24259
|
-
/* @__PURE__ */ jsx91(
|
|
24285
|
+
/* @__PURE__ */ jsx91(Badge2, { variant: service.is_active ? "success" : "default", children: service.is_active ? "Actif" : "Inactif" })
|
|
24260
24286
|
] }),
|
|
24261
24287
|
service.description && /* @__PURE__ */ jsx91("p", { className: "text-sm text-gray-600 mb-2", children: service.description }),
|
|
24262
24288
|
/* @__PURE__ */ jsxs85("div", { className: "grid grid-cols-2 gap-4 text-sm", children: [
|
|
@@ -24376,7 +24402,7 @@ var ViewContractContent = ({
|
|
|
24376
24402
|
"%"
|
|
24377
24403
|
] }),
|
|
24378
24404
|
/* @__PURE__ */ jsx91("td", { className: "py-3 text-center", children: formatDate2(milestone.dueDate) }),
|
|
24379
|
-
/* @__PURE__ */ jsx91("td", { className: "py-3 text-center", children: /* @__PURE__ */ jsx91(
|
|
24405
|
+
/* @__PURE__ */ jsx91("td", { className: "py-3 text-center", children: /* @__PURE__ */ jsx91(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" }) })
|
|
24380
24406
|
] }, milestone.id)) })
|
|
24381
24407
|
] }) })
|
|
24382
24408
|
] }),
|
|
@@ -24475,7 +24501,7 @@ var ViewContractContent = ({
|
|
|
24475
24501
|
/* @__PURE__ */ jsx91("td", { className: "py-3 px-4", children: /* @__PURE__ */ jsx91("span", { className: "font-mono text-sm font-semibold text-[#78a6d2]", children: item.reference }) }),
|
|
24476
24502
|
/* @__PURE__ */ jsxs85("td", { className: "py-3 px-4", children: [
|
|
24477
24503
|
/* @__PURE__ */ jsx91("p", { className: "font-medium text-gray-900", children: item.designation }),
|
|
24478
|
-
item.category && /* @__PURE__ */ jsx91(
|
|
24504
|
+
item.category && /* @__PURE__ */ jsx91(Badge2, { variant: "secondary", className: "mt-1 text-xs", children: item.category }),
|
|
24479
24505
|
item.notes && /* @__PURE__ */ jsx91("p", { className: "text-xs text-gray-500 mt-1", children: item.notes })
|
|
24480
24506
|
] }),
|
|
24481
24507
|
/* @__PURE__ */ jsx91("td", { className: "py-3 px-4 text-center", children: item.unit }),
|
|
@@ -24484,7 +24510,7 @@ var ViewContractContent = ({
|
|
|
24484
24510
|
item.vatRate,
|
|
24485
24511
|
"%"
|
|
24486
24512
|
] }),
|
|
24487
|
-
/* @__PURE__ */ jsx91("td", { className: "py-3 px-4 text-center", children: item.discount && item.discount > 0 ? /* @__PURE__ */ jsxs85(
|
|
24513
|
+
/* @__PURE__ */ jsx91("td", { className: "py-3 px-4 text-center", children: item.discount && item.discount > 0 ? /* @__PURE__ */ jsxs85(Badge2, { variant: "success", children: [
|
|
24488
24514
|
"-",
|
|
24489
24515
|
item.discount,
|
|
24490
24516
|
"%"
|
|
@@ -24603,7 +24629,7 @@ var ViewContractContent = ({
|
|
|
24603
24629
|
/* @__PURE__ */ jsx91("p", { className: "text-xs text-gray-600", children: "Destination" })
|
|
24604
24630
|
] })
|
|
24605
24631
|
] }),
|
|
24606
|
-
/* @__PURE__ */ jsx91("div", { className: "mt-4 text-center", children: /* @__PURE__ */ jsxs85(
|
|
24632
|
+
/* @__PURE__ */ jsx91("div", { className: "mt-4 text-center", children: /* @__PURE__ */ jsxs85(Badge2, { variant: "info", children: [
|
|
24607
24633
|
"Transfert des risques: ",
|
|
24608
24634
|
contract.incoterm
|
|
24609
24635
|
] }) })
|
|
@@ -24626,7 +24652,7 @@ var ViewContractContent = ({
|
|
|
24626
24652
|
/* @__PURE__ */ jsx91("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" }),
|
|
24627
24653
|
/* @__PURE__ */ jsx91("p", { className: "text-sm text-gray-500", children: guarantee.description })
|
|
24628
24654
|
] }),
|
|
24629
|
-
/* @__PURE__ */ jsx91(
|
|
24655
|
+
/* @__PURE__ */ jsx91(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" })
|
|
24630
24656
|
] }),
|
|
24631
24657
|
/* @__PURE__ */ jsxs85("div", { className: "grid grid-cols-2 md:grid-cols-4 gap-4 text-sm", children: [
|
|
24632
24658
|
/* @__PURE__ */ jsxs85("div", { children: [
|
|
@@ -24671,7 +24697,7 @@ var ViewContractContent = ({
|
|
|
24671
24697
|
/* @__PURE__ */ jsx91("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" }),
|
|
24672
24698
|
/* @__PURE__ */ jsx91("p", { className: "text-sm text-gray-500", children: insurance.description })
|
|
24673
24699
|
] }),
|
|
24674
|
-
/* @__PURE__ */ jsx91(
|
|
24700
|
+
/* @__PURE__ */ jsx91(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" })
|
|
24675
24701
|
] }),
|
|
24676
24702
|
/* @__PURE__ */ jsxs85("div", { className: "grid grid-cols-2 md:grid-cols-4 gap-4 text-sm", children: [
|
|
24677
24703
|
/* @__PURE__ */ jsxs85("div", { children: [
|
|
@@ -24758,7 +24784,7 @@ var ViewContractContent = ({
|
|
|
24758
24784
|
] })
|
|
24759
24785
|
] }),
|
|
24760
24786
|
/* @__PURE__ */ jsxs85("div", { className: "text-right", children: [
|
|
24761
|
-
/* @__PURE__ */ jsx91(
|
|
24787
|
+
/* @__PURE__ */ jsx91(Badge2, { variant: approver.status === "approved" ? "success" : approver.status === "rejected" ? "error" : "default", children: approver.status === "approved" ? "Approuv\xE9" : approver.status === "rejected" ? "Rejet\xE9" : "En attente" }),
|
|
24762
24788
|
approver.approvalDate && /* @__PURE__ */ jsx91("p", { className: "text-xs text-gray-500 mt-1", children: formatDate2(approver.approvalDate) })
|
|
24763
24789
|
] })
|
|
24764
24790
|
] }, index)) })
|
|
@@ -24777,7 +24803,7 @@ var ViewContractContent = ({
|
|
|
24777
24803
|
/* @__PURE__ */ jsx91("th", { className: "text-center py-2 text-gray-500", children: "D\xE9lai r\xE9ponse" })
|
|
24778
24804
|
] }) }),
|
|
24779
24805
|
/* @__PURE__ */ jsx91("tbody", { children: contract.governance.escalationMatrix.map((level, index) => /* @__PURE__ */ jsxs85("tr", { className: "border-b border-gray-100", children: [
|
|
24780
|
-
/* @__PURE__ */ jsx91("td", { className: "py-3", children: /* @__PURE__ */ jsxs85(
|
|
24806
|
+
/* @__PURE__ */ jsx91("td", { className: "py-3", children: /* @__PURE__ */ jsxs85(Badge2, { variant: level.level === 1 ? "info" : level.level === 2 ? "warning" : "error", children: [
|
|
24781
24807
|
"Niveau ",
|
|
24782
24808
|
level.level
|
|
24783
24809
|
] }) }),
|
|
@@ -24801,7 +24827,7 @@ var ViewContractContent = ({
|
|
|
24801
24827
|
/* @__PURE__ */ jsx91("p", { className: "font-medium text-gray-900", children: member.name }),
|
|
24802
24828
|
/* @__PURE__ */ jsx91("p", { className: "text-xs text-gray-500", children: member.role })
|
|
24803
24829
|
] }),
|
|
24804
|
-
/* @__PURE__ */ jsx91(
|
|
24830
|
+
/* @__PURE__ */ jsx91(Badge2, { variant: member.organization === "buyer" ? "info" : "secondary", children: member.organization === "buyer" ? "Acheteur" : "Fournisseur" })
|
|
24805
24831
|
] }, index)) })
|
|
24806
24832
|
] }),
|
|
24807
24833
|
/* @__PURE__ */ jsxs85("div", { children: [
|
|
@@ -24860,7 +24886,7 @@ var ViewContractContent = ({
|
|
|
24860
24886
|
/* @__PURE__ */ jsxs85("div", { className: "border border-gray-200 rounded-lg p-4", children: [
|
|
24861
24887
|
/* @__PURE__ */ jsxs85("div", { className: "flex items-center justify-between mb-3", children: [
|
|
24862
24888
|
/* @__PURE__ */ jsx91("h4", { className: "font-medium text-gray-900", children: "RGPD" }),
|
|
24863
|
-
/* @__PURE__ */ jsx91(
|
|
24889
|
+
/* @__PURE__ */ jsx91(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" })
|
|
24864
24890
|
] }),
|
|
24865
24891
|
contract.regulatoryCompliance.gdprCompliance?.applicable && /* @__PURE__ */ jsx91("div", { className: "space-y-2 text-sm", children: /* @__PURE__ */ jsxs85("div", { className: "flex items-center", children: [
|
|
24866
24892
|
contract.regulatoryCompliance.gdprCompliance.dataProcessingAgreement ? /* @__PURE__ */ jsx91(CheckCircle11, { className: "w-4 h-4 text-green-500 mr-2" }) : /* @__PURE__ */ jsx91(AlertCircle7, { className: "w-4 h-4 text-red-500 mr-2" }),
|
|
@@ -24870,7 +24896,7 @@ var ViewContractContent = ({
|
|
|
24870
24896
|
/* @__PURE__ */ jsxs85("div", { className: "border border-gray-200 rounded-lg p-4", children: [
|
|
24871
24897
|
/* @__PURE__ */ jsxs85("div", { className: "flex items-center justify-between mb-3", children: [
|
|
24872
24898
|
/* @__PURE__ */ jsx91("h4", { className: "font-medium text-gray-900", children: "Anti-corruption" }),
|
|
24873
|
-
/* @__PURE__ */ jsx91(
|
|
24899
|
+
/* @__PURE__ */ jsx91(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" })
|
|
24874
24900
|
] }),
|
|
24875
24901
|
contract.regulatoryCompliance.antiCorruption?.applicable && /* @__PURE__ */ jsxs85("div", { className: "space-y-2 text-sm", children: [
|
|
24876
24902
|
/* @__PURE__ */ jsxs85("div", { className: "flex items-center", children: [
|
|
@@ -24886,7 +24912,7 @@ var ViewContractContent = ({
|
|
|
24886
24912
|
/* @__PURE__ */ jsxs85("div", { className: "border border-gray-200 rounded-lg p-4", children: [
|
|
24887
24913
|
/* @__PURE__ */ jsxs85("div", { className: "flex items-center justify-between mb-3", children: [
|
|
24888
24914
|
/* @__PURE__ */ jsx91("h4", { className: "font-medium text-gray-900", children: "Sanctions" }),
|
|
24889
|
-
/* @__PURE__ */ jsx91(
|
|
24915
|
+
/* @__PURE__ */ jsx91(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" })
|
|
24890
24916
|
] }),
|
|
24891
24917
|
contract.regulatoryCompliance.sanctionsScreening?.lastScreeningDate && /* @__PURE__ */ jsxs85("p", { className: "text-sm text-gray-500", children: [
|
|
24892
24918
|
"Dernier contr\xF4le: ",
|
|
@@ -24913,7 +24939,7 @@ var ViewContractContent = ({
|
|
|
24913
24939
|
"Score: ",
|
|
24914
24940
|
risk.riskScore
|
|
24915
24941
|
] }),
|
|
24916
|
-
/* @__PURE__ */ jsx91(
|
|
24942
|
+
/* @__PURE__ */ jsx91(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" })
|
|
24917
24943
|
] })
|
|
24918
24944
|
] }),
|
|
24919
24945
|
/* @__PURE__ */ jsx91("p", { className: "text-sm text-gray-600 mb-2", children: risk.description }),
|
|
@@ -25005,7 +25031,7 @@ var ViewContractContent = ({
|
|
|
25005
25031
|
] }),
|
|
25006
25032
|
contract.esgCriteria.environmental?.certifications && contract.esgCriteria.environmental.certifications.length > 0 && /* @__PURE__ */ jsxs85("div", { className: "mt-3 pt-3 border-t border-gray-200", children: [
|
|
25007
25033
|
/* @__PURE__ */ jsx91("p", { className: "text-xs text-gray-500 mb-2", children: "Certifications" }),
|
|
25008
|
-
/* @__PURE__ */ jsx91("div", { className: "flex flex-wrap gap-1", children: contract.esgCriteria.environmental.certifications.map((cert, i) => /* @__PURE__ */ jsx91(
|
|
25034
|
+
/* @__PURE__ */ jsx91("div", { className: "flex flex-wrap gap-1", children: contract.esgCriteria.environmental.certifications.map((cert, i) => /* @__PURE__ */ jsx91(Badge2, { variant: "secondary", className: "text-xs", children: cert }, i)) })
|
|
25009
25035
|
] })
|
|
25010
25036
|
] })
|
|
25011
25037
|
] }),
|
|
@@ -25033,7 +25059,7 @@ var ViewContractContent = ({
|
|
|
25033
25059
|
] }),
|
|
25034
25060
|
contract.esgCriteria.social?.certifications && contract.esgCriteria.social.certifications.length > 0 && /* @__PURE__ */ jsxs85("div", { className: "mt-3 pt-3 border-t border-gray-200", children: [
|
|
25035
25061
|
/* @__PURE__ */ jsx91("p", { className: "text-xs text-gray-500 mb-2", children: "Certifications" }),
|
|
25036
|
-
/* @__PURE__ */ jsx91("div", { className: "flex flex-wrap gap-1", children: contract.esgCriteria.social.certifications.map((cert, i) => /* @__PURE__ */ jsx91(
|
|
25062
|
+
/* @__PURE__ */ jsx91("div", { className: "flex flex-wrap gap-1", children: contract.esgCriteria.social.certifications.map((cert, i) => /* @__PURE__ */ jsx91(Badge2, { variant: "secondary", className: "text-xs", children: cert }, i)) })
|
|
25037
25063
|
] })
|
|
25038
25064
|
] })
|
|
25039
25065
|
] }),
|
|
@@ -25066,8 +25092,8 @@ var ViewContractContent = ({
|
|
|
25066
25092
|
/* @__PURE__ */ jsx91("h3", { className: "text-lg font-semibold text-gray-900 mb-4", children: "Alignement avec les Objectifs de D\xE9veloppement Durable (ODD)" }),
|
|
25067
25093
|
/* @__PURE__ */ jsx91("div", { className: "flex flex-wrap gap-2", children: contract.esgCriteria.sdgAlignment.map((sdg) => /* @__PURE__ */ jsx91("div", { className: "px-3 py-2 bg-blue-50 rounded-lg text-center", children: /* @__PURE__ */ jsxs85("p", { className: "text-lg font-bold text-blue-600", children: [
|
|
25068
25094
|
"ODD ",
|
|
25069
|
-
sdg
|
|
25070
|
-
] }) }, sdg)) })
|
|
25095
|
+
sdg.goal
|
|
25096
|
+
] }) }, sdg.goal)) })
|
|
25071
25097
|
] })
|
|
25072
25098
|
] }) : /* @__PURE__ */ jsxs85(RewiseCard, { className: "p-8 text-center", children: [
|
|
25073
25099
|
/* @__PURE__ */ jsx91(Leaf, { className: "w-16 h-16 text-gray-400 mx-auto mb-4" }),
|
|
@@ -25100,11 +25126,11 @@ var ViewContractContent = ({
|
|
|
25100
25126
|
/* @__PURE__ */ jsxs85("div", { className: "flex-1", children: [
|
|
25101
25127
|
/* @__PURE__ */ jsxs85("div", { className: "flex items-center space-x-2 mb-1", children: [
|
|
25102
25128
|
/* @__PURE__ */ jsx91("h4", { className: "font-medium text-gray-900", children: obligation.title }),
|
|
25103
|
-
/* @__PURE__ */ jsx91(
|
|
25129
|
+
/* @__PURE__ */ jsx91(Badge2, { variant: obligation.obligor === "buyer" ? "info" : obligation.obligor === "supplier" ? "secondary" : "default", children: obligation.obligor === "buyer" ? "Acheteur" : obligation.obligor === "supplier" ? "Fournisseur" : "Partag\xE9e" })
|
|
25104
25130
|
] }),
|
|
25105
25131
|
/* @__PURE__ */ jsx91("p", { className: "text-sm text-gray-600", children: obligation.description })
|
|
25106
25132
|
] }),
|
|
25107
|
-
/* @__PURE__ */ jsx91(
|
|
25133
|
+
/* @__PURE__ */ jsx91(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" })
|
|
25108
25134
|
] }),
|
|
25109
25135
|
/* @__PURE__ */ jsxs85("div", { className: "flex items-center space-x-4 text-sm text-gray-500", children: [
|
|
25110
25136
|
/* @__PURE__ */ jsx91("span", { className: "capitalize", children: obligation.type.replace("_", " ") }),
|
|
@@ -25126,7 +25152,7 @@ var ViewContractContent = ({
|
|
|
25126
25152
|
obligation.responsiblePerson
|
|
25127
25153
|
] })
|
|
25128
25154
|
] }),
|
|
25129
|
-
obligation.priority === "critical" || obligation.priority === "high" ? /* @__PURE__ */ jsx91("div", { className: "mt-2", children: /* @__PURE__ */ jsxs85(
|
|
25155
|
+
obligation.priority === "critical" || obligation.priority === "high" ? /* @__PURE__ */ jsx91("div", { className: "mt-2", children: /* @__PURE__ */ jsxs85(Badge2, { variant: obligation.priority === "critical" ? "error" : "warning", children: [
|
|
25130
25156
|
"Priorit\xE9 ",
|
|
25131
25157
|
obligation.priority === "critical" ? "critique" : "haute"
|
|
25132
25158
|
] }) }) : null
|
|
@@ -25144,7 +25170,7 @@ var ViewContractContent = ({
|
|
|
25144
25170
|
contract.sla_indicators?.length || 0,
|
|
25145
25171
|
")"
|
|
25146
25172
|
] }),
|
|
25147
|
-
onOpenSLA && /* @__PURE__ */ jsxs85(
|
|
25173
|
+
onOpenSLA && /* @__PURE__ */ jsxs85(Button, { onClick: () => onOpenSLA(contract), children: [
|
|
25148
25174
|
/* @__PURE__ */ jsx91(BarChart34, { className: "w-4 h-4 mr-2" }),
|
|
25149
25175
|
"G\xE9rer les SLA"
|
|
25150
25176
|
] })
|
|
@@ -25155,41 +25181,41 @@ var ViewContractContent = ({
|
|
|
25155
25181
|
/* @__PURE__ */ jsx91("h4", { className: "font-medium text-gray-900", children: sla.name }),
|
|
25156
25182
|
/* @__PURE__ */ jsx91("p", { className: "text-sm text-gray-500", children: sla.description })
|
|
25157
25183
|
] }),
|
|
25158
|
-
/* @__PURE__ */ jsx91(
|
|
25184
|
+
/* @__PURE__ */ jsx91(Badge2, { variant: sla.status === "achieved" ? "success" : sla.status === "warning" ? "warning" : "error", children: sla.status === "achieved" ? "Atteint" : sla.status === "warning" ? "Attention" : "Non atteint" })
|
|
25159
25185
|
] }),
|
|
25160
25186
|
/* @__PURE__ */ jsxs85("div", { className: "mb-3", children: [
|
|
25161
25187
|
/* @__PURE__ */ jsxs85("div", { className: "flex items-center justify-between text-sm mb-1", children: [
|
|
25162
25188
|
/* @__PURE__ */ jsx91("span", { className: "text-gray-500", children: "Performance" }),
|
|
25163
25189
|
/* @__PURE__ */ jsxs85("span", { className: "font-medium", children: [
|
|
25164
|
-
sla.
|
|
25190
|
+
sla.current_value || 0,
|
|
25165
25191
|
" / ",
|
|
25166
|
-
sla.
|
|
25192
|
+
sla.target_value,
|
|
25167
25193
|
" ",
|
|
25168
|
-
sla.
|
|
25194
|
+
sla.measurement_unit
|
|
25169
25195
|
] })
|
|
25170
25196
|
] }),
|
|
25171
25197
|
/* @__PURE__ */ jsx91("div", { className: "bg-gray-200 rounded-full h-2", children: /* @__PURE__ */ jsx91(
|
|
25172
25198
|
"div",
|
|
25173
25199
|
{
|
|
25174
25200
|
className: `h-2 rounded-full ${sla.status === "achieved" ? "bg-green-500" : sla.status === "warning" ? "bg-yellow-500" : "bg-red-500"}`,
|
|
25175
|
-
style: { width: `${Math.min(100, (sla.
|
|
25201
|
+
style: { width: `${Math.min(100, (sla.current_value || 0) / (sla.target_value || 1) * 100)}%` }
|
|
25176
25202
|
}
|
|
25177
25203
|
) })
|
|
25178
25204
|
] }),
|
|
25179
25205
|
/* @__PURE__ */ jsxs85("div", { className: "flex items-center space-x-4 text-sm text-gray-500", children: [
|
|
25180
25206
|
/* @__PURE__ */ jsxs85("span", { children: [
|
|
25181
25207
|
"Fr\xE9quence: ",
|
|
25182
|
-
sla.
|
|
25208
|
+
sla.measurement_frequency === "daily" ? "Quotidien" : sla.measurement_frequency === "weekly" ? "Hebdomadaire" : sla.measurement_frequency === "monthly" ? "Mensuel" : sla.measurement_frequency === "quarterly" ? "Trimestriel" : "Annuel"
|
|
25183
25209
|
] }),
|
|
25184
|
-
sla.
|
|
25210
|
+
sla.last_evaluation && /* @__PURE__ */ jsxs85("span", { children: [
|
|
25185
25211
|
"Derni\xE8re mesure: ",
|
|
25186
|
-
formatDate2(sla.
|
|
25212
|
+
formatDate2(sla.last_evaluation)
|
|
25187
25213
|
] })
|
|
25188
25214
|
] })
|
|
25189
25215
|
] }, sla.id)) }) : /* @__PURE__ */ jsxs85(RewiseCard, { className: "p-8 text-center", children: [
|
|
25190
25216
|
/* @__PURE__ */ jsx91(TrendingUp9, { className: "w-12 h-12 text-gray-400 mx-auto mb-4" }),
|
|
25191
25217
|
/* @__PURE__ */ jsx91("p", { className: "text-gray-500 mb-4", children: "Aucun indicateur SLA d\xE9fini pour ce contrat" }),
|
|
25192
|
-
onOpenSLA && /* @__PURE__ */ jsxs85(
|
|
25218
|
+
onOpenSLA && /* @__PURE__ */ jsxs85(Button, { onClick: () => onOpenSLA(contract), children: [
|
|
25193
25219
|
/* @__PURE__ */ jsx91(Target3, { className: "w-4 h-4 mr-2" }),
|
|
25194
25220
|
"Configurer les SLA"
|
|
25195
25221
|
] })
|
|
@@ -25256,15 +25282,15 @@ var ViewContractContent = ({
|
|
|
25256
25282
|
] }),
|
|
25257
25283
|
/* @__PURE__ */ jsxs85("div", { className: "flex items-center gap-6", children: [
|
|
25258
25284
|
/* @__PURE__ */ jsxs85("div", { className: "flex items-center gap-2", children: [
|
|
25259
|
-
/* @__PURE__ */ jsx91(
|
|
25285
|
+
/* @__PURE__ */ jsx91(Badge2, { variant: "success", children: /* @__PURE__ */ jsxs85("span", { className: "flex items-center gap-1", children: [
|
|
25260
25286
|
/* @__PURE__ */ jsx91(CheckCircle11, { className: "w-3 h-3" }),
|
|
25261
25287
|
session.achieved_count
|
|
25262
25288
|
] }) }),
|
|
25263
|
-
/* @__PURE__ */ jsx91(
|
|
25289
|
+
/* @__PURE__ */ jsx91(Badge2, { variant: "warning", children: /* @__PURE__ */ jsxs85("span", { className: "flex items-center gap-1", children: [
|
|
25264
25290
|
/* @__PURE__ */ jsx91(AlertTriangle8, { className: "w-3 h-3" }),
|
|
25265
25291
|
session.warning_count
|
|
25266
25292
|
] }) }),
|
|
25267
|
-
/* @__PURE__ */ jsx91(
|
|
25293
|
+
/* @__PURE__ */ jsx91(Badge2, { variant: "danger", children: /* @__PURE__ */ jsxs85("span", { className: "flex items-center gap-1", children: [
|
|
25268
25294
|
/* @__PURE__ */ jsx91(AlertCircle7, { className: "w-3 h-3" }),
|
|
25269
25295
|
session.failed_count
|
|
25270
25296
|
] }) })
|
|
@@ -25293,7 +25319,7 @@ var ViewContractContent = ({
|
|
|
25293
25319
|
] })
|
|
25294
25320
|
] });
|
|
25295
25321
|
})(),
|
|
25296
|
-
/* @__PURE__ */ jsx91(
|
|
25322
|
+
/* @__PURE__ */ jsx91(Badge2, { variant: session.status === "validated" ? "success" : session.status === "completed" ? "info" : "default", children: session.status === "validated" ? "Valid\xE9e" : session.status === "completed" ? "Termin\xE9e" : "Brouillon" }),
|
|
25297
25323
|
session.evaluated_by_name && /* @__PURE__ */ jsxs85("div", { className: "flex items-center gap-1 text-sm text-gray-500", children: [
|
|
25298
25324
|
/* @__PURE__ */ jsx91(User3, { className: "w-4 h-4" }),
|
|
25299
25325
|
session.evaluated_by_name
|
|
@@ -25366,7 +25392,7 @@ var ViewContractContent = ({
|
|
|
25366
25392
|
]
|
|
25367
25393
|
}
|
|
25368
25394
|
) }),
|
|
25369
|
-
/* @__PURE__ */ jsx91("td", { className: "px-4 py-2 text-center", children: /* @__PURE__ */ jsx91(
|
|
25395
|
+
/* @__PURE__ */ jsx91("td", { className: "px-4 py-2 text-center", children: /* @__PURE__ */ jsx91(Badge2, { variant: evaluation.status === "achieved" ? "success" : evaluation.status === "warning" ? "warning" : "danger", children: evaluation.status === "achieved" ? "Atteint" : evaluation.status === "warning" ? "Attention" : "Non atteint" }) }),
|
|
25370
25396
|
/* @__PURE__ */ jsx91("td", { className: "px-4 py-2 truncate max-w-xs text-gray-500", children: evaluation.comments || "-" })
|
|
25371
25397
|
] }, evaluation.id);
|
|
25372
25398
|
}) })
|
|
@@ -25400,9 +25426,9 @@ var ViewContractContent = ({
|
|
|
25400
25426
|
] })
|
|
25401
25427
|
] }),
|
|
25402
25428
|
/* @__PURE__ */ jsxs85("div", { className: "flex items-center space-x-2", children: [
|
|
25403
|
-
/* @__PURE__ */ jsx91(
|
|
25404
|
-
/* @__PURE__ */ jsx91(
|
|
25405
|
-
/* @__PURE__ */ jsx91(
|
|
25429
|
+
/* @__PURE__ */ jsx91(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" }),
|
|
25430
|
+
/* @__PURE__ */ jsx91(Button, { variant: "text", size: "sm", children: /* @__PURE__ */ jsx91(Eye12, { className: "w-4 h-4" }) }),
|
|
25431
|
+
/* @__PURE__ */ jsx91(Button, { variant: "text", size: "sm", children: /* @__PURE__ */ jsx91(Download7, { className: "w-4 h-4" }) })
|
|
25406
25432
|
] })
|
|
25407
25433
|
] }) }, doc.id)) })
|
|
25408
25434
|
] }) : /* @__PURE__ */ jsxs85(RewiseCard, { className: "p-8 text-center", children: [
|
|
@@ -25421,7 +25447,7 @@ var ViewContractContent = ({
|
|
|
25421
25447
|
"Avenant ",
|
|
25422
25448
|
amendment.number
|
|
25423
25449
|
] }),
|
|
25424
|
-
/* @__PURE__ */ jsx91(
|
|
25450
|
+
/* @__PURE__ */ jsx91(Badge2, { variant: amendment.status === "active" ? "success" : amendment.status === "approved" ? "info" : "default", children: amendment.status === "active" ? "Actif" : amendment.status === "approved" ? "Approuv\xE9" : "Brouillon" })
|
|
25425
25451
|
] }),
|
|
25426
25452
|
/* @__PURE__ */ jsx91("p", { className: "text-sm text-gray-600 mb-2", children: amendment.description }),
|
|
25427
25453
|
/* @__PURE__ */ jsxs85("p", { className: "text-xs text-gray-500", children: [
|
|
@@ -25470,14 +25496,14 @@ var ViewContractContent = ({
|
|
|
25470
25496
|
/* @__PURE__ */ jsxs85("p", { className: "text-sm text-[#283042]/60 mt-1", children: [
|
|
25471
25497
|
contract.number,
|
|
25472
25498
|
" \u2022 ",
|
|
25473
|
-
contract.supplier_details?.
|
|
25499
|
+
contract.supplier_details?.legal_name || "Fournisseur non d\xE9fini"
|
|
25474
25500
|
] })
|
|
25475
25501
|
] }),
|
|
25476
|
-
/* @__PURE__ */ jsx91(
|
|
25502
|
+
/* @__PURE__ */ jsx91(Badge2, { variant: getStatusVariant(contract.status), children: contractStatusLabels[contract.status] })
|
|
25477
25503
|
] }),
|
|
25478
25504
|
/* @__PURE__ */ jsxs85("div", { className: "flex items-center space-x-2", children: [
|
|
25479
25505
|
onEdit && /* @__PURE__ */ jsxs85(
|
|
25480
|
-
|
|
25506
|
+
Button,
|
|
25481
25507
|
{
|
|
25482
25508
|
variant: "outline",
|
|
25483
25509
|
size: "sm",
|
|
@@ -25489,7 +25515,7 @@ var ViewContractContent = ({
|
|
|
25489
25515
|
}
|
|
25490
25516
|
),
|
|
25491
25517
|
/* @__PURE__ */ jsxs85(
|
|
25492
|
-
|
|
25518
|
+
Button,
|
|
25493
25519
|
{
|
|
25494
25520
|
variant: "outline",
|
|
25495
25521
|
size: "sm",
|
|
@@ -25501,7 +25527,7 @@ var ViewContractContent = ({
|
|
|
25501
25527
|
}
|
|
25502
25528
|
),
|
|
25503
25529
|
onDelete && /* @__PURE__ */ jsxs85(
|
|
25504
|
-
|
|
25530
|
+
Button,
|
|
25505
25531
|
{
|
|
25506
25532
|
variant: "outline",
|
|
25507
25533
|
size: "sm",
|
|
@@ -25528,7 +25554,7 @@ var ViewContractContent = ({
|
|
|
25528
25554
|
] })
|
|
25529
25555
|
] }),
|
|
25530
25556
|
/* @__PURE__ */ jsxs85(
|
|
25531
|
-
|
|
25557
|
+
Button,
|
|
25532
25558
|
{
|
|
25533
25559
|
variant: "outline",
|
|
25534
25560
|
size: "sm",
|
|
@@ -25565,7 +25591,7 @@ var ViewContractContent = ({
|
|
|
25565
25591
|
] }),
|
|
25566
25592
|
/* @__PURE__ */ jsxs85("div", { className: "flex items-center justify-end space-x-3 p-6 border-t border-gray-200", children: [
|
|
25567
25593
|
/* @__PURE__ */ jsxs85(
|
|
25568
|
-
|
|
25594
|
+
Button,
|
|
25569
25595
|
{
|
|
25570
25596
|
variant: "outline",
|
|
25571
25597
|
onClick: () => handleAction("archive"),
|
|
@@ -25577,7 +25603,7 @@ var ViewContractContent = ({
|
|
|
25577
25603
|
}
|
|
25578
25604
|
),
|
|
25579
25605
|
isExpiringSoon && /* @__PURE__ */ jsxs85(
|
|
25580
|
-
|
|
25606
|
+
Button,
|
|
25581
25607
|
{
|
|
25582
25608
|
variant: "primary",
|
|
25583
25609
|
onClick: () => handleAction("renew"),
|
|
@@ -27725,7 +27751,7 @@ var ContractModal = ({
|
|
|
27725
27751
|
};
|
|
27726
27752
|
if (mode === "view") {
|
|
27727
27753
|
return /* @__PURE__ */ jsx93(
|
|
27728
|
-
|
|
27754
|
+
Modal,
|
|
27729
27755
|
{
|
|
27730
27756
|
title: contractData?.title ?? "",
|
|
27731
27757
|
open: isOpen,
|
|
@@ -27745,7 +27771,7 @@ var ContractModal = ({
|
|
|
27745
27771
|
);
|
|
27746
27772
|
}
|
|
27747
27773
|
return /* @__PURE__ */ jsx93(
|
|
27748
|
-
|
|
27774
|
+
Modal,
|
|
27749
27775
|
{
|
|
27750
27776
|
title: mode === "edit" ? "Modifier le Contrat" : "Cr\xE9er un Nouveau Contrat",
|
|
27751
27777
|
open: isOpen,
|
|
@@ -27781,7 +27807,7 @@ import {
|
|
|
27781
27807
|
Euro as Euro3
|
|
27782
27808
|
} from "lucide-react";
|
|
27783
27809
|
import { jsx as jsx94, jsxs as jsxs87 } from "react/jsx-runtime";
|
|
27784
|
-
var
|
|
27810
|
+
var Badge3 = ({
|
|
27785
27811
|
children,
|
|
27786
27812
|
className = "",
|
|
27787
27813
|
variant = "default"
|
|
@@ -27835,7 +27861,7 @@ var ContractReportsModal = ({
|
|
|
27835
27861
|
(c) => (c.supplier_details?.id?.toString() || c.supplier?.toString()) === supplierId
|
|
27836
27862
|
);
|
|
27837
27863
|
return {
|
|
27838
|
-
supplier: contract?.supplier_details || { id: Number(supplierId),
|
|
27864
|
+
supplier: contract?.supplier_details || { id: Number(supplierId), legal_name: "Inconnu", vendor_number: "" },
|
|
27839
27865
|
...stats
|
|
27840
27866
|
};
|
|
27841
27867
|
}).sort((a, b) => b.avgScore - a.avgScore);
|
|
@@ -27906,7 +27932,7 @@ var ContractReportsModal = ({
|
|
|
27906
27932
|
};
|
|
27907
27933
|
return /* @__PURE__ */ jsxs87("div", { className: "flex items-center justify-between", children: [
|
|
27908
27934
|
/* @__PURE__ */ jsxs87("div", { className: "flex items-center space-x-3", children: [
|
|
27909
|
-
/* @__PURE__ */ jsx94(
|
|
27935
|
+
/* @__PURE__ */ jsx94(Badge3, { variant: status === "active" ? "default" : "outline", children: statusLabels[status] || status }),
|
|
27910
27936
|
/* @__PURE__ */ jsxs87("span", { className: "text-sm text-gray-600", children: [
|
|
27911
27937
|
count,
|
|
27912
27938
|
" contrats"
|
|
@@ -27934,7 +27960,7 @@ var ContractReportsModal = ({
|
|
|
27934
27960
|
getExpiringContracts().slice(0, 5).map((contract) => /* @__PURE__ */ jsxs87("div", { className: "flex items-center justify-between p-3 bg-orange-50 rounded-lg", children: [
|
|
27935
27961
|
/* @__PURE__ */ jsxs87("div", { children: [
|
|
27936
27962
|
/* @__PURE__ */ jsx94("p", { className: "font-medium", children: contract.number || contract.id }),
|
|
27937
|
-
/* @__PURE__ */ jsx94("p", { className: "text-sm text-gray-600", children: contract.supplier_details?.
|
|
27963
|
+
/* @__PURE__ */ jsx94("p", { className: "text-sm text-gray-600", children: contract.supplier_details?.legal_name || "Non d\xE9fini" })
|
|
27938
27964
|
] }),
|
|
27939
27965
|
/* @__PURE__ */ jsxs87("div", { className: "text-right", children: [
|
|
27940
27966
|
/* @__PURE__ */ jsx94("p", { className: "text-sm text-orange-600 font-medium", children: contract.end_date ? new Date(contract.end_date).toLocaleDateString("fr-FR") : "N/A" }),
|
|
@@ -27955,8 +27981,8 @@ var ContractReportsModal = ({
|
|
|
27955
27981
|
/* @__PURE__ */ jsx94("div", { className: "space-y-4", children: getSupplierPerformance().slice(0, 10).map((supplier) => /* @__PURE__ */ jsxs87("div", { className: "flex items-center justify-between p-4 bg-gray-50 rounded-lg", children: [
|
|
27956
27982
|
/* @__PURE__ */ jsxs87("div", { className: "flex-1", children: [
|
|
27957
27983
|
/* @__PURE__ */ jsxs87("div", { className: "flex items-center space-x-3 mb-2", children: [
|
|
27958
|
-
/* @__PURE__ */ jsx94("h4", { className: "font-medium", children: supplier?.supplier?.
|
|
27959
|
-
/* @__PURE__ */ jsxs87(
|
|
27984
|
+
/* @__PURE__ */ jsx94("h4", { className: "font-medium", children: supplier?.supplier?.legal_name || "Non d\xE9fini" }),
|
|
27985
|
+
/* @__PURE__ */ jsxs87(Badge3, { variant: "outline", children: [
|
|
27960
27986
|
supplier.totalContracts,
|
|
27961
27987
|
" contrats"
|
|
27962
27988
|
] })
|
|
@@ -27975,7 +28001,7 @@ var ContractReportsModal = ({
|
|
|
27975
28001
|
] })
|
|
27976
28002
|
] })
|
|
27977
28003
|
] }),
|
|
27978
|
-
supplier.slaBreaches > 0 && /* @__PURE__ */ jsx94("div", { className: "ml-4", children: /* @__PURE__ */ jsxs87(
|
|
28004
|
+
supplier.slaBreaches > 0 && /* @__PURE__ */ jsx94("div", { className: "ml-4", children: /* @__PURE__ */ jsxs87(Badge3, { variant: "outline", className: "text-red-600", children: [
|
|
27979
28005
|
supplier.slaBreaches,
|
|
27980
28006
|
" violations SLA"
|
|
27981
28007
|
] }) })
|
|
@@ -28003,9 +28029,9 @@ var ContractReportsModal = ({
|
|
|
28003
28029
|
/* @__PURE__ */ jsxs87("div", { className: "flex items-start justify-between mb-3", children: [
|
|
28004
28030
|
/* @__PURE__ */ jsxs87("div", { children: [
|
|
28005
28031
|
/* @__PURE__ */ jsx94("h4", { className: "font-medium", children: contract.number || contract.id }),
|
|
28006
|
-
/* @__PURE__ */ jsx94("p", { className: "text-sm text-gray-600", children: contract.supplier_details?.
|
|
28032
|
+
/* @__PURE__ */ jsx94("p", { className: "text-sm text-gray-600", children: contract.supplier_details?.legal_name || "Non d\xE9fini" })
|
|
28007
28033
|
] }),
|
|
28008
|
-
/* @__PURE__ */ jsx94(
|
|
28034
|
+
/* @__PURE__ */ jsx94(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" })
|
|
28009
28035
|
] }),
|
|
28010
28036
|
/* @__PURE__ */ jsxs87("div", { className: "grid grid-cols-2 gap-4 text-sm", children: [
|
|
28011
28037
|
/* @__PURE__ */ jsxs87("div", { children: [
|
|
@@ -28039,7 +28065,7 @@ var ContractReportsModal = ({
|
|
|
28039
28065
|
/* @__PURE__ */ jsx94("div", { className: "space-y-4", children: getSupplierPerformance().map((supplier) => /* @__PURE__ */ jsxs87("div", { className: "p-4 border rounded-lg", children: [
|
|
28040
28066
|
/* @__PURE__ */ jsxs87("div", { className: "flex items-start justify-between mb-4", children: [
|
|
28041
28067
|
/* @__PURE__ */ jsxs87("div", { children: [
|
|
28042
|
-
/* @__PURE__ */ jsx94("h4", { className: "font-medium text-lg", children: supplier?.supplier?.
|
|
28068
|
+
/* @__PURE__ */ jsx94("h4", { className: "font-medium text-lg", children: supplier?.supplier?.legal_name || "Non d\xE9fini" }),
|
|
28043
28069
|
/* @__PURE__ */ jsxs87("p", { className: "text-sm text-gray-600", children: [
|
|
28044
28070
|
supplier.totalContracts,
|
|
28045
28071
|
" contrat",
|
|
@@ -28061,7 +28087,7 @@ var ContractReportsModal = ({
|
|
|
28061
28087
|
] }),
|
|
28062
28088
|
/* @__PURE__ */ jsxs87("div", { children: [
|
|
28063
28089
|
/* @__PURE__ */ jsx94("p", { className: "text-sm text-gray-500", children: "Statut" }),
|
|
28064
|
-
/* @__PURE__ */ jsx94(
|
|
28090
|
+
/* @__PURE__ */ jsx94(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" })
|
|
28065
28091
|
] })
|
|
28066
28092
|
] })
|
|
28067
28093
|
] }, supplier?.supplier?.id || "unknown")) })
|
|
@@ -28119,7 +28145,7 @@ var ContractReportsModal = ({
|
|
|
28119
28145
|
};
|
|
28120
28146
|
}).sort((a, b) => b.totalValue - a.totalValue).slice(0, 10).map((supplier) => /* @__PURE__ */ jsxs87("div", { className: "flex items-center justify-between", children: [
|
|
28121
28147
|
/* @__PURE__ */ jsxs87("div", { className: "flex items-center space-x-3", children: [
|
|
28122
|
-
/* @__PURE__ */ jsx94("span", { className: "font-medium", children: supplier?.supplier?.
|
|
28148
|
+
/* @__PURE__ */ jsx94("span", { className: "font-medium", children: supplier?.supplier?.legal_name || "Non d\xE9fini" }),
|
|
28123
28149
|
/* @__PURE__ */ jsxs87("span", { className: "text-sm text-gray-600", children: [
|
|
28124
28150
|
supplier.totalContracts,
|
|
28125
28151
|
" contrats"
|
|
@@ -28155,7 +28181,7 @@ var ContractReportsModal = ({
|
|
|
28155
28181
|
];
|
|
28156
28182
|
if (!isOpen) return null;
|
|
28157
28183
|
return /* @__PURE__ */ jsx94(
|
|
28158
|
-
|
|
28184
|
+
Modal,
|
|
28159
28185
|
{
|
|
28160
28186
|
open: isOpen,
|
|
28161
28187
|
onClose,
|
|
@@ -28215,12 +28241,13 @@ import {
|
|
|
28215
28241
|
EyeOff as EyeOff5
|
|
28216
28242
|
} from "lucide-react";
|
|
28217
28243
|
import { jsx as jsx95, jsxs as jsxs88 } from "react/jsx-runtime";
|
|
28218
|
-
var
|
|
28244
|
+
var Button2 = ({ children, onClick, variant = "default", size = "md", className = "" }) => {
|
|
28219
28245
|
const baseStyles = "inline-flex items-center justify-center font-medium rounded-lg transition-colors";
|
|
28220
28246
|
const variantStyles2 = {
|
|
28221
28247
|
default: "bg-blue-600 text-white hover:bg-blue-700",
|
|
28222
28248
|
outline: "border border-gray-300 bg-white text-gray-700 hover:bg-gray-50",
|
|
28223
|
-
ghost: "text-gray-700 hover:bg-gray-100"
|
|
28249
|
+
ghost: "text-gray-700 hover:bg-gray-100",
|
|
28250
|
+
text: "text-gray-700 hover:bg-gray-100"
|
|
28224
28251
|
};
|
|
28225
28252
|
const sizeStyles = {
|
|
28226
28253
|
sm: "px-2 py-1 text-xs",
|
|
@@ -28229,7 +28256,7 @@ var Button3 = ({ children, onClick, variant = "default", size = "md", className
|
|
|
28229
28256
|
};
|
|
28230
28257
|
return /* @__PURE__ */ jsx95("button", { onClick, className: `${baseStyles} ${variantStyles2[variant]} ${sizeStyles[size]} ${className}`, children });
|
|
28231
28258
|
};
|
|
28232
|
-
var
|
|
28259
|
+
var Badge4 = ({
|
|
28233
28260
|
children,
|
|
28234
28261
|
className = "",
|
|
28235
28262
|
variant = "default"
|
|
@@ -28333,7 +28360,7 @@ var AlertsManagementModal = ({
|
|
|
28333
28360
|
type: "evaluation_due",
|
|
28334
28361
|
priority: "medium",
|
|
28335
28362
|
title: "\xC9valuation fournisseur requise",
|
|
28336
|
-
message: `Le fournisseur "${contract.supplier_details?.
|
|
28363
|
+
message: `Le fournisseur "${contract.supplier_details?.legal_name || "Non d\xE9fini"}" devrait \xEAtre \xE9valu\xE9 avant l'expiration du contrat`,
|
|
28337
28364
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
28338
28365
|
isRead: false,
|
|
28339
28366
|
actions: ["schedule_evaluation"]
|
|
@@ -28481,22 +28508,22 @@ var AlertsManagementModal = ({
|
|
|
28481
28508
|
/* @__PURE__ */ jsxs88("div", { className: "flex-1", children: [
|
|
28482
28509
|
/* @__PURE__ */ jsxs88("div", { className: "flex items-center space-x-2 mb-1", children: [
|
|
28483
28510
|
/* @__PURE__ */ jsx95("h4", { className: "font-medium text-gray-900", children: alert2.title }),
|
|
28484
|
-
/* @__PURE__ */ jsx95(
|
|
28485
|
-
/* @__PURE__ */ jsx95(
|
|
28511
|
+
/* @__PURE__ */ jsx95(Badge4, { className: getPriorityColor(alert2.priority), children: getPriorityLabel(alert2.priority) }),
|
|
28512
|
+
/* @__PURE__ */ jsx95(Badge4, { variant: "outline", children: getAlertTypeLabel(alert2.type) })
|
|
28486
28513
|
] }),
|
|
28487
28514
|
/* @__PURE__ */ jsx95("p", { className: "text-sm text-gray-600 mb-2", children: alert2.message }),
|
|
28488
28515
|
contract && /* @__PURE__ */ jsxs88("p", { className: "text-xs text-gray-500", children: [
|
|
28489
28516
|
"Contrat: ",
|
|
28490
28517
|
contract.number,
|
|
28491
28518
|
" - ",
|
|
28492
|
-
contract.supplier_details?.
|
|
28519
|
+
contract.supplier_details?.legal_name || "Non d\xE9fini"
|
|
28493
28520
|
] }),
|
|
28494
28521
|
/* @__PURE__ */ jsx95("p", { className: "text-xs text-gray-400", children: new Date(alert2.createdAt).toLocaleString("fr-FR") })
|
|
28495
28522
|
] })
|
|
28496
28523
|
] }),
|
|
28497
28524
|
/* @__PURE__ */ jsxs88("div", { className: "flex items-center space-x-2", children: [
|
|
28498
|
-
/* @__PURE__ */ jsx95(
|
|
28499
|
-
/* @__PURE__ */ jsx95(
|
|
28525
|
+
/* @__PURE__ */ jsx95(Button2, { variant: "text", size: "sm", onClick: () => markAsRead(alert2.id), children: alert2.isRead ? /* @__PURE__ */ jsx95(EyeOff5, { className: "w-4 h-4" }) : /* @__PURE__ */ jsx95(Eye13, { className: "w-4 h-4" }) }),
|
|
28526
|
+
/* @__PURE__ */ jsx95(Button2, { variant: "text", size: "sm", onClick: () => dismissAlert(alert2.id), children: /* @__PURE__ */ jsx95(X21, { className: "w-4 h-4" }) })
|
|
28500
28527
|
] })
|
|
28501
28528
|
] }),
|
|
28502
28529
|
alert2.actions && alert2.actions.length > 0 && /* @__PURE__ */ jsxs88("div", { className: "flex items-center space-x-2 pt-2 border-t", children: [
|
|
@@ -28524,8 +28551,8 @@ var AlertsManagementModal = ({
|
|
|
28524
28551
|
/* @__PURE__ */ jsxs88("div", { className: "flex-1", children: [
|
|
28525
28552
|
/* @__PURE__ */ jsxs88("div", { className: "flex items-center space-x-3 mb-2", children: [
|
|
28526
28553
|
/* @__PURE__ */ jsx95("h4", { className: "font-medium text-lg", children: rule.name }),
|
|
28527
|
-
/* @__PURE__ */ jsx95(
|
|
28528
|
-
/* @__PURE__ */ jsx95(
|
|
28554
|
+
/* @__PURE__ */ jsx95(Badge4, { className: getPriorityColor(rule.priority), children: getPriorityLabel(rule.priority) }),
|
|
28555
|
+
/* @__PURE__ */ jsx95(Badge4, { variant: rule.isActive ? "default" : "outline", children: rule.isActive ? "Active" : "Inactive" })
|
|
28529
28556
|
] }),
|
|
28530
28557
|
/* @__PURE__ */ jsx95("p", { className: "text-gray-600 mb-3", children: rule.description }),
|
|
28531
28558
|
/* @__PURE__ */ jsxs88("div", { className: "flex items-center space-x-4 text-sm text-gray-500", children: [
|
|
@@ -28544,9 +28571,9 @@ var AlertsManagementModal = ({
|
|
|
28544
28571
|
] })
|
|
28545
28572
|
] }),
|
|
28546
28573
|
/* @__PURE__ */ jsxs88("div", { className: "flex items-center space-x-2", children: [
|
|
28547
|
-
/* @__PURE__ */ jsx95(
|
|
28574
|
+
/* @__PURE__ */ jsx95(Button2, { variant: "text", size: "sm", children: /* @__PURE__ */ jsx95(Edit10, { className: "w-4 h-4" }) }),
|
|
28548
28575
|
/* @__PURE__ */ jsx95(
|
|
28549
|
-
|
|
28576
|
+
Button2,
|
|
28550
28577
|
{
|
|
28551
28578
|
variant: "text",
|
|
28552
28579
|
size: "sm",
|
|
@@ -28554,7 +28581,7 @@ var AlertsManagementModal = ({
|
|
|
28554
28581
|
children: rule.isActive ? /* @__PURE__ */ jsx95(EyeOff5, { className: "w-4 h-4" }) : /* @__PURE__ */ jsx95(Eye13, { className: "w-4 h-4" })
|
|
28555
28582
|
}
|
|
28556
28583
|
),
|
|
28557
|
-
/* @__PURE__ */ jsx95(
|
|
28584
|
+
/* @__PURE__ */ jsx95(Button2, { variant: "text", size: "sm", className: "text-red-600", children: /* @__PURE__ */ jsx95(Trash217, { className: "w-4 h-4" }) })
|
|
28558
28585
|
] })
|
|
28559
28586
|
] }),
|
|
28560
28587
|
/* @__PURE__ */ jsxs88("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
@@ -28570,7 +28597,7 @@ var AlertsManagementModal = ({
|
|
|
28570
28597
|
] }),
|
|
28571
28598
|
/* @__PURE__ */ jsxs88("div", { children: [
|
|
28572
28599
|
/* @__PURE__ */ jsx95("h5", { className: "font-medium mb-2", children: "Actions" }),
|
|
28573
|
-
/* @__PURE__ */ jsx95("div", { className: "flex items-center space-x-2", children: rule.actions.map((action, index) => /* @__PURE__ */ jsxs88(
|
|
28600
|
+
/* @__PURE__ */ jsx95("div", { className: "flex items-center space-x-2", children: rule.actions.map((action, index) => /* @__PURE__ */ jsxs88(Badge4, { variant: "outline", children: [
|
|
28574
28601
|
action.type === "email" ? /* @__PURE__ */ jsx95(Mail11, { className: "w-3 h-3 mr-1" }) : action.type === "sms" ? /* @__PURE__ */ jsx95(Smartphone3, { className: "w-3 h-3 mr-1" }) : /* @__PURE__ */ jsx95(Bell4, { className: "w-3 h-3 mr-1" }),
|
|
28575
28602
|
action.type
|
|
28576
28603
|
] }, index)) })
|
|
@@ -28651,7 +28678,7 @@ var AlertsManagementModal = ({
|
|
|
28651
28678
|
{ id: "settings", label: "Param\xE8tres", icon: Settings5 }
|
|
28652
28679
|
];
|
|
28653
28680
|
if (!isOpen) return null;
|
|
28654
|
-
return /* @__PURE__ */ jsx95(
|
|
28681
|
+
return /* @__PURE__ */ jsx95(Modal, { open: isOpen, onClose, width: "90%", title: "Gestion des alertes", description: "Surveillance et notifications automatiques", children: /* @__PURE__ */ jsxs88("div", { className: "flex flex-col max-h-[85vh]", children: [
|
|
28655
28682
|
/* @__PURE__ */ jsx95("div", { className: "border-b", children: /* @__PURE__ */ jsx95(
|
|
28656
28683
|
Tabs,
|
|
28657
28684
|
{
|
|
@@ -28822,7 +28849,7 @@ var BulkSLAEvaluationModal = ({
|
|
|
28822
28849
|
borderColor: colors.border
|
|
28823
28850
|
};
|
|
28824
28851
|
return /* @__PURE__ */ jsx96(
|
|
28825
|
-
|
|
28852
|
+
Modal,
|
|
28826
28853
|
{
|
|
28827
28854
|
title: "Session d'\xE9valuation SLA",
|
|
28828
28855
|
description: `${contract.supplier_details?.legal_name || "Fournisseur"} - ${contract.number}`,
|
|
@@ -30665,7 +30692,7 @@ var SLAManagementModal = ({
|
|
|
30665
30692
|
{ id: "notes", label: "Notes", icon: MessageSquare2 }
|
|
30666
30693
|
];
|
|
30667
30694
|
return /* @__PURE__ */ jsxs90(
|
|
30668
|
-
|
|
30695
|
+
Modal,
|
|
30669
30696
|
{
|
|
30670
30697
|
open: isOpen,
|
|
30671
30698
|
onClose,
|
|
@@ -30756,7 +30783,7 @@ var AddSLAIndicatorModal = ({
|
|
|
30756
30783
|
indicator,
|
|
30757
30784
|
isEdit = false
|
|
30758
30785
|
}) => {
|
|
30759
|
-
return /* @__PURE__ */ jsx97(
|
|
30786
|
+
return /* @__PURE__ */ jsx97(Modal, { open: isOpen, onClose, width: "w-[50vw]", title: isEdit ? "Modifier l'indicateur SLA" : "Ajouter un indicateur SLA", children: /* @__PURE__ */ jsx97("div", { className: "p-4", children: /* @__PURE__ */ jsx97(
|
|
30760
30787
|
SLAIndicatorForm,
|
|
30761
30788
|
{
|
|
30762
30789
|
indicator,
|
|
@@ -30797,7 +30824,7 @@ var AddSLAEvaluationModal = ({
|
|
|
30797
30824
|
setComments("");
|
|
30798
30825
|
onClose();
|
|
30799
30826
|
};
|
|
30800
|
-
return /* @__PURE__ */ jsx97(
|
|
30827
|
+
return /* @__PURE__ */ jsx97(Modal, { open: isOpen, onClose, width: "w-[50vw]", title: "Ajouter une mesure SLA", children: /* @__PURE__ */ jsxs90("form", { onSubmit: handleSubmit, className: "p-4 space-y-4", children: [
|
|
30801
30828
|
/* @__PURE__ */ jsxs90("div", { children: [
|
|
30802
30829
|
/* @__PURE__ */ jsx97("label", { className: "block text-sm font-medium mb-1", style: { color: colors.text.secondary }, children: "Indicateur" }),
|
|
30803
30830
|
/* @__PURE__ */ jsx97("p", { className: "font-medium", style: { color: colors.text.primary }, children: indicator.name }),
|
|
@@ -31009,7 +31036,7 @@ var SLAEvaluationForm = ({
|
|
|
31009
31036
|
{
|
|
31010
31037
|
label: "Date d'\xE9valuation *",
|
|
31011
31038
|
value: formData.evaluation_date || "",
|
|
31012
|
-
onChange: (
|
|
31039
|
+
onChange: (e) => handleInputChange("evaluation_date", e.target.value),
|
|
31013
31040
|
error: errors.evaluation_date
|
|
31014
31041
|
}
|
|
31015
31042
|
) }),
|
|
@@ -31018,7 +31045,7 @@ var SLAEvaluationForm = ({
|
|
|
31018
31045
|
{
|
|
31019
31046
|
label: `Valeur mesur\xE9e * (${indicator?.measurement_unit})`,
|
|
31020
31047
|
value: formData.value || 0,
|
|
31021
|
-
onChange: (
|
|
31048
|
+
onChange: (e) => handleInputChange("value", e.target.value),
|
|
31022
31049
|
step: 0.01,
|
|
31023
31050
|
min: 0,
|
|
31024
31051
|
error: errors.value
|
|
@@ -31057,8 +31084,8 @@ var SLAEvaluationForm = ({
|
|
|
31057
31084
|
{
|
|
31058
31085
|
label: "Mesur\xE9 par",
|
|
31059
31086
|
value: evaluatedByName,
|
|
31060
|
-
onChange: (
|
|
31061
|
-
setEvaluatedByName(value);
|
|
31087
|
+
onChange: (e) => {
|
|
31088
|
+
setEvaluatedByName(e.target.value);
|
|
31062
31089
|
if (errors.evaluated_by) {
|
|
31063
31090
|
const newErrors = { ...errors };
|
|
31064
31091
|
delete newErrors.evaluated_by;
|
|
@@ -31117,8 +31144,7 @@ var SLAEvaluationForm = ({
|
|
|
31117
31144
|
};
|
|
31118
31145
|
|
|
31119
31146
|
// src/components/contracts/components/AddSLAIndicatorModal.tsx
|
|
31120
|
-
import {
|
|
31121
|
-
import { jsx as jsx99, jsxs as jsxs92 } from "react/jsx-runtime";
|
|
31147
|
+
import { jsx as jsx99 } from "react/jsx-runtime";
|
|
31122
31148
|
var AddSLAIndicatorModal2 = ({
|
|
31123
31149
|
isOpen,
|
|
31124
31150
|
onClose,
|
|
@@ -31131,27 +31157,21 @@ var AddSLAIndicatorModal2 = ({
|
|
|
31131
31157
|
onSubmit(indicatorData);
|
|
31132
31158
|
onClose();
|
|
31133
31159
|
};
|
|
31134
|
-
return /* @__PURE__ */ jsx99(
|
|
31135
|
-
|
|
31136
|
-
|
|
31137
|
-
|
|
31138
|
-
|
|
31139
|
-
|
|
31140
|
-
|
|
31141
|
-
|
|
31142
|
-
|
|
31143
|
-
|
|
31144
|
-
onCancel: onClose,
|
|
31145
|
-
onShowToast,
|
|
31146
|
-
isEdit
|
|
31147
|
-
}
|
|
31148
|
-
) })
|
|
31149
|
-
] }) });
|
|
31160
|
+
return /* @__PURE__ */ jsx99(Modals_default, { title: isEdit ? "Modifier l'indicateur SLA" : "Nouvel indicateur SLA", open: isOpen, onClose, width: "w-[80vw]", children: /* @__PURE__ */ jsx99("div", { className: "flex flex-col max-h-[75vh]", children: /* @__PURE__ */ jsx99("div", { className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsx99(
|
|
31161
|
+
SLAIndicatorForm,
|
|
31162
|
+
{
|
|
31163
|
+
indicator,
|
|
31164
|
+
onSubmit: handleSubmit,
|
|
31165
|
+
onCancel: onClose,
|
|
31166
|
+
onShowToast,
|
|
31167
|
+
isEdit
|
|
31168
|
+
}
|
|
31169
|
+
) }) }) });
|
|
31150
31170
|
};
|
|
31151
31171
|
|
|
31152
31172
|
// src/components/contracts/components/AddSLAEvaluationModal.tsx
|
|
31153
|
-
import { X as
|
|
31154
|
-
import { jsx as jsx100, jsxs as
|
|
31173
|
+
import { X as X23 } from "lucide-react";
|
|
31174
|
+
import { jsx as jsx100, jsxs as jsxs92 } from "react/jsx-runtime";
|
|
31155
31175
|
var AddSLAEvaluationModal2 = ({
|
|
31156
31176
|
isOpen,
|
|
31157
31177
|
onClose,
|
|
@@ -31167,8 +31187,8 @@ var AddSLAEvaluationModal2 = ({
|
|
|
31167
31187
|
onSubmit(evaluationData);
|
|
31168
31188
|
onClose();
|
|
31169
31189
|
};
|
|
31170
|
-
return /* @__PURE__ */ jsx100(
|
|
31171
|
-
/* @__PURE__ */
|
|
31190
|
+
return /* @__PURE__ */ jsx100(Modal, { title: isEdit ? "Modifier l'\xE9valuation SLA" : "Nouvelle \xE9valuation SLA", open: isOpen, onClose, width: "w-[900px]", children: /* @__PURE__ */ jsxs92("div", { className: "flex flex-col h-[80vh]", children: [
|
|
31191
|
+
/* @__PURE__ */ jsxs92(
|
|
31172
31192
|
"div",
|
|
31173
31193
|
{
|
|
31174
31194
|
className: "flex items-center justify-between p-6 border-b",
|
|
@@ -31189,7 +31209,7 @@ var AddSLAEvaluationModal2 = ({
|
|
|
31189
31209
|
e.currentTarget.style.color = colors.text.secondary;
|
|
31190
31210
|
e.currentTarget.style.backgroundColor = "transparent";
|
|
31191
31211
|
},
|
|
31192
|
-
children: /* @__PURE__ */ jsx100(
|
|
31212
|
+
children: /* @__PURE__ */ jsx100(X23, { className: "w-5 h-5" })
|
|
31193
31213
|
}
|
|
31194
31214
|
)
|
|
31195
31215
|
]
|