ptechcore_ui 1.0.77 → 1.0.78
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 +259 -137
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +286 -163
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -191,9 +191,9 @@ __export(index_exports, {
|
|
|
191
191
|
fileManagerApi: () => fileManagerApi,
|
|
192
192
|
findFolderById: () => findFolderById2,
|
|
193
193
|
formatCurrency: () => formatCurrency,
|
|
194
|
-
formatDate: () =>
|
|
194
|
+
formatDate: () => formatDate2,
|
|
195
195
|
formatDateFR: () => formatDateFR,
|
|
196
|
-
formatDateTime: () =>
|
|
196
|
+
formatDateTime: () => formatDateTime2,
|
|
197
197
|
formatFileSize: () => formatFileSize,
|
|
198
198
|
getAllFolders: () => getAllFolders,
|
|
199
199
|
getAllSLATemplates: () => getAllSLATemplates,
|
|
@@ -700,6 +700,25 @@ function formatCurrency(amount, currency = "XAF") {
|
|
|
700
700
|
}
|
|
701
701
|
return new Intl.NumberFormat("fr-FR").format(amount) + " " + currency;
|
|
702
702
|
}
|
|
703
|
+
function formatDateTime(date) {
|
|
704
|
+
if (!date) return "Non d\xE9fini";
|
|
705
|
+
try {
|
|
706
|
+
const dateObj = typeof date === "string" ? new Date(date) : date;
|
|
707
|
+
if (isNaN(dateObj.getTime())) {
|
|
708
|
+
return "Date invalide";
|
|
709
|
+
}
|
|
710
|
+
return dateObj.toLocaleDateString("fr-FR", {
|
|
711
|
+
year: "numeric",
|
|
712
|
+
month: "long",
|
|
713
|
+
day: "numeric",
|
|
714
|
+
hour: "2-digit",
|
|
715
|
+
minute: "2-digit",
|
|
716
|
+
second: "2-digit"
|
|
717
|
+
});
|
|
718
|
+
} catch (error) {
|
|
719
|
+
return "Erreur de format";
|
|
720
|
+
}
|
|
721
|
+
}
|
|
703
722
|
|
|
704
723
|
// src/contexts/ThemeContext.tsx
|
|
705
724
|
var import_react2 = require("react");
|
|
@@ -1175,6 +1194,80 @@ var FetchApi = class {
|
|
|
1175
1194
|
if (!res.ok) throw new Error(await res.text());
|
|
1176
1195
|
return res.json();
|
|
1177
1196
|
}
|
|
1197
|
+
static async postFile(url, payload, token) {
|
|
1198
|
+
const headers = {};
|
|
1199
|
+
const local_token = localStorage.getItem("token");
|
|
1200
|
+
if (local_token) {
|
|
1201
|
+
headers["Authorization"] = `Token ${local_token}`;
|
|
1202
|
+
}
|
|
1203
|
+
let body;
|
|
1204
|
+
const business_entity_id = localStorage.getItem("active_center_id");
|
|
1205
|
+
if (payload instanceof FormData) {
|
|
1206
|
+
if (business_entity_id) {
|
|
1207
|
+
payload.append("business_entity_id", business_entity_id);
|
|
1208
|
+
payload.append("business_entity", business_entity_id);
|
|
1209
|
+
}
|
|
1210
|
+
body = payload;
|
|
1211
|
+
} else if (payload) {
|
|
1212
|
+
const formData = new FormData();
|
|
1213
|
+
Object.entries(payload).forEach(([key, value]) => {
|
|
1214
|
+
if (Array.isArray(value)) {
|
|
1215
|
+
formData.append(key, value.join(","));
|
|
1216
|
+
} else if (value !== null && value !== void 0) {
|
|
1217
|
+
formData.append(key, value);
|
|
1218
|
+
}
|
|
1219
|
+
});
|
|
1220
|
+
if (business_entity_id) {
|
|
1221
|
+
formData.append("business_entity_id", business_entity_id);
|
|
1222
|
+
formData.append("business_entity", business_entity_id);
|
|
1223
|
+
}
|
|
1224
|
+
body = formData;
|
|
1225
|
+
}
|
|
1226
|
+
const res = await fetch(url, {
|
|
1227
|
+
method: "POST",
|
|
1228
|
+
headers,
|
|
1229
|
+
body
|
|
1230
|
+
});
|
|
1231
|
+
if (!res.ok) throw new Error(await res.text());
|
|
1232
|
+
return res.json();
|
|
1233
|
+
}
|
|
1234
|
+
static async putFile(url, payload, token) {
|
|
1235
|
+
const headers = {};
|
|
1236
|
+
const local_token = localStorage.getItem("token");
|
|
1237
|
+
if (local_token) {
|
|
1238
|
+
headers["Authorization"] = `Token ${local_token}`;
|
|
1239
|
+
}
|
|
1240
|
+
let body;
|
|
1241
|
+
const business_entity_id = localStorage.getItem("active_center_id");
|
|
1242
|
+
if (payload instanceof FormData) {
|
|
1243
|
+
if (business_entity_id) {
|
|
1244
|
+
payload.append("business_entity_id", business_entity_id);
|
|
1245
|
+
payload.append("business_entity", business_entity_id);
|
|
1246
|
+
}
|
|
1247
|
+
body = payload;
|
|
1248
|
+
} else if (payload) {
|
|
1249
|
+
const formData = new FormData();
|
|
1250
|
+
Object.entries(payload).forEach(([key, value]) => {
|
|
1251
|
+
if (Array.isArray(value)) {
|
|
1252
|
+
formData.append(key, value.join(","));
|
|
1253
|
+
} else if (value !== null && value !== void 0) {
|
|
1254
|
+
formData.append(key, value);
|
|
1255
|
+
}
|
|
1256
|
+
});
|
|
1257
|
+
if (business_entity_id) {
|
|
1258
|
+
formData.append("business_entity_id", business_entity_id);
|
|
1259
|
+
formData.append("business_entity", business_entity_id);
|
|
1260
|
+
}
|
|
1261
|
+
body = formData;
|
|
1262
|
+
}
|
|
1263
|
+
const res = await fetch(url, {
|
|
1264
|
+
method: "PUT",
|
|
1265
|
+
headers,
|
|
1266
|
+
body
|
|
1267
|
+
});
|
|
1268
|
+
if (!res.ok) throw new Error(await res.text());
|
|
1269
|
+
return res.json();
|
|
1270
|
+
}
|
|
1178
1271
|
static async patch(url, payload, token) {
|
|
1179
1272
|
const headers = {
|
|
1180
1273
|
"Content-Type": "application/json"
|
|
@@ -1196,14 +1289,18 @@ var FetchApi = class {
|
|
|
1196
1289
|
var apiClient = {
|
|
1197
1290
|
get: (path) => FetchApi.get(`${API_URL}${path}`),
|
|
1198
1291
|
post: (path, data) => FetchApi.post(`${API_URL}${path}`, data),
|
|
1292
|
+
postFile: (path, data) => FetchApi.postFile(`${API_URL}${path}`, data),
|
|
1199
1293
|
put: (path, data) => FetchApi.put(`${API_URL}${path}`, data),
|
|
1294
|
+
putFile: (path, data) => FetchApi.putFile(`${API_URL}${path}`, data),
|
|
1200
1295
|
patch: (path, data) => FetchApi.patch(`${API_URL}${path}`, data),
|
|
1201
1296
|
delete: (path) => FetchApi.delete(`${API_URL}${path}`)
|
|
1202
1297
|
};
|
|
1203
1298
|
var coreApiClient = {
|
|
1204
1299
|
get: (path) => FetchApi.get(`${API_URL}/core${path}`),
|
|
1205
1300
|
post: (path, data) => FetchApi.post(`${API_URL}/core${path}`, data),
|
|
1301
|
+
postFile: (path, data) => FetchApi.postFile(`${API_URL}/core${path}`, data),
|
|
1206
1302
|
put: (path, data) => FetchApi.put(`${API_URL}/core${path}`, data),
|
|
1303
|
+
putFile: (path, data) => FetchApi.putFile(`${API_URL}/core${path}`, data),
|
|
1207
1304
|
patch: (path, data) => FetchApi.patch(`${API_URL}/core${path}`, data),
|
|
1208
1305
|
delete: (path) => FetchApi.delete(`${API_URL}/core${path}`)
|
|
1209
1306
|
};
|
|
@@ -1430,7 +1527,7 @@ var UserServices = {
|
|
|
1430
1527
|
// Obtenir toutes les notifications de l'utilisateur
|
|
1431
1528
|
getUsersNotifications: () => FetchApi.get(`${USERS_API_URL}notifications/`),
|
|
1432
1529
|
// Marquer une notification comme lue
|
|
1433
|
-
markNotificationAsRead: (notificationId) => FetchApi.post(`${
|
|
1530
|
+
markNotificationAsRead: (notificationId) => FetchApi.post(`${API_URL}/core/notifications/${notificationId}/mark-read/`, {}),
|
|
1434
1531
|
// Obtenir un utilisateur par ID
|
|
1435
1532
|
getUser: (id, token) => FetchApi.get(`${USERS_API_URL}${id}/`, token),
|
|
1436
1533
|
// Mettre à jour un utilisateur
|
|
@@ -2984,11 +3081,11 @@ var RewiseLayout = ({ children, module_name = "Rewise", module_description = "",
|
|
|
2984
3081
|
{
|
|
2985
3082
|
className: "relative p-2 hover:bg-[var(--color-surface-hover)] rounded-lg transition-colors",
|
|
2986
3083
|
onClick: () => setShowNotifications(!showNotifications),
|
|
2987
|
-
|
|
3084
|
+
title: `Notifications ${notifications.filter((n) => !n.is_read && !["approved"].includes(n?.object_detail?.answer)).length > 0 ? `(${notifications.filter((n) => !n.is_read && !["approved"].includes(n?.object_detail?.answer)).length} non lues)` : ""}`,
|
|
2988
3085
|
"aria-expanded": showNotifications,
|
|
2989
3086
|
children: [
|
|
2990
3087
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react3.Bell, { className: "w-5 h-5 text-[var(--color-text-secondary)]" }),
|
|
2991
|
-
notifications.filter((n) => !n.
|
|
3088
|
+
notifications.filter((n) => !n.is_read && !["approved"].includes(n?.object_detail?.answer)).length > 0 && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "absolute top-1 right-1 w-2 h-2 bg-[var(--color-error)] rounded-full" })
|
|
2992
3089
|
]
|
|
2993
3090
|
}
|
|
2994
3091
|
),
|
|
@@ -3000,31 +3097,29 @@ var RewiseLayout = ({ children, module_name = "Rewise", module_description = "",
|
|
|
3000
3097
|
"aria-label": "Centre de notifications",
|
|
3001
3098
|
children: [
|
|
3002
3099
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "p-4 border-b border-[var(--color-border)]", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h3", { className: "font-semibold text-[var(--color-text-primary)]", children: "Notifications" }) }),
|
|
3003
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "divide-y divide-[var(--color-border)]", children: notifications.map(
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
"
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
"
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
notif.id
|
|
3027
|
-
)) })
|
|
3100
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "divide-y divide-[var(--color-border)]", children: notifications.map(
|
|
3101
|
+
(notif) => {
|
|
3102
|
+
const is_read = notif.is_read || ["approved"].includes(notif?.object_detail?.answer);
|
|
3103
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
3104
|
+
"div",
|
|
3105
|
+
{
|
|
3106
|
+
className: cn(
|
|
3107
|
+
"p-4 hover:bg-[var(--color-surface-hover)] cursor-pointer"
|
|
3108
|
+
),
|
|
3109
|
+
onClick: () => markNotificationAsRead(notif.id),
|
|
3110
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-start gap-3", children: [
|
|
3111
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "mt-2", children: !is_read ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react3.Mail, { size: 15, className: "text-[var(--color-primary)]" }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react3.MailOpen, { size: 15, className: "text-gray-500" }) }),
|
|
3112
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex-1", children: [
|
|
3113
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: `text-sm ${!is_read ? "text-black font-bold" : " font-normal text-[var(--color-text-primary)]"}`, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "flex items-center gap-2", children: notif.title }) }),
|
|
3114
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-xs text-[var(--color-text-secondary)] mt-1", children: notif.message }),
|
|
3115
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-xs text-[var(--color-text-tertiary)] mt-2", children: formatDateTime(notif?.created_at) ?? "-" })
|
|
3116
|
+
] })
|
|
3117
|
+
] })
|
|
3118
|
+
},
|
|
3119
|
+
notif.id
|
|
3120
|
+
);
|
|
3121
|
+
}
|
|
3122
|
+
) })
|
|
3028
3123
|
]
|
|
3029
3124
|
}
|
|
3030
3125
|
)
|
|
@@ -7209,7 +7304,7 @@ var formatFileSize = (bytes) => {
|
|
|
7209
7304
|
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
7210
7305
|
return `${parseFloat((bytes / Math.pow(k, i)).toFixed(1))} ${units[i]}`;
|
|
7211
7306
|
};
|
|
7212
|
-
var
|
|
7307
|
+
var formatDate2 = (date) => {
|
|
7213
7308
|
if (!date) {
|
|
7214
7309
|
return "-";
|
|
7215
7310
|
}
|
|
@@ -7223,7 +7318,7 @@ var formatDate = (date) => {
|
|
|
7223
7318
|
year: "numeric"
|
|
7224
7319
|
});
|
|
7225
7320
|
};
|
|
7226
|
-
var
|
|
7321
|
+
var formatDateTime2 = (date) => {
|
|
7227
7322
|
if (!date) {
|
|
7228
7323
|
return "-";
|
|
7229
7324
|
}
|
|
@@ -7379,7 +7474,7 @@ var FileCard = ({ item, variant = "grid" }) => {
|
|
|
7379
7474
|
}
|
|
7380
7475
|
) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "block truncate text-sm text-gray-900 dark:text-gray-100", children: item.name }) }),
|
|
7381
7476
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "text-xs text-gray-500 dark:text-gray-400 w-20 text-right", children: !isFolder && formatFileSize(item.size) }),
|
|
7382
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "text-xs text-gray-500 dark:text-gray-400 w-24 text-right", children:
|
|
7477
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "text-xs text-gray-500 dark:text-gray-400 w-24 text-right", children: formatDate2(item.updatedAt || item.createdAt) })
|
|
7383
7478
|
]
|
|
7384
7479
|
}
|
|
7385
7480
|
);
|
|
@@ -10835,7 +10930,7 @@ var ApprovalWorkflow = ({
|
|
|
10835
10930
|
email: v.user_detail?.email || "",
|
|
10836
10931
|
role: v.user_detail?.phonenumber || "-",
|
|
10837
10932
|
status: v.answer === "approved" /* APPROVED */ ? "approved" : v.answer === "refused" /* REFUSED */ ? "rejected" : "pending",
|
|
10838
|
-
answer: v.answer === "approved" /* APPROVED */ ? 2 : v.answer === "waiting" /* WAITING */ ? 1 : v.answer === "refused" /* REFUSED */ ? -1 : 0,
|
|
10933
|
+
answer: v.answer === "approved" /* APPROVED */ ? 2 : v.answer === "waiting" /* WAITING */ ? 1 : v.answer === "refused" /* REFUSED */ ? -1 : v.answer === "suggest-correction" /* SUGGEST_CORRECTION */ ? -2 : 0,
|
|
10839
10934
|
rank: v.rank,
|
|
10840
10935
|
note: v.note
|
|
10841
10936
|
})));
|
|
@@ -10850,7 +10945,7 @@ var ApprovalWorkflow = ({
|
|
|
10850
10945
|
email: v.user_detail?.email || "",
|
|
10851
10946
|
role: v.user_detail?.phonenumber || "-",
|
|
10852
10947
|
status: v.answer === "approved" /* APPROVED */ ? "approved" : v.answer === "refused" /* REFUSED */ ? "rejected" : "pending",
|
|
10853
|
-
answer: v.answer === "approved" /* APPROVED */ ? 2 : v.answer === "waiting" /* WAITING */ ? 1 : v.answer === "refused" /* REFUSED */ ? -1 : 0,
|
|
10948
|
+
answer: v.answer === "approved" /* APPROVED */ ? 2 : v.answer === "waiting" /* WAITING */ ? 1 : v.answer === "refused" /* REFUSED */ ? -1 : v.answer === "suggest-correction" /* SUGGEST_CORRECTION */ ? -2 : 0,
|
|
10854
10949
|
rank: v.rank,
|
|
10855
10950
|
note: v.note
|
|
10856
10951
|
})));
|
|
@@ -10925,14 +11020,24 @@ var ApprovalWorkflow = ({
|
|
|
10925
11020
|
}
|
|
10926
11021
|
setTransmitting(true);
|
|
10927
11022
|
try {
|
|
10928
|
-
|
|
10929
|
-
|
|
10930
|
-
const response = await ApprovalServices.start(caseData.id, token);
|
|
11023
|
+
if (formData.status === "suggest-correction" /* SUGGEST_CORRECTION */ && caseData?.id) {
|
|
11024
|
+
const response = await ApprovalServices.restart(caseData.id, token);
|
|
10931
11025
|
if (response.success) {
|
|
10932
|
-
showSuccess("
|
|
11026
|
+
showSuccess("Nouvelle version cr\xE9\xE9e et transmise avec succ\xE8s");
|
|
10933
11027
|
await loadCase();
|
|
10934
11028
|
} else {
|
|
10935
|
-
showError("Erreur lors de la transmission");
|
|
11029
|
+
showError("Erreur lors de la re-transmission");
|
|
11030
|
+
}
|
|
11031
|
+
} else {
|
|
11032
|
+
await handleSave();
|
|
11033
|
+
if (caseData?.id) {
|
|
11034
|
+
const response = await ApprovalServices.start(caseData.id, token);
|
|
11035
|
+
if (response.success) {
|
|
11036
|
+
showSuccess("Demande de validation transmise avec succ\xE8s");
|
|
11037
|
+
await loadCase();
|
|
11038
|
+
} else {
|
|
11039
|
+
showError("Erreur lors de la transmission");
|
|
11040
|
+
}
|
|
10936
11041
|
}
|
|
10937
11042
|
}
|
|
10938
11043
|
} catch (error) {
|
|
@@ -11091,12 +11196,19 @@ var ApprovalWorkflow = ({
|
|
|
11091
11196
|
switch (activeTab) {
|
|
11092
11197
|
case "workflow":
|
|
11093
11198
|
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "space-y-6", children: [
|
|
11199
|
+
formData.status === "suggest-correction" /* SUGGEST_CORRECTION */ && /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "p-4 rounded-lg border border-[var(--color-warning)] bg-[var(--color-warning-light)] flex items-start gap-3", children: [
|
|
11200
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react21.Edit, { className: "w-5 h-5 flex-shrink-0 mt-0.5", style: { color: "var(--color-warning)" } }),
|
|
11201
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { children: [
|
|
11202
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "text-sm font-medium", style: { color: "var(--color-warning)" }, children: "Une modification a \xE9t\xE9 sugg\xE9r\xE9e sur cette demande" }),
|
|
11203
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "text-xs text-gray-500 mt-1", children: "Veuillez prendre en compte les commentaires et re-transmettre la demande." })
|
|
11204
|
+
] })
|
|
11205
|
+
] }),
|
|
11094
11206
|
renderStageSection("Verification", verification, setVerification, "verification"),
|
|
11095
11207
|
renderStageSection("Validation", validation, setValidation, "validation"),
|
|
11096
11208
|
!readOnly && /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex justify-between pt-4 border-t border-[#D9D9D9]", children: [
|
|
11097
11209
|
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "flex gap-3" }),
|
|
11098
11210
|
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex gap-3", children: [
|
|
11099
|
-
formData.status
|
|
11211
|
+
(formData.status === "not-send" /* NOT_SEND */ || formData.status === "suggest-correction" /* SUGGEST_CORRECTION */) && /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
11100
11212
|
Buttons_default,
|
|
11101
11213
|
{
|
|
11102
11214
|
onClick: handleSave,
|
|
@@ -11108,13 +11220,13 @@ var ApprovalWorkflow = ({
|
|
|
11108
11220
|
]
|
|
11109
11221
|
}
|
|
11110
11222
|
),
|
|
11111
|
-
formData.status === "not-send" /* NOT_SEND */ && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
11223
|
+
(formData.status === "not-send" /* NOT_SEND */ || formData.status === "suggest-correction" /* SUGGEST_CORRECTION */) && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
11112
11224
|
Buttons_default,
|
|
11113
11225
|
{
|
|
11114
11226
|
onClick: handleTransmit,
|
|
11115
11227
|
disabled: transmitting || saving,
|
|
11116
11228
|
type: "button",
|
|
11117
|
-
children: transmitting ? "Transmission..." : "Transmettre"
|
|
11229
|
+
children: transmitting ? "Transmission..." : formData.status === "suggest-correction" /* SUGGEST_CORRECTION */ ? "Re-transmettre" : "Transmettre"
|
|
11118
11230
|
}
|
|
11119
11231
|
)
|
|
11120
11232
|
] })
|
|
@@ -11319,71 +11431,81 @@ var StageRow = ({
|
|
|
11319
11431
|
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "inline-flex items-center justify-center w-6 h-6 bg-gray-300 rounded-full", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-white text-xs", children: "\u23F1" }) });
|
|
11320
11432
|
} else if (answer === -1) {
|
|
11321
11433
|
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "inline-flex items-center justify-center w-6 h-6 bg-[var(--color-error)] rounded-full", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("svg", { className: "w-4 h-4 text-white", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("path", { fillRule: "evenodd", d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z", clipRule: "evenodd" }) }) });
|
|
11434
|
+
} else if (answer === -2) {
|
|
11435
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "inline-flex items-center justify-center w-6 h-6 bg-[var(--color-warning)] rounded-full", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react21.Edit, { className: "w-4 h-4 text-white" }) });
|
|
11322
11436
|
}
|
|
11323
11437
|
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-gray-400 text-xs", children: "-" });
|
|
11324
11438
|
};
|
|
11325
|
-
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
11326
|
-
/* @__PURE__ */ (0, import_jsx_runtime32.
|
|
11327
|
-
"
|
|
11328
|
-
|
|
11329
|
-
|
|
11330
|
-
|
|
11331
|
-
|
|
11332
|
-
|
|
11333
|
-
|
|
11334
|
-
|
|
11335
|
-
|
|
11336
|
-
|
|
11337
|
-
|
|
11338
|
-
|
|
11339
|
-
|
|
11340
|
-
|
|
11341
|
-
|
|
11342
|
-
|
|
11343
|
-
|
|
11344
|
-
|
|
11345
|
-
|
|
11346
|
-
|
|
11347
|
-
|
|
11348
|
-
|
|
11349
|
-
|
|
11350
|
-
|
|
11351
|
-
|
|
11352
|
-
|
|
11353
|
-
|
|
11354
|
-
|
|
11355
|
-
|
|
11356
|
-
|
|
11357
|
-
|
|
11358
|
-
|
|
11359
|
-
|
|
11360
|
-
|
|
11361
|
-
|
|
11362
|
-
|
|
11363
|
-
|
|
11364
|
-
|
|
11365
|
-
|
|
11366
|
-
|
|
11367
|
-
|
|
11368
|
-
|
|
11369
|
-
|
|
11370
|
-
|
|
11371
|
-
|
|
11372
|
-
|
|
11373
|
-
|
|
11374
|
-
|
|
11375
|
-
|
|
11376
|
-
|
|
11377
|
-
|
|
11378
|
-
"
|
|
11379
|
-
|
|
11380
|
-
|
|
11381
|
-
|
|
11382
|
-
|
|
11383
|
-
|
|
11384
|
-
|
|
11385
|
-
|
|
11386
|
-
|
|
11439
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
|
|
11440
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("tr", { className: "hover:bg-gray-50", children: [
|
|
11441
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("td", { className: "border border-gray-300 px-2 py-2 text-center", children: !readOnly && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
11442
|
+
"button",
|
|
11443
|
+
{
|
|
11444
|
+
type: "button",
|
|
11445
|
+
onClick: onRemove,
|
|
11446
|
+
className: "text-[#B85450] hover:text-[var(--color-error)] transition-colors",
|
|
11447
|
+
title: "Supprimer",
|
|
11448
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react21.Trash2, { className: "w-4 h-4" })
|
|
11449
|
+
}
|
|
11450
|
+
) }),
|
|
11451
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("td", { className: "border border-gray-300 px-4 py-2 text-center", children: index + 1 }),
|
|
11452
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("td", { className: "border border-gray-300 px-2 py-2", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
11453
|
+
SelectInput,
|
|
11454
|
+
{
|
|
11455
|
+
value: stage.space_answer,
|
|
11456
|
+
onChange: (e) => handleSpaceAnswerChange(e),
|
|
11457
|
+
disabled: readOnly,
|
|
11458
|
+
options: [
|
|
11459
|
+
{ value: "internal", label: "Interne" },
|
|
11460
|
+
{ value: "external", label: "Externe" }
|
|
11461
|
+
]
|
|
11462
|
+
}
|
|
11463
|
+
) }),
|
|
11464
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("td", { className: "border border-gray-300 px-2 py-2", children: stage.space_answer === "internal" ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
11465
|
+
SearchableSelect,
|
|
11466
|
+
{
|
|
11467
|
+
options: userOptions,
|
|
11468
|
+
value: stage.user,
|
|
11469
|
+
placeholder: "S\xE9lectionner...",
|
|
11470
|
+
searchPlaceholder: "Rechercher...",
|
|
11471
|
+
onSelect: handleUserSelect,
|
|
11472
|
+
disabled: readOnly || loadingUsers,
|
|
11473
|
+
filterFunction: userFilterFunction
|
|
11474
|
+
}
|
|
11475
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
11476
|
+
TextInput,
|
|
11477
|
+
{
|
|
11478
|
+
value: stage.name,
|
|
11479
|
+
onChange: (e) => onUpdate({ name: e.target.value }),
|
|
11480
|
+
disabled: readOnly
|
|
11481
|
+
}
|
|
11482
|
+
) }),
|
|
11483
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("td", { className: "border border-gray-300 px-2 py-2", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
11484
|
+
TextInput,
|
|
11485
|
+
{
|
|
11486
|
+
type: "email",
|
|
11487
|
+
value: stage.email,
|
|
11488
|
+
onChange: (e) => onUpdate({ email: e.target.value }),
|
|
11489
|
+
disabled: readOnly || stage.space_answer === "internal"
|
|
11490
|
+
}
|
|
11491
|
+
) }),
|
|
11492
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("td", { className: "border border-gray-300 px-2 py-2", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
11493
|
+
"input",
|
|
11494
|
+
{
|
|
11495
|
+
type: "text",
|
|
11496
|
+
value: stage.role,
|
|
11497
|
+
disabled: true,
|
|
11498
|
+
className: "w-full px-2 py-1 border border-gray-300 rounded text-sm bg-gray-100"
|
|
11499
|
+
}
|
|
11500
|
+
) }),
|
|
11501
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("td", { className: "border border-gray-300 px-4 py-2 text-center", children: getStatusIcon(stage.answer) })
|
|
11502
|
+
] }),
|
|
11503
|
+
stage.note && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("td", { colSpan: 7, className: "border border-gray-300 px-4 py-2 bg-[var(--color-warning-light)]", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("p", { className: "text-xs text-gray-600 italic flex items-center gap-1", children: [
|
|
11504
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react21.MessageSquare, { className: "w-3 h-3" }),
|
|
11505
|
+
' Note : "',
|
|
11506
|
+
stage.note,
|
|
11507
|
+
'"'
|
|
11508
|
+
] }) }) })
|
|
11387
11509
|
] });
|
|
11388
11510
|
};
|
|
11389
11511
|
var AddStageButton = ({
|
|
@@ -11934,7 +12056,7 @@ var getRole = (a, center_id) => {
|
|
|
11934
12056
|
console.log(a.user_detail, center_id);
|
|
11935
12057
|
return a.user_detail?.centers_access?.find((c) => c.id === center_id)?.fonction ?? "";
|
|
11936
12058
|
};
|
|
11937
|
-
var
|
|
12059
|
+
var formatDate3 = (date) => date ? formatDateFR(date) : "-";
|
|
11938
12060
|
var borderStyle = { borderColor: "var(--color-border)" };
|
|
11939
12061
|
var cellClass = "border px-2 py-1";
|
|
11940
12062
|
var headerStyle = { ...borderStyle, color: "var(--color-text-secondary)" };
|
|
@@ -11969,7 +12091,7 @@ var ApprovalRecap = ({ process, object_id }) => {
|
|
|
11969
12091
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("tr", { children: [
|
|
11970
12092
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("td", { className: `${cellClass} uppercase`, style: { ...borderStyle, color: "var(--color-text)" }, children: getName(item) }),
|
|
11971
12093
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("td", { className: `${cellClass} uppercase`, style: { ...borderStyle, color: "var(--color-text)" }, children: getRole(item, activeBusinessEntity?.id ?? null) }),
|
|
11972
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("td", { className: cellClass, style: borderStyle, children:
|
|
12094
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("td", { className: cellClass, style: borderStyle, children: formatDate3(item.answered_at) }),
|
|
11973
12095
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("td", { className: cellClass, style: borderStyle, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "inline-flex items-center gap-1", style: { color: s.color }, children: s.icon }) }),
|
|
11974
12096
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("td", { className: cellClass, style: borderStyle })
|
|
11975
12097
|
] }, i);
|
|
@@ -11990,7 +12112,7 @@ var ApprovalRecap = ({ process, object_id }) => {
|
|
|
11990
12112
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("td", { className: cellClass, style: borderStyle, children: "Demand\xE9 par" }),
|
|
11991
12113
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("td", { className: `${cellClass} uppercase`, style: { ...borderStyle, color: "var(--color-text)" }, children: `${requester.first_name} ${requester.last_name}`.trim() }),
|
|
11992
12114
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("td", { className: `${cellClass} uppercase`, style: { ...borderStyle, color: "var(--color-text)" }, children: requester?.centers_access?.find((c) => c.id === activeBusinessEntity?.id)?.fonction ?? "" }),
|
|
11993
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("td", { className: cellClass, style: borderStyle, children:
|
|
12115
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("td", { className: cellClass, style: borderStyle, children: formatDate3(caseData.created_at) }),
|
|
11994
12116
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("td", { className: cellClass, style: borderStyle, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "inline-flex items-center gap-1", style: { color: "var(--color-primary)" }, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react23.CheckCircle, { className: "w-3.5 h-3.5" }) }) }),
|
|
11995
12117
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("td", { className: cellClass, style: borderStyle })
|
|
11996
12118
|
] }),
|
|
@@ -12712,7 +12834,7 @@ var DetailField = ({ label, value }) => value ? /* @__PURE__ */ (0, import_jsx_r
|
|
|
12712
12834
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "text-xs text-[var(--color-text-tertiary)]", children: label }),
|
|
12713
12835
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "text-sm font-medium text-[var(--color-text-primary)]", children: typeof value === "string" || typeof value === "number" ? value : value })
|
|
12714
12836
|
] }) : null;
|
|
12715
|
-
var
|
|
12837
|
+
var formatDate4 = (d) => d ? new Date(d).toLocaleString("fr-FR", { day: "2-digit", month: "long", year: "numeric", hour: "2-digit", minute: "2-digit" }) : "-";
|
|
12716
12838
|
var ActivityDetailModal = ({ activity }) => {
|
|
12717
12839
|
const d = activity.detail;
|
|
12718
12840
|
if (!d) return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "text-sm text-[var(--color-text-secondary)]", children: "Aucun d\xE9tail disponible." });
|
|
@@ -12735,7 +12857,7 @@ var ActivityDetailModal = ({ activity }) => {
|
|
|
12735
12857
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DetailField, { label: "Adresse de livraison", value: d.delivery_address }),
|
|
12736
12858
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DetailField, { label: "Contact livraison", value: d.delivery_contact }),
|
|
12737
12859
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DetailField, { label: "T\xE9l. livraison", value: d.delivery_phone }),
|
|
12738
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DetailField, { label: "Cr\xE9\xE9 le", value:
|
|
12860
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DetailField, { label: "Cr\xE9\xE9 le", value: formatDate4(d.created_at) }),
|
|
12739
12861
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DetailField, { label: "Commentaires", value: d.comments })
|
|
12740
12862
|
] }),
|
|
12741
12863
|
d.items?.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { children: [
|
|
@@ -12790,7 +12912,7 @@ var ActivityDetailModal = ({ activity }) => {
|
|
|
12790
12912
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DetailField, { label: "Prix final", value: d.final_price ? `${d.final_price.toLocaleString("fr-FR")} FCFA` : void 0 }),
|
|
12791
12913
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DetailField, { label: "Remise", value: d.global_discount ? `${d.global_discount}${d.global_discount_type === "percentage" ? "%" : " FCFA"}` : void 0 }),
|
|
12792
12914
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DetailField, { label: "Observations", value: d.observations }),
|
|
12793
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DetailField, { label: "Cr\xE9\xE9 le", value:
|
|
12915
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DetailField, { label: "Cr\xE9\xE9 le", value: formatDate4(d.created_at) })
|
|
12794
12916
|
] }),
|
|
12795
12917
|
d.items?.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { children: [
|
|
12796
12918
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("h4", { className: "text-sm font-semibold text-[var(--color-text-primary)] mb-2", children: [
|
|
@@ -12837,9 +12959,9 @@ var ActivityDetailModal = ({ activity }) => {
|
|
|
12837
12959
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "grid grid-cols-2 md:grid-cols-3 gap-4 bg-[var(--color-surface-hover)] rounded-lg p-4", children: [
|
|
12838
12960
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DetailField, { label: "Type de r\xE9ception", value: d.type_of_receipt }),
|
|
12839
12961
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DetailField, { label: "Adresse de r\xE9ception", value: d.receipt_address }),
|
|
12840
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DetailField, { label: "Date de r\xE9ception", value:
|
|
12962
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DetailField, { label: "Date de r\xE9ception", value: formatDate4(d.received_at) }),
|
|
12841
12963
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DetailField, { label: "Commentaires", value: d.comments }),
|
|
12842
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DetailField, { label: "Cr\xE9\xE9 le", value:
|
|
12964
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DetailField, { label: "Cr\xE9\xE9 le", value: formatDate4(d.created_at) })
|
|
12843
12965
|
] }),
|
|
12844
12966
|
d.items?.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { children: [
|
|
12845
12967
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("h4", { className: "text-sm font-semibold text-[var(--color-text-primary)] mb-2", children: [
|
|
@@ -27571,7 +27693,7 @@ var ViewContractContent = ({
|
|
|
27571
27693
|
};
|
|
27572
27694
|
}, [contract]);
|
|
27573
27695
|
if (!contract) return null;
|
|
27574
|
-
const
|
|
27696
|
+
const formatDate5 = (dateString) => {
|
|
27575
27697
|
if (!dateString) return "Non d\xE9fini";
|
|
27576
27698
|
return new Date(dateString).toLocaleDateString("fr-FR");
|
|
27577
27699
|
};
|
|
@@ -27850,19 +27972,19 @@ var ViewContractContent = ({
|
|
|
27850
27972
|
/* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("dl", { className: "space-y-3", children: [
|
|
27851
27973
|
/* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "flex justify-between", children: [
|
|
27852
27974
|
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("dt", { className: "text-sm font-medium text-gray-500", children: "Date de cr\xE9ation" }),
|
|
27853
|
-
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("dd", { className: "text-sm text-gray-900", children:
|
|
27975
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("dd", { className: "text-sm text-gray-900", children: formatDate5(contract.created_at || contract.created_at) })
|
|
27854
27976
|
] }),
|
|
27855
27977
|
/* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "flex justify-between", children: [
|
|
27856
27978
|
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("dt", { className: "text-sm font-medium text-gray-500", children: "Date de signature" }),
|
|
27857
|
-
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("dd", { className: "text-sm text-gray-900", children:
|
|
27979
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("dd", { className: "text-sm text-gray-900", children: formatDate5(contract.signature_date || "") })
|
|
27858
27980
|
] }),
|
|
27859
27981
|
/* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "flex justify-between", children: [
|
|
27860
27982
|
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("dt", { className: "text-sm font-medium text-gray-500", children: "D\xE9but" }),
|
|
27861
|
-
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("dd", { className: "text-sm text-gray-900", children:
|
|
27983
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("dd", { className: "text-sm text-gray-900", children: formatDate5(contract.start_date) })
|
|
27862
27984
|
] }),
|
|
27863
27985
|
/* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "flex justify-between", children: [
|
|
27864
27986
|
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("dt", { className: "text-sm font-medium text-gray-500", children: "Fin" }),
|
|
27865
|
-
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("dd", { className: "text-sm text-gray-900 font-medium", children:
|
|
27987
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("dd", { className: "text-sm text-gray-900 font-medium", children: formatDate5(contract.end_date) })
|
|
27866
27988
|
] }),
|
|
27867
27989
|
/* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "flex justify-between", children: [
|
|
27868
27990
|
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("dt", { className: "text-sm font-medium text-gray-500", children: "Pr\xE9avis de r\xE9siliation" }),
|
|
@@ -27980,11 +28102,11 @@ var ViewContractContent = ({
|
|
|
27980
28102
|
/* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-6", children: [
|
|
27981
28103
|
/* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "p-4 bg-[var(--color-success-light)] rounded-lg", children: [
|
|
27982
28104
|
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("p", { className: "text-sm font-medium text-[var(--color-success)]", children: "Date de d\xE9but" }),
|
|
27983
|
-
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("p", { className: "text-xl font-bold text-gray-900 mt-1", children:
|
|
28105
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("p", { className: "text-xl font-bold text-gray-900 mt-1", children: formatDate5(contract.start_date) })
|
|
27984
28106
|
] }),
|
|
27985
28107
|
/* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "p-4 bg-[var(--color-error-light)] rounded-lg", children: [
|
|
27986
28108
|
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("p", { className: "text-sm font-medium text-[var(--color-error)]", children: "Date de fin" }),
|
|
27987
|
-
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("p", { className: "text-xl font-bold text-gray-900 mt-1", children:
|
|
28109
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("p", { className: "text-xl font-bold text-gray-900 mt-1", children: formatDate5(contract.end_date) })
|
|
27988
28110
|
] }),
|
|
27989
28111
|
/* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "p-4 bg-[var(--color-info-light)] rounded-lg", children: [
|
|
27990
28112
|
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("p", { className: "text-sm font-medium text-[var(--color-info)]", children: "Jours restants" }),
|
|
@@ -28017,7 +28139,7 @@ var ViewContractContent = ({
|
|
|
28017
28139
|
] }),
|
|
28018
28140
|
contract.renewal_date && /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "flex justify-between", children: [
|
|
28019
28141
|
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("dt", { className: "text-sm font-medium text-gray-500", children: "Date de renouvellement" }),
|
|
28020
|
-
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("dd", { className: "text-sm text-gray-900", children:
|
|
28142
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("dd", { className: "text-sm text-gray-900", children: formatDate5(contract.renewal_date) })
|
|
28021
28143
|
] }),
|
|
28022
28144
|
contract.duration && /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "flex justify-between", children: [
|
|
28023
28145
|
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("dt", { className: "text-sm font-medium text-gray-500", children: "Dur\xE9e" }),
|
|
@@ -28158,7 +28280,7 @@ var ViewContractContent = ({
|
|
|
28158
28280
|
milestone.percentage,
|
|
28159
28281
|
"%"
|
|
28160
28282
|
] }),
|
|
28161
|
-
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("td", { className: "py-3 text-center", children:
|
|
28283
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("td", { className: "py-3 text-center", children: formatDate5(milestone.dueDate) }),
|
|
28162
28284
|
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("td", { className: "py-3 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime133.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" }) })
|
|
28163
28285
|
] }, milestone.id)) })
|
|
28164
28286
|
] }) })
|
|
@@ -28427,11 +28549,11 @@ var ViewContractContent = ({
|
|
|
28427
28549
|
] }),
|
|
28428
28550
|
/* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { children: [
|
|
28429
28551
|
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("p", { className: "text-gray-500", children: "Date d'\xE9mission" }),
|
|
28430
|
-
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("p", { className: "font-medium", children:
|
|
28552
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("p", { className: "font-medium", children: formatDate5(guarantee.issueDate) })
|
|
28431
28553
|
] }),
|
|
28432
28554
|
/* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { children: [
|
|
28433
28555
|
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("p", { className: "text-gray-500", children: "Date d'expiration" }),
|
|
28434
|
-
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("p", { className: `font-medium ${new Date(guarantee.expiryDate) < /* @__PURE__ */ new Date() ? "text-[var(--color-error)]" : ""}`, children:
|
|
28556
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("p", { className: `font-medium ${new Date(guarantee.expiryDate) < /* @__PURE__ */ new Date() ? "text-[var(--color-error)]" : ""}`, children: formatDate5(guarantee.expiryDate) })
|
|
28435
28557
|
] })
|
|
28436
28558
|
] }),
|
|
28437
28559
|
guarantee.releaseConditions && /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "mt-3 p-3 bg-gray-50 rounded-lg", children: [
|
|
@@ -28471,7 +28593,7 @@ var ViewContractContent = ({
|
|
|
28471
28593
|
] }),
|
|
28472
28594
|
insurance.validUntil && /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { children: [
|
|
28473
28595
|
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("p", { className: "text-gray-500", children: "Valide jusqu'au" }),
|
|
28474
|
-
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("p", { className: `font-medium ${new Date(insurance.validUntil) < /* @__PURE__ */ new Date() ? "text-[var(--color-error)]" : ""}`, children:
|
|
28596
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("p", { className: `font-medium ${new Date(insurance.validUntil) < /* @__PURE__ */ new Date() ? "text-[var(--color-error)]" : ""}`, children: formatDate5(insurance.validUntil) })
|
|
28475
28597
|
] })
|
|
28476
28598
|
] })
|
|
28477
28599
|
] }, insurance.id)) }) : /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "text-center py-8 text-gray-500", children: [
|
|
@@ -28542,7 +28664,7 @@ var ViewContractContent = ({
|
|
|
28542
28664
|
] }),
|
|
28543
28665
|
/* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "text-right", children: [
|
|
28544
28666
|
/* @__PURE__ */ (0, import_jsx_runtime133.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" }),
|
|
28545
|
-
approver.approvalDate && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("p", { className: "text-xs text-gray-500 mt-1", children:
|
|
28667
|
+
approver.approvalDate && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("p", { className: "text-xs text-gray-500 mt-1", children: formatDate5(approver.approvalDate) })
|
|
28546
28668
|
] })
|
|
28547
28669
|
] }, index)) })
|
|
28548
28670
|
] }),
|
|
@@ -28596,11 +28718,11 @@ var ViewContractContent = ({
|
|
|
28596
28718
|
] }),
|
|
28597
28719
|
contract.governance.steeringCommittee.lastMeetingDate && /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "flex justify-between", children: [
|
|
28598
28720
|
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("dt", { className: "text-gray-500", children: "Derni\xE8re r\xE9union" }),
|
|
28599
|
-
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("dd", { className: "text-gray-900", children:
|
|
28721
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("dd", { className: "text-gray-900", children: formatDate5(contract.governance.steeringCommittee.lastMeetingDate) })
|
|
28600
28722
|
] }),
|
|
28601
28723
|
contract.governance.steeringCommittee.nextMeetingDate && /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "flex justify-between", children: [
|
|
28602
28724
|
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("dt", { className: "text-gray-500", children: "Prochaine r\xE9union" }),
|
|
28603
|
-
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("dd", { className: "text-gray-900 font-medium", children:
|
|
28725
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("dd", { className: "text-gray-900 font-medium", children: formatDate5(contract.governance.steeringCommittee.nextMeetingDate) })
|
|
28604
28726
|
] })
|
|
28605
28727
|
] })
|
|
28606
28728
|
] })
|
|
@@ -28673,7 +28795,7 @@ var ViewContractContent = ({
|
|
|
28673
28795
|
] }),
|
|
28674
28796
|
contract.regulatoryCompliance.sanctionsScreening?.lastScreeningDate && /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("p", { className: "text-sm text-gray-500", children: [
|
|
28675
28797
|
"Dernier contr\xF4le: ",
|
|
28676
|
-
|
|
28798
|
+
formatDate5(contract.regulatoryCompliance.sanctionsScreening.lastScreeningDate)
|
|
28677
28799
|
] })
|
|
28678
28800
|
] })
|
|
28679
28801
|
] })
|
|
@@ -28729,7 +28851,7 @@ var ViewContractContent = ({
|
|
|
28729
28851
|
] }),
|
|
28730
28852
|
/* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("p", { className: "text-xs text-[var(--color-success)] mt-1", children: [
|
|
28731
28853
|
"\xC9valu\xE9 le ",
|
|
28732
|
-
|
|
28854
|
+
formatDate5(contract.esgCriteria.lastAssessmentDate)
|
|
28733
28855
|
] })
|
|
28734
28856
|
] }),
|
|
28735
28857
|
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(RewiseCard, { className: "p-4", children: /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "flex items-center space-x-3", children: [
|
|
@@ -28900,7 +29022,7 @@ var ViewContractContent = ({
|
|
|
28900
29022
|
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("span", { children: "\u2022" }),
|
|
28901
29023
|
/* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("span", { children: [
|
|
28902
29024
|
"\xC9ch\xE9ance: ",
|
|
28903
|
-
|
|
29025
|
+
formatDate5(obligation.dueDate)
|
|
28904
29026
|
] })
|
|
28905
29027
|
] }),
|
|
28906
29028
|
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("span", { children: "\u2022" }),
|
|
@@ -28966,7 +29088,7 @@ var ViewContractContent = ({
|
|
|
28966
29088
|
] }),
|
|
28967
29089
|
sla.last_evaluation && /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("span", { children: [
|
|
28968
29090
|
"Derni\xE8re mesure: ",
|
|
28969
|
-
|
|
29091
|
+
formatDate5(sla.last_evaluation)
|
|
28970
29092
|
] })
|
|
28971
29093
|
] })
|
|
28972
29094
|
] }, sla.id)) }) : /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(RewiseCard, { className: "p-8 text-center", children: [
|
|
@@ -29177,7 +29299,7 @@ var ViewContractContent = ({
|
|
|
29177
29299
|
" MB \u2022 Version ",
|
|
29178
29300
|
doc.version,
|
|
29179
29301
|
" \u2022 Ajout\xE9 le ",
|
|
29180
|
-
|
|
29302
|
+
formatDate5(doc.uploadedAt)
|
|
29181
29303
|
] }),
|
|
29182
29304
|
doc.description && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("p", { className: "text-sm text-gray-600 mt-1", children: doc.description })
|
|
29183
29305
|
] })
|
|
@@ -29208,7 +29330,7 @@ var ViewContractContent = ({
|
|
|
29208
29330
|
] }),
|
|
29209
29331
|
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("p", { className: "text-sm text-gray-600 mb-2", children: amendment.description }),
|
|
29210
29332
|
/* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("p", { className: "text-xs text-gray-500", children: [
|
|
29211
|
-
|
|
29333
|
+
formatDate5(amendment.date),
|
|
29212
29334
|
" \u2022 Raison: ",
|
|
29213
29335
|
amendment.reason
|
|
29214
29336
|
] })
|
|
@@ -29306,7 +29428,7 @@ var ViewContractContent = ({
|
|
|
29306
29428
|
"Ce contrat expire dans ",
|
|
29307
29429
|
daysUntilExpiry,
|
|
29308
29430
|
" jours (",
|
|
29309
|
-
|
|
29431
|
+
formatDate5(contract.end_date),
|
|
29310
29432
|
")"
|
|
29311
29433
|
] })
|
|
29312
29434
|
] }),
|
|
@@ -33587,7 +33709,7 @@ var SLAManagementModal = ({
|
|
|
33587
33709
|
onShowToast("Indicateur SLA supprim\xE9", "success");
|
|
33588
33710
|
}
|
|
33589
33711
|
};
|
|
33590
|
-
const
|
|
33712
|
+
const formatDate5 = (dateString) => {
|
|
33591
33713
|
if (!dateString) return "N/A";
|
|
33592
33714
|
return new Date(dateString).toLocaleDateString("fr-FR");
|
|
33593
33715
|
};
|
|
@@ -34101,7 +34223,7 @@ var SLAManagementModal = ({
|
|
|
34101
34223
|
] }),
|
|
34102
34224
|
/* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("p", { className: "text-xs mt-1", style: { color: colors.text.tertiary }, children: [
|
|
34103
34225
|
"D\xE9tect\xE9 le ",
|
|
34104
|
-
|
|
34226
|
+
formatDate5(incident.detected_date)
|
|
34105
34227
|
] })
|
|
34106
34228
|
] })
|
|
34107
34229
|
] }),
|