ptechcore_ui 1.0.20 → 1.0.21
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 +892 -154
- package/dist/index.d.cts +21 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +980 -186
- package/package.json +3 -2
package/dist/index.cjs
CHANGED
|
@@ -819,6 +819,36 @@ var FetchApi = class {
|
|
|
819
819
|
if (!res.ok) throw new Error(await res.text());
|
|
820
820
|
return res.json();
|
|
821
821
|
}
|
|
822
|
+
static async uploadFile(url, formData, token) {
|
|
823
|
+
const headers = {};
|
|
824
|
+
const local_token = localStorage.getItem("token");
|
|
825
|
+
if (local_token) {
|
|
826
|
+
headers["Authorization"] = `Token ${local_token}`;
|
|
827
|
+
}
|
|
828
|
+
const res = await fetch(url, {
|
|
829
|
+
method: "POST",
|
|
830
|
+
headers,
|
|
831
|
+
body: formData
|
|
832
|
+
});
|
|
833
|
+
if (!res.ok) throw new Error(await res.text());
|
|
834
|
+
return res.json();
|
|
835
|
+
}
|
|
836
|
+
static async patch(url, payload, token) {
|
|
837
|
+
const headers = {
|
|
838
|
+
"Content-Type": "application/json"
|
|
839
|
+
};
|
|
840
|
+
const local_token = localStorage.getItem("token");
|
|
841
|
+
if (local_token) {
|
|
842
|
+
headers["Authorization"] = `Token ${local_token}`;
|
|
843
|
+
}
|
|
844
|
+
const res = await fetch(url, {
|
|
845
|
+
method: "PATCH",
|
|
846
|
+
headers,
|
|
847
|
+
body: payload ? JSON.stringify(payload) : void 0
|
|
848
|
+
});
|
|
849
|
+
if (!res.ok) throw new Error(await res.text());
|
|
850
|
+
return res.json();
|
|
851
|
+
}
|
|
822
852
|
};
|
|
823
853
|
|
|
824
854
|
// src/services/AuthServices.ts
|
|
@@ -993,7 +1023,22 @@ var UserServices = {
|
|
|
993
1023
|
getuserEntitiesAccess: (id, token) => FetchApi.get(`${API_URL}/core/entities/`, token),
|
|
994
1024
|
// !!! ce n'est pas la bonne url
|
|
995
1025
|
// Ajouter un utilisateur à une entité
|
|
996
|
-
addUserToEntity: (entityId, userId, token) => FetchApi.post(`${API_URL}/core/entities/${entityId}/users/`, { user_id: userId }, token)
|
|
1026
|
+
addUserToEntity: (entityId, userId, token) => FetchApi.post(`${API_URL}/core/entities/${entityId}/users/`, { user_id: userId }, token),
|
|
1027
|
+
// === Nouvelles méthodes pour le profil utilisateur ===
|
|
1028
|
+
// Mettre à jour le profil de l'utilisateur connecté
|
|
1029
|
+
updateMyProfile: (data) => FetchApi.put(`${USERS_API_URL}me/`, data),
|
|
1030
|
+
// Changer la photo de profil
|
|
1031
|
+
updateProfilePicture: (file) => {
|
|
1032
|
+
const formData = new FormData();
|
|
1033
|
+
formData.append("profile_picture", file);
|
|
1034
|
+
return FetchApi.uploadFile(`${USERS_API_URL}me/upload-picture/`, formData);
|
|
1035
|
+
},
|
|
1036
|
+
// Supprimer la photo de profil
|
|
1037
|
+
deleteProfilePicture: () => FetchApi.delete(`${USERS_API_URL}me/delete-picture/`),
|
|
1038
|
+
// Changer le mot de passe (utilisateur authentifié)
|
|
1039
|
+
changePassword: (data) => FetchApi.post(`${API_BASE_URL2}change-my-password/`, data),
|
|
1040
|
+
// Obtenir le profil de l'utilisateur connecté
|
|
1041
|
+
getMyProfile: () => FetchApi.get(`${USERS_API_URL}me/`)
|
|
997
1042
|
};
|
|
998
1043
|
|
|
999
1044
|
// src/contexts/ToastContext.tsx
|
|
@@ -1020,9 +1065,10 @@ var ToastProvider = ({ children }) => {
|
|
|
1020
1065
|
};
|
|
1021
1066
|
const addToast = (0, import_react3.useCallback)((toast) => {
|
|
1022
1067
|
const id = generateId();
|
|
1068
|
+
const defaultDuration = toast.type === "error" ? 7e3 : 3e3;
|
|
1023
1069
|
const newToast = {
|
|
1024
1070
|
id,
|
|
1025
|
-
duration:
|
|
1071
|
+
duration: toast.duration ?? defaultDuration,
|
|
1026
1072
|
...toast
|
|
1027
1073
|
};
|
|
1028
1074
|
setToasts((prev) => [...prev, newToast]);
|
|
@@ -1736,7 +1782,30 @@ var RewiseLayout = ({ children, module_name = "Rewise", module_description = "De
|
|
|
1736
1782
|
const [showThemeMenu, setShowThemeMenu] = (0, import_react5.useState)(false);
|
|
1737
1783
|
const [showCenterMenu, setShowCenterMenu] = (0, import_react5.useState)(false);
|
|
1738
1784
|
const [showModulesMenu, setShowModulesMenu] = (0, import_react5.useState)(false);
|
|
1785
|
+
const [showProfileModal, setShowProfileModal] = (0, import_react5.useState)(false);
|
|
1786
|
+
const [showEditProfileModal, setShowEditProfileModal] = (0, import_react5.useState)(false);
|
|
1787
|
+
const [showChangePasswordModal, setShowChangePasswordModal] = (0, import_react5.useState)(false);
|
|
1739
1788
|
const [currentSlide, setCurrentSlide] = (0, import_react5.useState)(0);
|
|
1789
|
+
const [editProfileData, setEditProfileData] = (0, import_react5.useState)({
|
|
1790
|
+
first_name: "",
|
|
1791
|
+
last_name: "",
|
|
1792
|
+
email: "",
|
|
1793
|
+
phonenumber: "",
|
|
1794
|
+
job_title: "",
|
|
1795
|
+
department: ""
|
|
1796
|
+
});
|
|
1797
|
+
const [savingProfile, setSavingProfile] = (0, import_react5.useState)(false);
|
|
1798
|
+
const [uploadingPhoto, setUploadingPhoto] = (0, import_react5.useState)(false);
|
|
1799
|
+
const [passwordData, setPasswordData] = (0, import_react5.useState)({
|
|
1800
|
+
current_password: "",
|
|
1801
|
+
new_password: "",
|
|
1802
|
+
confirm_password: ""
|
|
1803
|
+
});
|
|
1804
|
+
const [savingPassword, setSavingPassword] = (0, import_react5.useState)(false);
|
|
1805
|
+
const [showCurrentPassword, setShowCurrentPassword] = (0, import_react5.useState)(false);
|
|
1806
|
+
const [showNewPassword, setShowNewPassword] = (0, import_react5.useState)(false);
|
|
1807
|
+
const [showConfirmPassword, setShowConfirmPassword] = (0, import_react5.useState)(false);
|
|
1808
|
+
const fileInputRef = import_react5.default.useRef(null);
|
|
1740
1809
|
const slides = [
|
|
1741
1810
|
{
|
|
1742
1811
|
title: "Rappel \u2013 Gestion des jours de cong\xE9",
|
|
@@ -1855,6 +1924,133 @@ var RewiseLayout = ({ children, module_name = "Rewise", module_description = "De
|
|
|
1855
1924
|
showError("Erreur lors du marquage de la notification comme lue");
|
|
1856
1925
|
}
|
|
1857
1926
|
};
|
|
1927
|
+
const openEditProfileModal = () => {
|
|
1928
|
+
setEditProfileData({
|
|
1929
|
+
first_name: loggedUser?.first_name || "",
|
|
1930
|
+
last_name: loggedUser?.last_name || "",
|
|
1931
|
+
email: loggedUser?.email || "",
|
|
1932
|
+
phonenumber: loggedUser?.phonenumber || "",
|
|
1933
|
+
job_title: loggedUser?.job_title || "",
|
|
1934
|
+
department: loggedUser?.department || ""
|
|
1935
|
+
});
|
|
1936
|
+
setShowEditProfileModal(true);
|
|
1937
|
+
};
|
|
1938
|
+
const handleSaveProfile = async () => {
|
|
1939
|
+
setSavingProfile(true);
|
|
1940
|
+
try {
|
|
1941
|
+
const response = await UserServices.updateMyProfile(editProfileData);
|
|
1942
|
+
if (response.success) {
|
|
1943
|
+
success("Profil mis \xE0 jour avec succ\xE8s");
|
|
1944
|
+
setShowEditProfileModal(false);
|
|
1945
|
+
window.location.reload();
|
|
1946
|
+
} else {
|
|
1947
|
+
showError(response.message || "Erreur lors de la mise \xE0 jour du profil");
|
|
1948
|
+
}
|
|
1949
|
+
} catch (error) {
|
|
1950
|
+
console.error("Erreur lors de la mise \xE0 jour du profil:", error);
|
|
1951
|
+
showError("Erreur lors de la mise \xE0 jour du profil");
|
|
1952
|
+
} finally {
|
|
1953
|
+
setSavingProfile(false);
|
|
1954
|
+
}
|
|
1955
|
+
};
|
|
1956
|
+
const handlePhotoChange = async (event) => {
|
|
1957
|
+
const file = event.target.files?.[0];
|
|
1958
|
+
if (!file) return;
|
|
1959
|
+
const allowedTypes = ["image/jpeg", "image/png", "image/gif", "image/webp"];
|
|
1960
|
+
if (!allowedTypes.includes(file.type)) {
|
|
1961
|
+
showError("Format de fichier non support\xE9. Utilisez JPG, PNG, GIF ou WebP.");
|
|
1962
|
+
return;
|
|
1963
|
+
}
|
|
1964
|
+
const maxSize = 5 * 1024 * 1024;
|
|
1965
|
+
if (file.size > maxSize) {
|
|
1966
|
+
showError("La taille du fichier ne doit pas d\xE9passer 5 MB");
|
|
1967
|
+
return;
|
|
1968
|
+
}
|
|
1969
|
+
setUploadingPhoto(true);
|
|
1970
|
+
try {
|
|
1971
|
+
const response = await UserServices.updateProfilePicture(file);
|
|
1972
|
+
if (response.success) {
|
|
1973
|
+
success("Photo de profil mise \xE0 jour avec succ\xE8s");
|
|
1974
|
+
window.location.reload();
|
|
1975
|
+
} else {
|
|
1976
|
+
showError(response.message || "Erreur lors du t\xE9l\xE9chargement de la photo");
|
|
1977
|
+
}
|
|
1978
|
+
} catch (error) {
|
|
1979
|
+
console.error("Erreur lors du t\xE9l\xE9chargement de la photo:", error);
|
|
1980
|
+
showError("Erreur lors du t\xE9l\xE9chargement de la photo");
|
|
1981
|
+
} finally {
|
|
1982
|
+
setUploadingPhoto(false);
|
|
1983
|
+
if (fileInputRef.current) {
|
|
1984
|
+
fileInputRef.current.value = "";
|
|
1985
|
+
}
|
|
1986
|
+
}
|
|
1987
|
+
};
|
|
1988
|
+
const handleDeletePhoto = async () => {
|
|
1989
|
+
setUploadingPhoto(true);
|
|
1990
|
+
try {
|
|
1991
|
+
const response = await UserServices.deleteProfilePicture();
|
|
1992
|
+
if (response.success) {
|
|
1993
|
+
success("Photo de profil supprim\xE9e");
|
|
1994
|
+
window.location.reload();
|
|
1995
|
+
} else {
|
|
1996
|
+
showError(response.message || "Erreur lors de la suppression de la photo");
|
|
1997
|
+
}
|
|
1998
|
+
} catch (error) {
|
|
1999
|
+
console.error("Erreur lors de la suppression de la photo:", error);
|
|
2000
|
+
showError("Erreur lors de la suppression de la photo");
|
|
2001
|
+
} finally {
|
|
2002
|
+
setUploadingPhoto(false);
|
|
2003
|
+
}
|
|
2004
|
+
};
|
|
2005
|
+
const openChangePasswordModal = () => {
|
|
2006
|
+
setPasswordData({
|
|
2007
|
+
current_password: "",
|
|
2008
|
+
new_password: "",
|
|
2009
|
+
confirm_password: ""
|
|
2010
|
+
});
|
|
2011
|
+
setShowCurrentPassword(false);
|
|
2012
|
+
setShowNewPassword(false);
|
|
2013
|
+
setShowConfirmPassword(false);
|
|
2014
|
+
setShowChangePasswordModal(true);
|
|
2015
|
+
};
|
|
2016
|
+
const handleChangePassword = async () => {
|
|
2017
|
+
if (!passwordData.current_password) {
|
|
2018
|
+
showError("Veuillez entrer votre mot de passe actuel");
|
|
2019
|
+
return;
|
|
2020
|
+
}
|
|
2021
|
+
if (!passwordData.new_password) {
|
|
2022
|
+
showError("Veuillez entrer un nouveau mot de passe");
|
|
2023
|
+
return;
|
|
2024
|
+
}
|
|
2025
|
+
if (passwordData.new_password.length < 8) {
|
|
2026
|
+
showError("Le nouveau mot de passe doit contenir au moins 8 caract\xE8res");
|
|
2027
|
+
return;
|
|
2028
|
+
}
|
|
2029
|
+
if (passwordData.new_password !== passwordData.confirm_password) {
|
|
2030
|
+
showError("Les mots de passe ne correspondent pas");
|
|
2031
|
+
return;
|
|
2032
|
+
}
|
|
2033
|
+
setSavingPassword(true);
|
|
2034
|
+
try {
|
|
2035
|
+
const response = await UserServices.changePassword(passwordData);
|
|
2036
|
+
if (response.success) {
|
|
2037
|
+
success("Mot de passe chang\xE9 avec succ\xE8s");
|
|
2038
|
+
setShowChangePasswordModal(false);
|
|
2039
|
+
setPasswordData({
|
|
2040
|
+
current_password: "",
|
|
2041
|
+
new_password: "",
|
|
2042
|
+
confirm_password: ""
|
|
2043
|
+
});
|
|
2044
|
+
} else {
|
|
2045
|
+
showError(response.message || "Erreur lors du changement de mot de passe");
|
|
2046
|
+
}
|
|
2047
|
+
} catch (error) {
|
|
2048
|
+
console.error("Erreur lors du changement de mot de passe:", error);
|
|
2049
|
+
showError("Mot de passe actuel incorrect ou erreur serveur");
|
|
2050
|
+
} finally {
|
|
2051
|
+
setSavingPassword(false);
|
|
2052
|
+
}
|
|
2053
|
+
};
|
|
1858
2054
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex h-screen bg-[var(--color-background)] overflow-hidden", children: [
|
|
1859
2055
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1860
2056
|
"a",
|
|
@@ -2404,6 +2600,10 @@ var RewiseLayout = ({ children, module_name = "Rewise", module_description = "De
|
|
|
2404
2600
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
2405
2601
|
"button",
|
|
2406
2602
|
{
|
|
2603
|
+
onClick: () => {
|
|
2604
|
+
setShowProfileModal(true);
|
|
2605
|
+
setShowUserMenu(false);
|
|
2606
|
+
},
|
|
2407
2607
|
className: "w-full flex items-center gap-3 px-3 py-2 rounded-lg hover:bg-[var(--color-surface-hover)] transition-colors",
|
|
2408
2608
|
role: "menuitem",
|
|
2409
2609
|
children: [
|
|
@@ -2701,6 +2901,418 @@ var RewiseLayout = ({ children, module_name = "Rewise", module_description = "De
|
|
|
2701
2901
|
}
|
|
2702
2902
|
)
|
|
2703
2903
|
}
|
|
2904
|
+
),
|
|
2905
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2906
|
+
Modals_default,
|
|
2907
|
+
{
|
|
2908
|
+
title: "Mon Profil",
|
|
2909
|
+
description: "G\xE9rez vos informations personnelles",
|
|
2910
|
+
width: "max-w-2xl",
|
|
2911
|
+
open: showProfileModal,
|
|
2912
|
+
onClose: () => setShowProfileModal(false),
|
|
2913
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "space-y-6", children: [
|
|
2914
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2915
|
+
"input",
|
|
2916
|
+
{
|
|
2917
|
+
ref: fileInputRef,
|
|
2918
|
+
type: "file",
|
|
2919
|
+
accept: "image/jpeg,image/png,image/gif,image/webp",
|
|
2920
|
+
onChange: handlePhotoChange,
|
|
2921
|
+
className: "hidden"
|
|
2922
|
+
}
|
|
2923
|
+
),
|
|
2924
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex flex-col sm:flex-row items-center gap-6 pb-6 border-b border-[var(--color-border)]", children: [
|
|
2925
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "relative group", children: [
|
|
2926
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "w-24 h-24 bg-gradient-to-br from-[var(--color-primary)] to-[var(--color-accent)] rounded-full flex items-center justify-center shadow-lg overflow-hidden", children: uploadingPhoto ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react3.Loader2, { className: "w-8 h-8 text-white animate-spin" }) : loggedUser?.profile_picture ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2927
|
+
"img",
|
|
2928
|
+
{
|
|
2929
|
+
src: loggedUser.profile_picture,
|
|
2930
|
+
alt: "Photo de profil",
|
|
2931
|
+
className: "w-full h-full rounded-full object-cover"
|
|
2932
|
+
}
|
|
2933
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("span", { className: "text-3xl font-bold text-white", children: [
|
|
2934
|
+
loggedUser?.first_name?.charAt(0) || loggedUser?.username?.charAt(0) || "U",
|
|
2935
|
+
loggedUser?.last_name?.charAt(0) || ""
|
|
2936
|
+
] }) }),
|
|
2937
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "absolute -bottom-1 -right-1 flex gap-1", children: [
|
|
2938
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2939
|
+
"button",
|
|
2940
|
+
{
|
|
2941
|
+
onClick: () => fileInputRef.current?.click(),
|
|
2942
|
+
disabled: uploadingPhoto,
|
|
2943
|
+
className: "w-8 h-8 bg-[var(--color-primary)] border-2 border-[var(--color-background)] rounded-full flex items-center justify-center shadow-md hover:bg-[var(--color-primary-dark)] transition-colors disabled:opacity-50",
|
|
2944
|
+
title: "Changer la photo",
|
|
2945
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react3.Camera, { className: "w-4 h-4 text-white" })
|
|
2946
|
+
}
|
|
2947
|
+
),
|
|
2948
|
+
loggedUser?.profile_picture && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2949
|
+
"button",
|
|
2950
|
+
{
|
|
2951
|
+
onClick: handleDeletePhoto,
|
|
2952
|
+
disabled: uploadingPhoto,
|
|
2953
|
+
className: "w-8 h-8 bg-red-500 border-2 border-[var(--color-background)] rounded-full flex items-center justify-center shadow-md hover:bg-red-600 transition-colors disabled:opacity-50",
|
|
2954
|
+
title: "Supprimer la photo",
|
|
2955
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react3.Trash2, { className: "w-4 h-4 text-white" })
|
|
2956
|
+
}
|
|
2957
|
+
)
|
|
2958
|
+
] })
|
|
2959
|
+
] }),
|
|
2960
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "text-center sm:text-left flex-1", children: [
|
|
2961
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h2", { className: "text-xl font-bold text-[var(--color-text-primary)]", children: loggedUser?.first_name && loggedUser?.last_name ? `${loggedUser.first_name} ${loggedUser.last_name}` : loggedUser?.username || "Utilisateur" }),
|
|
2962
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-[var(--color-text-secondary)] mt-1", children: loggedUser?.job_title || "Membre de l'\xE9quipe" }),
|
|
2963
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center justify-center sm:justify-start gap-2 mt-2", children: [
|
|
2964
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: cn(
|
|
2965
|
+
"px-2 py-1 text-xs font-medium rounded-full",
|
|
2966
|
+
loggedUser?.is_active ? "bg-green-100 text-green-700" : "bg-gray-100 text-gray-600"
|
|
2967
|
+
), children: loggedUser?.is_active ? "Actif" : "Inactif" }),
|
|
2968
|
+
loggedUser?.is_staff && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "px-2 py-1 text-xs font-medium rounded-full bg-blue-100 text-blue-700", children: "Staff" })
|
|
2969
|
+
] })
|
|
2970
|
+
] }),
|
|
2971
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
2972
|
+
"button",
|
|
2973
|
+
{
|
|
2974
|
+
onClick: openEditProfileModal,
|
|
2975
|
+
className: "flex items-center gap-2 px-4 py-2 bg-[var(--color-primary)] text-white rounded-lg hover:bg-[var(--color-primary-dark)] transition-colors",
|
|
2976
|
+
title: "Modifier le profil",
|
|
2977
|
+
children: [
|
|
2978
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react3.Edit3, { className: "w-4 h-4" }),
|
|
2979
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text-sm font-medium", children: "Modifier" })
|
|
2980
|
+
]
|
|
2981
|
+
}
|
|
2982
|
+
)
|
|
2983
|
+
] }),
|
|
2984
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
2985
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center gap-3 p-4 bg-[var(--color-surface)] rounded-lg border border-[var(--color-border)]", children: [
|
|
2986
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "w-10 h-10 bg-[var(--color-primary-light)] rounded-lg flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react3.Mail, { className: "w-5 h-5 text-[var(--color-primary)]" }) }),
|
|
2987
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex-1 min-w-0", children: [
|
|
2988
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-xs text-[var(--color-text-tertiary)] uppercase tracking-wide", children: "Email" }),
|
|
2989
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-sm font-medium text-[var(--color-text-primary)] truncate", children: loggedUser?.email || "Non renseign\xE9" })
|
|
2990
|
+
] })
|
|
2991
|
+
] }),
|
|
2992
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center gap-3 p-4 bg-[var(--color-surface)] rounded-lg border border-[var(--color-border)]", children: [
|
|
2993
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "w-10 h-10 bg-[var(--color-primary-light)] rounded-lg flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react3.Phone, { className: "w-5 h-5 text-[var(--color-primary)]" }) }),
|
|
2994
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex-1 min-w-0", children: [
|
|
2995
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-xs text-[var(--color-text-tertiary)] uppercase tracking-wide", children: "T\xE9l\xE9phone" }),
|
|
2996
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-sm font-medium text-[var(--color-text-primary)] truncate", children: loggedUser?.phonenumber || "Non renseign\xE9" })
|
|
2997
|
+
] })
|
|
2998
|
+
] }),
|
|
2999
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center gap-3 p-4 bg-[var(--color-surface)] rounded-lg border border-[var(--color-border)]", children: [
|
|
3000
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "w-10 h-10 bg-[var(--color-primary-light)] rounded-lg flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react3.User, { className: "w-5 h-5 text-[var(--color-primary)]" }) }),
|
|
3001
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex-1 min-w-0", children: [
|
|
3002
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-xs text-[var(--color-text-tertiary)] uppercase tracking-wide", children: "Nom d'utilisateur" }),
|
|
3003
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-sm font-medium text-[var(--color-text-primary)] truncate", children: loggedUser?.username || "Non renseign\xE9" })
|
|
3004
|
+
] })
|
|
3005
|
+
] }),
|
|
3006
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center gap-3 p-4 bg-[var(--color-surface)] rounded-lg border border-[var(--color-border)]", children: [
|
|
3007
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "w-10 h-10 bg-[var(--color-primary-light)] rounded-lg flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react3.Briefcase, { className: "w-5 h-5 text-[var(--color-primary)]" }) }),
|
|
3008
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex-1 min-w-0", children: [
|
|
3009
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-xs text-[var(--color-text-tertiary)] uppercase tracking-wide", children: "D\xE9partement" }),
|
|
3010
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-sm font-medium text-[var(--color-text-primary)] truncate", children: loggedUser?.department || "Non renseign\xE9" })
|
|
3011
|
+
] })
|
|
3012
|
+
] })
|
|
3013
|
+
] }),
|
|
3014
|
+
loggedUser?.centers_access && loggedUser.centers_access.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "pt-4 border-t border-[var(--color-border)]", children: [
|
|
3015
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("h3", { className: "text-sm font-semibold text-[var(--color-text-primary)] mb-3 flex items-center gap-2", children: [
|
|
3016
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react3.Building2, { className: "w-4 h-4 text-[var(--color-primary)]" }),
|
|
3017
|
+
"Centres d'acc\xE8s (",
|
|
3018
|
+
loggedUser.centers_access.length,
|
|
3019
|
+
")"
|
|
3020
|
+
] }),
|
|
3021
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "flex flex-wrap gap-2", children: loggedUser.centers_access.map((center) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
3022
|
+
"span",
|
|
3023
|
+
{
|
|
3024
|
+
className: cn(
|
|
3025
|
+
"px-3 py-1.5 text-sm rounded-lg border transition-colors",
|
|
3026
|
+
activeBusinessEntity?.id === center.id ? "bg-[var(--color-primary)] text-white border-[var(--color-primary)]" : "bg-[var(--color-surface)] text-[var(--color-text-secondary)] border-[var(--color-border)] hover:bg-[var(--color-surface-hover)]"
|
|
3027
|
+
),
|
|
3028
|
+
children: center.legal_name
|
|
3029
|
+
},
|
|
3030
|
+
center.id
|
|
3031
|
+
)) })
|
|
3032
|
+
] }),
|
|
3033
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "pt-4 border-t border-[var(--color-border)]", children: [
|
|
3034
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("h3", { className: "text-sm font-semibold text-[var(--color-text-primary)] mb-3 flex items-center gap-2", children: [
|
|
3035
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react3.Shield, { className: "w-4 h-4 text-[var(--color-primary)]" }),
|
|
3036
|
+
"S\xE9curit\xE9 du compte"
|
|
3037
|
+
] }),
|
|
3038
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: [
|
|
3039
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center justify-between p-3 bg-[var(--color-surface)] rounded-lg", children: [
|
|
3040
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text-sm text-[var(--color-text-secondary)]", children: "Derni\xE8re connexion" }),
|
|
3041
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text-sm font-medium text-[var(--color-text-primary)]", children: loggedUser?.last_login ? new Date(loggedUser.last_login).toLocaleDateString("fr-FR", {
|
|
3042
|
+
day: "numeric",
|
|
3043
|
+
month: "short",
|
|
3044
|
+
year: "numeric",
|
|
3045
|
+
hour: "2-digit",
|
|
3046
|
+
minute: "2-digit"
|
|
3047
|
+
}) : "Aujourd'hui" })
|
|
3048
|
+
] }),
|
|
3049
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center justify-between p-3 bg-[var(--color-surface)] rounded-lg", children: [
|
|
3050
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text-sm text-[var(--color-text-secondary)]", children: "Membre depuis" }),
|
|
3051
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text-sm font-medium text-[var(--color-text-primary)]", children: loggedUser?.date_joined ? new Date(loggedUser.date_joined).toLocaleDateString("fr-FR", {
|
|
3052
|
+
day: "numeric",
|
|
3053
|
+
month: "short",
|
|
3054
|
+
year: "numeric"
|
|
3055
|
+
}) : "N/A" })
|
|
3056
|
+
] })
|
|
3057
|
+
] }),
|
|
3058
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
3059
|
+
"button",
|
|
3060
|
+
{
|
|
3061
|
+
onClick: openChangePasswordModal,
|
|
3062
|
+
className: "mt-4 w-full flex items-center justify-center gap-2 px-4 py-2.5 border border-[var(--color-border)] text-[var(--color-text-secondary)] rounded-lg hover:bg-[var(--color-surface-hover)] transition-colors",
|
|
3063
|
+
children: [
|
|
3064
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react3.Lock, { className: "w-4 h-4" }),
|
|
3065
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text-sm font-medium", children: "Changer le mot de passe" })
|
|
3066
|
+
]
|
|
3067
|
+
}
|
|
3068
|
+
)
|
|
3069
|
+
] })
|
|
3070
|
+
] })
|
|
3071
|
+
}
|
|
3072
|
+
),
|
|
3073
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
3074
|
+
Modals_default,
|
|
3075
|
+
{
|
|
3076
|
+
title: "Modifier mon profil",
|
|
3077
|
+
description: "Mettez \xE0 jour vos informations personnelles",
|
|
3078
|
+
width: "max-w-lg",
|
|
3079
|
+
open: showEditProfileModal,
|
|
3080
|
+
onClose: () => setShowEditProfileModal(false),
|
|
3081
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "space-y-4", children: [
|
|
3082
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
3083
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { children: [
|
|
3084
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("label", { className: "block text-sm font-medium text-[var(--color-text-secondary)] mb-1", children: "Pr\xE9nom" }),
|
|
3085
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
3086
|
+
"input",
|
|
3087
|
+
{
|
|
3088
|
+
type: "text",
|
|
3089
|
+
value: editProfileData.first_name,
|
|
3090
|
+
onChange: (e) => setEditProfileData((prev) => ({ ...prev, first_name: e.target.value })),
|
|
3091
|
+
className: "w-full px-3 py-2 border border-[var(--color-border)] rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] focus:border-transparent bg-[var(--color-background)] text-[var(--color-text-primary)]",
|
|
3092
|
+
placeholder: "Votre pr\xE9nom"
|
|
3093
|
+
}
|
|
3094
|
+
)
|
|
3095
|
+
] }),
|
|
3096
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { children: [
|
|
3097
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("label", { className: "block text-sm font-medium text-[var(--color-text-secondary)] mb-1", children: "Nom" }),
|
|
3098
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
3099
|
+
"input",
|
|
3100
|
+
{
|
|
3101
|
+
type: "text",
|
|
3102
|
+
value: editProfileData.last_name,
|
|
3103
|
+
onChange: (e) => setEditProfileData((prev) => ({ ...prev, last_name: e.target.value })),
|
|
3104
|
+
className: "w-full px-3 py-2 border border-[var(--color-border)] rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] focus:border-transparent bg-[var(--color-background)] text-[var(--color-text-primary)]",
|
|
3105
|
+
placeholder: "Votre nom"
|
|
3106
|
+
}
|
|
3107
|
+
)
|
|
3108
|
+
] })
|
|
3109
|
+
] }),
|
|
3110
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { children: [
|
|
3111
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("label", { className: "block text-sm font-medium text-[var(--color-text-secondary)] mb-1", children: "Email" }),
|
|
3112
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "relative", children: [
|
|
3113
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react3.Mail, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-[var(--color-text-tertiary)]" }),
|
|
3114
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
3115
|
+
"input",
|
|
3116
|
+
{
|
|
3117
|
+
type: "email",
|
|
3118
|
+
value: editProfileData.email,
|
|
3119
|
+
onChange: (e) => setEditProfileData((prev) => ({ ...prev, email: e.target.value })),
|
|
3120
|
+
className: "w-full pl-10 pr-3 py-2 border border-[var(--color-border)] rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] focus:border-transparent bg-[var(--color-background)] text-[var(--color-text-primary)]",
|
|
3121
|
+
placeholder: "votre@email.com"
|
|
3122
|
+
}
|
|
3123
|
+
)
|
|
3124
|
+
] })
|
|
3125
|
+
] }),
|
|
3126
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { children: [
|
|
3127
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("label", { className: "block text-sm font-medium text-[var(--color-text-secondary)] mb-1", children: "T\xE9l\xE9phone" }),
|
|
3128
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "relative", children: [
|
|
3129
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react3.Phone, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-[var(--color-text-tertiary)]" }),
|
|
3130
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
3131
|
+
"input",
|
|
3132
|
+
{
|
|
3133
|
+
type: "tel",
|
|
3134
|
+
value: editProfileData.phonenumber,
|
|
3135
|
+
onChange: (e) => setEditProfileData((prev) => ({ ...prev, phonenumber: e.target.value })),
|
|
3136
|
+
className: "w-full pl-10 pr-3 py-2 border border-[var(--color-border)] rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] focus:border-transparent bg-[var(--color-background)] text-[var(--color-text-primary)]",
|
|
3137
|
+
placeholder: "+225 XX XX XX XX"
|
|
3138
|
+
}
|
|
3139
|
+
)
|
|
3140
|
+
] })
|
|
3141
|
+
] }),
|
|
3142
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { children: [
|
|
3143
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("label", { className: "block text-sm font-medium text-[var(--color-text-secondary)] mb-1", children: "Poste / Titre" }),
|
|
3144
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "relative", children: [
|
|
3145
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react3.Briefcase, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-[var(--color-text-tertiary)]" }),
|
|
3146
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
3147
|
+
"input",
|
|
3148
|
+
{
|
|
3149
|
+
type: "text",
|
|
3150
|
+
value: editProfileData.job_title,
|
|
3151
|
+
onChange: (e) => setEditProfileData((prev) => ({ ...prev, job_title: e.target.value })),
|
|
3152
|
+
className: "w-full pl-10 pr-3 py-2 border border-[var(--color-border)] rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] focus:border-transparent bg-[var(--color-background)] text-[var(--color-text-primary)]",
|
|
3153
|
+
placeholder: "Ex: Responsable Commercial"
|
|
3154
|
+
}
|
|
3155
|
+
)
|
|
3156
|
+
] })
|
|
3157
|
+
] }),
|
|
3158
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { children: [
|
|
3159
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("label", { className: "block text-sm font-medium text-[var(--color-text-secondary)] mb-1", children: "D\xE9partement" }),
|
|
3160
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "relative", children: [
|
|
3161
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react3.Building2, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-[var(--color-text-tertiary)]" }),
|
|
3162
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
3163
|
+
"input",
|
|
3164
|
+
{
|
|
3165
|
+
type: "text",
|
|
3166
|
+
value: editProfileData.department,
|
|
3167
|
+
onChange: (e) => setEditProfileData((prev) => ({ ...prev, department: e.target.value })),
|
|
3168
|
+
className: "w-full pl-10 pr-3 py-2 border border-[var(--color-border)] rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] focus:border-transparent bg-[var(--color-background)] text-[var(--color-text-primary)]",
|
|
3169
|
+
placeholder: "Ex: Ventes"
|
|
3170
|
+
}
|
|
3171
|
+
)
|
|
3172
|
+
] })
|
|
3173
|
+
] }),
|
|
3174
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex justify-end gap-3 pt-4 border-t border-[var(--color-border)]", children: [
|
|
3175
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
3176
|
+
"button",
|
|
3177
|
+
{
|
|
3178
|
+
onClick: () => setShowEditProfileModal(false),
|
|
3179
|
+
className: "px-4 py-2 text-sm font-medium text-[var(--color-text-secondary)] bg-[var(--color-surface)] border border-[var(--color-border)] rounded-lg hover:bg-[var(--color-surface-hover)] transition-colors",
|
|
3180
|
+
children: "Annuler"
|
|
3181
|
+
}
|
|
3182
|
+
),
|
|
3183
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
3184
|
+
"button",
|
|
3185
|
+
{
|
|
3186
|
+
onClick: handleSaveProfile,
|
|
3187
|
+
disabled: savingProfile,
|
|
3188
|
+
className: "flex items-center gap-2 px-4 py-2 text-sm font-medium text-white bg-[var(--color-primary)] rounded-lg hover:bg-[var(--color-primary-dark)] transition-colors disabled:opacity-50",
|
|
3189
|
+
children: [
|
|
3190
|
+
savingProfile ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react3.Loader2, { className: "w-4 h-4 animate-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react3.Save, { className: "w-4 h-4" }),
|
|
3191
|
+
savingProfile ? "Enregistrement..." : "Enregistrer"
|
|
3192
|
+
]
|
|
3193
|
+
}
|
|
3194
|
+
)
|
|
3195
|
+
] })
|
|
3196
|
+
] })
|
|
3197
|
+
}
|
|
3198
|
+
),
|
|
3199
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
3200
|
+
Modals_default,
|
|
3201
|
+
{
|
|
3202
|
+
title: "Changer le mot de passe",
|
|
3203
|
+
description: "Entrez votre mot de passe actuel et choisissez un nouveau mot de passe",
|
|
3204
|
+
width: "max-w-md",
|
|
3205
|
+
open: showChangePasswordModal,
|
|
3206
|
+
onClose: () => setShowChangePasswordModal(false),
|
|
3207
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "space-y-4", children: [
|
|
3208
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { children: [
|
|
3209
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("label", { className: "block text-sm font-medium text-[var(--color-text-secondary)] mb-1", children: "Mot de passe actuel" }),
|
|
3210
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "relative", children: [
|
|
3211
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react3.Lock, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-[var(--color-text-tertiary)]" }),
|
|
3212
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
3213
|
+
"input",
|
|
3214
|
+
{
|
|
3215
|
+
type: showCurrentPassword ? "text" : "password",
|
|
3216
|
+
value: passwordData.current_password,
|
|
3217
|
+
onChange: (e) => setPasswordData((prev) => ({ ...prev, current_password: e.target.value })),
|
|
3218
|
+
className: "w-full pl-10 pr-10 py-2 border border-[var(--color-border)] rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] focus:border-transparent bg-[var(--color-background)] text-[var(--color-text-primary)]",
|
|
3219
|
+
placeholder: "Votre mot de passe actuel"
|
|
3220
|
+
}
|
|
3221
|
+
),
|
|
3222
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
3223
|
+
"button",
|
|
3224
|
+
{
|
|
3225
|
+
type: "button",
|
|
3226
|
+
onClick: () => setShowCurrentPassword(!showCurrentPassword),
|
|
3227
|
+
className: "absolute right-3 top-1/2 -translate-y-1/2 text-[var(--color-text-tertiary)] hover:text-[var(--color-text-secondary)]",
|
|
3228
|
+
children: showCurrentPassword ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react3.EyeOff, { className: "w-4 h-4" }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react3.Eye, { className: "w-4 h-4" })
|
|
3229
|
+
}
|
|
3230
|
+
)
|
|
3231
|
+
] })
|
|
3232
|
+
] }),
|
|
3233
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { children: [
|
|
3234
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("label", { className: "block text-sm font-medium text-[var(--color-text-secondary)] mb-1", children: "Nouveau mot de passe" }),
|
|
3235
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "relative", children: [
|
|
3236
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react3.Lock, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-[var(--color-text-tertiary)]" }),
|
|
3237
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
3238
|
+
"input",
|
|
3239
|
+
{
|
|
3240
|
+
type: showNewPassword ? "text" : "password",
|
|
3241
|
+
value: passwordData.new_password,
|
|
3242
|
+
onChange: (e) => setPasswordData((prev) => ({ ...prev, new_password: e.target.value })),
|
|
3243
|
+
className: "w-full pl-10 pr-10 py-2 border border-[var(--color-border)] rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] focus:border-transparent bg-[var(--color-background)] text-[var(--color-text-primary)]",
|
|
3244
|
+
placeholder: "Au moins 8 caract\xE8res"
|
|
3245
|
+
}
|
|
3246
|
+
),
|
|
3247
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
3248
|
+
"button",
|
|
3249
|
+
{
|
|
3250
|
+
type: "button",
|
|
3251
|
+
onClick: () => setShowNewPassword(!showNewPassword),
|
|
3252
|
+
className: "absolute right-3 top-1/2 -translate-y-1/2 text-[var(--color-text-tertiary)] hover:text-[var(--color-text-secondary)]",
|
|
3253
|
+
children: showNewPassword ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react3.EyeOff, { className: "w-4 h-4" }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react3.Eye, { className: "w-4 h-4" })
|
|
3254
|
+
}
|
|
3255
|
+
)
|
|
3256
|
+
] }),
|
|
3257
|
+
passwordData.new_password && passwordData.new_password.length < 8 && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "mt-1 text-xs text-red-500", children: "Le mot de passe doit contenir au moins 8 caract\xE8res" })
|
|
3258
|
+
] }),
|
|
3259
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { children: [
|
|
3260
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("label", { className: "block text-sm font-medium text-[var(--color-text-secondary)] mb-1", children: "Confirmer le nouveau mot de passe" }),
|
|
3261
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "relative", children: [
|
|
3262
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react3.Lock, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-[var(--color-text-tertiary)]" }),
|
|
3263
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
3264
|
+
"input",
|
|
3265
|
+
{
|
|
3266
|
+
type: showConfirmPassword ? "text" : "password",
|
|
3267
|
+
value: passwordData.confirm_password,
|
|
3268
|
+
onChange: (e) => setPasswordData((prev) => ({ ...prev, confirm_password: e.target.value })),
|
|
3269
|
+
className: cn(
|
|
3270
|
+
"w-full pl-10 pr-10 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] focus:border-transparent bg-[var(--color-background)] text-[var(--color-text-primary)]",
|
|
3271
|
+
passwordData.confirm_password && passwordData.new_password !== passwordData.confirm_password ? "border-red-500" : "border-[var(--color-border)]"
|
|
3272
|
+
),
|
|
3273
|
+
placeholder: "R\xE9p\xE9tez le nouveau mot de passe"
|
|
3274
|
+
}
|
|
3275
|
+
),
|
|
3276
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
3277
|
+
"button",
|
|
3278
|
+
{
|
|
3279
|
+
type: "button",
|
|
3280
|
+
onClick: () => setShowConfirmPassword(!showConfirmPassword),
|
|
3281
|
+
className: "absolute right-3 top-1/2 -translate-y-1/2 text-[var(--color-text-tertiary)] hover:text-[var(--color-text-secondary)]",
|
|
3282
|
+
children: showConfirmPassword ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react3.EyeOff, { className: "w-4 h-4" }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react3.Eye, { className: "w-4 h-4" })
|
|
3283
|
+
}
|
|
3284
|
+
)
|
|
3285
|
+
] }),
|
|
3286
|
+
passwordData.confirm_password && passwordData.new_password !== passwordData.confirm_password && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "mt-1 text-xs text-red-500", children: "Les mots de passe ne correspondent pas" }),
|
|
3287
|
+
passwordData.confirm_password && passwordData.new_password === passwordData.confirm_password && passwordData.new_password.length >= 8 && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("p", { className: "mt-1 text-xs text-green-600 flex items-center gap-1", children: [
|
|
3288
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react3.Check, { className: "w-3 h-3" }),
|
|
3289
|
+
" Les mots de passe correspondent"
|
|
3290
|
+
] })
|
|
3291
|
+
] }),
|
|
3292
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex justify-end gap-3 pt-4 border-t border-[var(--color-border)]", children: [
|
|
3293
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
3294
|
+
"button",
|
|
3295
|
+
{
|
|
3296
|
+
onClick: () => setShowChangePasswordModal(false),
|
|
3297
|
+
className: "px-4 py-2 text-sm font-medium text-[var(--color-text-secondary)] bg-[var(--color-surface)] border border-[var(--color-border)] rounded-lg hover:bg-[var(--color-surface-hover)] transition-colors",
|
|
3298
|
+
children: "Annuler"
|
|
3299
|
+
}
|
|
3300
|
+
),
|
|
3301
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
3302
|
+
"button",
|
|
3303
|
+
{
|
|
3304
|
+
onClick: handleChangePassword,
|
|
3305
|
+
disabled: savingPassword || !passwordData.current_password || !passwordData.new_password || passwordData.new_password !== passwordData.confirm_password || passwordData.new_password.length < 8,
|
|
3306
|
+
className: "flex items-center gap-2 px-4 py-2 text-sm font-medium text-white bg-[var(--color-primary)] rounded-lg hover:bg-[var(--color-primary-dark)] transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
|
|
3307
|
+
children: [
|
|
3308
|
+
savingPassword ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react3.Loader2, { className: "w-4 h-4 animate-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react3.Shield, { className: "w-4 h-4" }),
|
|
3309
|
+
savingPassword ? "Modification..." : "Changer le mot de passe"
|
|
3310
|
+
]
|
|
3311
|
+
}
|
|
3312
|
+
)
|
|
3313
|
+
] })
|
|
3314
|
+
] })
|
|
3315
|
+
}
|
|
2704
3316
|
)
|
|
2705
3317
|
] });
|
|
2706
3318
|
};
|
|
@@ -5132,7 +5744,7 @@ var useAlert = () => {
|
|
|
5132
5744
|
};
|
|
5133
5745
|
|
|
5134
5746
|
// src/components/common/CommonSelect.tsx
|
|
5135
|
-
var
|
|
5747
|
+
var import_react128 = require("react");
|
|
5136
5748
|
|
|
5137
5749
|
// dist/index.js
|
|
5138
5750
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
@@ -5191,28 +5803,29 @@ var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
|
5191
5803
|
var import_react26 = require("react");
|
|
5192
5804
|
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
5193
5805
|
var import_react27 = require("react");
|
|
5806
|
+
var import_lucide_react18 = require("lucide-react");
|
|
5194
5807
|
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
5195
5808
|
var import_react28 = require("react");
|
|
5196
5809
|
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
5197
|
-
var
|
|
5810
|
+
var import_lucide_react19 = require("lucide-react");
|
|
5198
5811
|
var import_react_router_dom11 = require("react-router-dom");
|
|
5199
5812
|
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
5200
5813
|
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
5201
5814
|
var import_react29 = require("react");
|
|
5202
|
-
var import_lucide_react19 = require("lucide-react");
|
|
5203
|
-
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
5204
5815
|
var import_lucide_react20 = require("lucide-react");
|
|
5816
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
5817
|
+
var import_lucide_react21 = require("lucide-react");
|
|
5205
5818
|
var import_react30 = require("react");
|
|
5206
5819
|
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
5207
|
-
var import_react31 = require("react");
|
|
5820
|
+
var import_react31 = __toESM(require("react"), 1);
|
|
5208
5821
|
var import_react_router_dom12 = require("react-router-dom");
|
|
5209
|
-
var
|
|
5822
|
+
var import_lucide_react22 = require("lucide-react");
|
|
5210
5823
|
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
5211
5824
|
var import_react32 = require("react");
|
|
5212
5825
|
var import_react33 = require("react");
|
|
5213
|
-
var import_lucide_react22 = require("lucide-react");
|
|
5214
|
-
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
5215
5826
|
var import_lucide_react23 = require("lucide-react");
|
|
5827
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
5828
|
+
var import_lucide_react24 = require("lucide-react");
|
|
5216
5829
|
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
5217
5830
|
var import_react34 = require("react");
|
|
5218
5831
|
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
@@ -5224,7 +5837,7 @@ var import_react_router_dom13 = require("react-router-dom");
|
|
|
5224
5837
|
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
5225
5838
|
var import_react36 = __toESM(require("react"), 1);
|
|
5226
5839
|
var import_react_router_dom14 = require("react-router-dom");
|
|
5227
|
-
var
|
|
5840
|
+
var import_lucide_react25 = require("lucide-react");
|
|
5228
5841
|
var import_clsx4 = require("clsx");
|
|
5229
5842
|
var import_tailwind_merge4 = require("tailwind-merge");
|
|
5230
5843
|
var import_react37 = require("react");
|
|
@@ -5232,28 +5845,29 @@ var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
|
5232
5845
|
var import_react38 = require("react");
|
|
5233
5846
|
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
5234
5847
|
var import_react39 = require("react");
|
|
5848
|
+
var import_lucide_react26 = require("lucide-react");
|
|
5235
5849
|
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
5236
5850
|
var import_react40 = require("react");
|
|
5237
5851
|
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
5238
|
-
var
|
|
5852
|
+
var import_lucide_react27 = require("lucide-react");
|
|
5239
5853
|
var import_react_router_dom15 = require("react-router-dom");
|
|
5240
5854
|
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
5241
5855
|
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
5242
5856
|
var import_react41 = require("react");
|
|
5243
|
-
var
|
|
5857
|
+
var import_lucide_react28 = require("lucide-react");
|
|
5244
5858
|
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
5245
|
-
var
|
|
5859
|
+
var import_lucide_react29 = require("lucide-react");
|
|
5246
5860
|
var import_react42 = require("react");
|
|
5247
5861
|
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
5248
|
-
var import_react43 = require("react");
|
|
5862
|
+
var import_react43 = __toESM(require("react"), 1);
|
|
5249
5863
|
var import_react_router_dom16 = require("react-router-dom");
|
|
5250
|
-
var
|
|
5864
|
+
var import_lucide_react30 = require("lucide-react");
|
|
5251
5865
|
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
5252
5866
|
var import_react44 = require("react");
|
|
5253
5867
|
var import_react45 = require("react");
|
|
5254
|
-
var
|
|
5868
|
+
var import_lucide_react31 = require("lucide-react");
|
|
5255
5869
|
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
5256
|
-
var
|
|
5870
|
+
var import_lucide_react32 = require("lucide-react");
|
|
5257
5871
|
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
5258
5872
|
var import_react46 = require("react");
|
|
5259
5873
|
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
@@ -5265,7 +5879,7 @@ var import_react_router_dom17 = require("react-router-dom");
|
|
|
5265
5879
|
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
5266
5880
|
var import_react48 = __toESM(require("react"), 1);
|
|
5267
5881
|
var import_react_router_dom18 = require("react-router-dom");
|
|
5268
|
-
var
|
|
5882
|
+
var import_lucide_react33 = require("lucide-react");
|
|
5269
5883
|
var import_clsx5 = require("clsx");
|
|
5270
5884
|
var import_tailwind_merge5 = require("tailwind-merge");
|
|
5271
5885
|
var import_react49 = require("react");
|
|
@@ -5276,25 +5890,25 @@ var import_react51 = require("react");
|
|
|
5276
5890
|
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
5277
5891
|
var import_react52 = require("react");
|
|
5278
5892
|
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
5279
|
-
var
|
|
5893
|
+
var import_lucide_react34 = require("lucide-react");
|
|
5280
5894
|
var import_react_router_dom19 = require("react-router-dom");
|
|
5281
5895
|
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
5282
5896
|
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
5283
5897
|
var import_react53 = require("react");
|
|
5284
|
-
var
|
|
5898
|
+
var import_lucide_react35 = require("lucide-react");
|
|
5285
5899
|
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
5286
|
-
var
|
|
5900
|
+
var import_lucide_react36 = require("lucide-react");
|
|
5287
5901
|
var import_react54 = require("react");
|
|
5288
5902
|
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
5289
5903
|
var import_react55 = require("react");
|
|
5290
5904
|
var import_react_router_dom20 = require("react-router-dom");
|
|
5291
|
-
var
|
|
5905
|
+
var import_lucide_react37 = require("lucide-react");
|
|
5292
5906
|
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
5293
5907
|
var import_react56 = require("react");
|
|
5294
5908
|
var import_react57 = require("react");
|
|
5295
|
-
var
|
|
5909
|
+
var import_lucide_react38 = require("lucide-react");
|
|
5296
5910
|
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
5297
|
-
var
|
|
5911
|
+
var import_lucide_react39 = require("lucide-react");
|
|
5298
5912
|
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
5299
5913
|
var import_react58 = require("react");
|
|
5300
5914
|
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
@@ -5306,7 +5920,7 @@ var import_react_router_dom21 = require("react-router-dom");
|
|
|
5306
5920
|
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
5307
5921
|
var import_react60 = __toESM(require("react"), 1);
|
|
5308
5922
|
var import_react_router_dom22 = require("react-router-dom");
|
|
5309
|
-
var
|
|
5923
|
+
var import_lucide_react40 = require("lucide-react");
|
|
5310
5924
|
var import_clsx6 = require("clsx");
|
|
5311
5925
|
var import_tailwind_merge6 = require("tailwind-merge");
|
|
5312
5926
|
var import_react61 = require("react");
|
|
@@ -5317,25 +5931,25 @@ var import_react63 = require("react");
|
|
|
5317
5931
|
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
5318
5932
|
var import_react64 = require("react");
|
|
5319
5933
|
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
5320
|
-
var
|
|
5934
|
+
var import_lucide_react41 = require("lucide-react");
|
|
5321
5935
|
var import_react_router_dom23 = require("react-router-dom");
|
|
5322
5936
|
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
5323
5937
|
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
5324
5938
|
var import_react65 = require("react");
|
|
5325
|
-
var
|
|
5939
|
+
var import_lucide_react42 = require("lucide-react");
|
|
5326
5940
|
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
5327
|
-
var
|
|
5941
|
+
var import_lucide_react43 = require("lucide-react");
|
|
5328
5942
|
var import_react66 = require("react");
|
|
5329
5943
|
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
5330
5944
|
var import_react67 = require("react");
|
|
5331
5945
|
var import_react_router_dom24 = require("react-router-dom");
|
|
5332
|
-
var
|
|
5946
|
+
var import_lucide_react44 = require("lucide-react");
|
|
5333
5947
|
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
5334
5948
|
var import_react68 = require("react");
|
|
5335
5949
|
var import_react69 = require("react");
|
|
5336
|
-
var
|
|
5950
|
+
var import_lucide_react45 = require("lucide-react");
|
|
5337
5951
|
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
5338
|
-
var
|
|
5952
|
+
var import_lucide_react46 = require("lucide-react");
|
|
5339
5953
|
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
5340
5954
|
var import_react70 = require("react");
|
|
5341
5955
|
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
@@ -5347,7 +5961,7 @@ var import_react_router_dom25 = require("react-router-dom");
|
|
|
5347
5961
|
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
5348
5962
|
var import_react72 = __toESM(require("react"), 1);
|
|
5349
5963
|
var import_react_router_dom26 = require("react-router-dom");
|
|
5350
|
-
var
|
|
5964
|
+
var import_lucide_react47 = require("lucide-react");
|
|
5351
5965
|
var import_clsx7 = require("clsx");
|
|
5352
5966
|
var import_tailwind_merge7 = require("tailwind-merge");
|
|
5353
5967
|
var import_react73 = require("react");
|
|
@@ -5358,25 +5972,25 @@ var import_react75 = require("react");
|
|
|
5358
5972
|
var import_jsx_runtime102 = require("react/jsx-runtime");
|
|
5359
5973
|
var import_react76 = require("react");
|
|
5360
5974
|
var import_jsx_runtime103 = require("react/jsx-runtime");
|
|
5361
|
-
var
|
|
5975
|
+
var import_lucide_react48 = require("lucide-react");
|
|
5362
5976
|
var import_react_router_dom27 = require("react-router-dom");
|
|
5363
5977
|
var import_jsx_runtime104 = require("react/jsx-runtime");
|
|
5364
5978
|
var import_jsx_runtime105 = require("react/jsx-runtime");
|
|
5365
5979
|
var import_react77 = require("react");
|
|
5366
|
-
var
|
|
5980
|
+
var import_lucide_react49 = require("lucide-react");
|
|
5367
5981
|
var import_jsx_runtime106 = require("react/jsx-runtime");
|
|
5368
|
-
var
|
|
5982
|
+
var import_lucide_react50 = require("lucide-react");
|
|
5369
5983
|
var import_react78 = require("react");
|
|
5370
5984
|
var import_jsx_runtime107 = require("react/jsx-runtime");
|
|
5371
5985
|
var import_react79 = require("react");
|
|
5372
5986
|
var import_react_router_dom28 = require("react-router-dom");
|
|
5373
|
-
var
|
|
5987
|
+
var import_lucide_react51 = require("lucide-react");
|
|
5374
5988
|
var import_jsx_runtime108 = require("react/jsx-runtime");
|
|
5375
5989
|
var import_react80 = require("react");
|
|
5376
5990
|
var import_react81 = require("react");
|
|
5377
|
-
var
|
|
5991
|
+
var import_lucide_react52 = require("lucide-react");
|
|
5378
5992
|
var import_jsx_runtime109 = require("react/jsx-runtime");
|
|
5379
|
-
var
|
|
5993
|
+
var import_lucide_react53 = require("lucide-react");
|
|
5380
5994
|
var import_jsx_runtime110 = require("react/jsx-runtime");
|
|
5381
5995
|
var import_react82 = require("react");
|
|
5382
5996
|
var import_jsx_runtime111 = require("react/jsx-runtime");
|
|
@@ -5388,7 +6002,7 @@ var import_react_router_dom29 = require("react-router-dom");
|
|
|
5388
6002
|
var import_jsx_runtime115 = require("react/jsx-runtime");
|
|
5389
6003
|
var import_react84 = __toESM(require("react"), 1);
|
|
5390
6004
|
var import_react_router_dom30 = require("react-router-dom");
|
|
5391
|
-
var
|
|
6005
|
+
var import_lucide_react54 = require("lucide-react");
|
|
5392
6006
|
var import_clsx8 = require("clsx");
|
|
5393
6007
|
var import_tailwind_merge8 = require("tailwind-merge");
|
|
5394
6008
|
var import_react85 = require("react");
|
|
@@ -5399,25 +6013,25 @@ var import_react87 = require("react");
|
|
|
5399
6013
|
var import_jsx_runtime118 = require("react/jsx-runtime");
|
|
5400
6014
|
var import_react88 = require("react");
|
|
5401
6015
|
var import_jsx_runtime119 = require("react/jsx-runtime");
|
|
5402
|
-
var
|
|
6016
|
+
var import_lucide_react55 = require("lucide-react");
|
|
5403
6017
|
var import_react_router_dom31 = require("react-router-dom");
|
|
5404
6018
|
var import_jsx_runtime120 = require("react/jsx-runtime");
|
|
5405
6019
|
var import_jsx_runtime121 = require("react/jsx-runtime");
|
|
5406
6020
|
var import_react89 = require("react");
|
|
5407
|
-
var
|
|
6021
|
+
var import_lucide_react56 = require("lucide-react");
|
|
5408
6022
|
var import_jsx_runtime122 = require("react/jsx-runtime");
|
|
5409
|
-
var
|
|
6023
|
+
var import_lucide_react57 = require("lucide-react");
|
|
5410
6024
|
var import_react90 = require("react");
|
|
5411
6025
|
var import_jsx_runtime123 = require("react/jsx-runtime");
|
|
5412
6026
|
var import_react91 = require("react");
|
|
5413
6027
|
var import_react_router_dom32 = require("react-router-dom");
|
|
5414
|
-
var
|
|
6028
|
+
var import_lucide_react58 = require("lucide-react");
|
|
5415
6029
|
var import_jsx_runtime124 = require("react/jsx-runtime");
|
|
5416
6030
|
var import_react92 = require("react");
|
|
5417
6031
|
var import_react93 = require("react");
|
|
5418
|
-
var
|
|
6032
|
+
var import_lucide_react59 = require("lucide-react");
|
|
5419
6033
|
var import_jsx_runtime125 = require("react/jsx-runtime");
|
|
5420
|
-
var
|
|
6034
|
+
var import_lucide_react60 = require("lucide-react");
|
|
5421
6035
|
var import_jsx_runtime126 = require("react/jsx-runtime");
|
|
5422
6036
|
var import_react94 = require("react");
|
|
5423
6037
|
var import_jsx_runtime127 = require("react/jsx-runtime");
|
|
@@ -5425,26 +6039,116 @@ var import_jsx_runtime128 = require("react/jsx-runtime");
|
|
|
5425
6039
|
var import_react95 = require("react");
|
|
5426
6040
|
var import_jsx_runtime129 = require("react/jsx-runtime");
|
|
5427
6041
|
var import_jsx_runtime130 = require("react/jsx-runtime");
|
|
5428
|
-
var
|
|
6042
|
+
var import_react_router_dom33 = require("react-router-dom");
|
|
5429
6043
|
var import_jsx_runtime131 = require("react/jsx-runtime");
|
|
6044
|
+
var import_react96 = __toESM(require("react"), 1);
|
|
6045
|
+
var import_react_router_dom34 = require("react-router-dom");
|
|
6046
|
+
var import_lucide_react61 = require("lucide-react");
|
|
6047
|
+
var import_clsx9 = require("clsx");
|
|
6048
|
+
var import_tailwind_merge9 = require("tailwind-merge");
|
|
6049
|
+
var import_react97 = require("react");
|
|
5430
6050
|
var import_jsx_runtime132 = require("react/jsx-runtime");
|
|
6051
|
+
var import_react98 = require("react");
|
|
5431
6052
|
var import_jsx_runtime133 = require("react/jsx-runtime");
|
|
5432
|
-
var
|
|
6053
|
+
var import_react99 = require("react");
|
|
5433
6054
|
var import_jsx_runtime134 = require("react/jsx-runtime");
|
|
6055
|
+
var import_react100 = require("react");
|
|
5434
6056
|
var import_jsx_runtime135 = require("react/jsx-runtime");
|
|
6057
|
+
var import_lucide_react62 = require("lucide-react");
|
|
6058
|
+
var import_react_router_dom35 = require("react-router-dom");
|
|
5435
6059
|
var import_jsx_runtime136 = require("react/jsx-runtime");
|
|
5436
|
-
var import_react98 = require("react");
|
|
5437
6060
|
var import_jsx_runtime137 = require("react/jsx-runtime");
|
|
6061
|
+
var import_react101 = require("react");
|
|
6062
|
+
var import_lucide_react63 = require("lucide-react");
|
|
5438
6063
|
var import_jsx_runtime138 = require("react/jsx-runtime");
|
|
6064
|
+
var import_lucide_react64 = require("lucide-react");
|
|
6065
|
+
var import_react102 = require("react");
|
|
5439
6066
|
var import_jsx_runtime139 = require("react/jsx-runtime");
|
|
5440
|
-
var
|
|
6067
|
+
var import_react103 = require("react");
|
|
6068
|
+
var import_react_router_dom36 = require("react-router-dom");
|
|
6069
|
+
var import_lucide_react65 = require("lucide-react");
|
|
5441
6070
|
var import_jsx_runtime140 = require("react/jsx-runtime");
|
|
6071
|
+
var import_react104 = require("react");
|
|
6072
|
+
var import_react105 = require("react");
|
|
6073
|
+
var import_lucide_react66 = require("lucide-react");
|
|
5442
6074
|
var import_jsx_runtime141 = require("react/jsx-runtime");
|
|
6075
|
+
var import_lucide_react67 = require("lucide-react");
|
|
5443
6076
|
var import_jsx_runtime142 = require("react/jsx-runtime");
|
|
5444
|
-
var
|
|
6077
|
+
var import_react106 = require("react");
|
|
5445
6078
|
var import_jsx_runtime143 = require("react/jsx-runtime");
|
|
5446
6079
|
var import_jsx_runtime144 = require("react/jsx-runtime");
|
|
6080
|
+
var import_react107 = require("react");
|
|
5447
6081
|
var import_jsx_runtime145 = require("react/jsx-runtime");
|
|
6082
|
+
var import_jsx_runtime146 = require("react/jsx-runtime");
|
|
6083
|
+
var import_react_router_dom37 = require("react-router-dom");
|
|
6084
|
+
var import_jsx_runtime147 = require("react/jsx-runtime");
|
|
6085
|
+
var import_react108 = __toESM(require("react"), 1);
|
|
6086
|
+
var import_react_router_dom38 = require("react-router-dom");
|
|
6087
|
+
var import_lucide_react68 = require("lucide-react");
|
|
6088
|
+
var import_clsx10 = require("clsx");
|
|
6089
|
+
var import_tailwind_merge10 = require("tailwind-merge");
|
|
6090
|
+
var import_react109 = require("react");
|
|
6091
|
+
var import_jsx_runtime148 = require("react/jsx-runtime");
|
|
6092
|
+
var import_react110 = require("react");
|
|
6093
|
+
var import_jsx_runtime149 = require("react/jsx-runtime");
|
|
6094
|
+
var import_react111 = require("react");
|
|
6095
|
+
var import_jsx_runtime150 = require("react/jsx-runtime");
|
|
6096
|
+
var import_react112 = require("react");
|
|
6097
|
+
var import_jsx_runtime151 = require("react/jsx-runtime");
|
|
6098
|
+
var import_lucide_react69 = require("lucide-react");
|
|
6099
|
+
var import_react_router_dom39 = require("react-router-dom");
|
|
6100
|
+
var import_jsx_runtime152 = require("react/jsx-runtime");
|
|
6101
|
+
var import_jsx_runtime153 = require("react/jsx-runtime");
|
|
6102
|
+
var import_react113 = require("react");
|
|
6103
|
+
var import_lucide_react70 = require("lucide-react");
|
|
6104
|
+
var import_jsx_runtime154 = require("react/jsx-runtime");
|
|
6105
|
+
var import_lucide_react71 = require("lucide-react");
|
|
6106
|
+
var import_react114 = require("react");
|
|
6107
|
+
var import_jsx_runtime155 = require("react/jsx-runtime");
|
|
6108
|
+
var import_react115 = require("react");
|
|
6109
|
+
var import_react_router_dom40 = require("react-router-dom");
|
|
6110
|
+
var import_lucide_react72 = require("lucide-react");
|
|
6111
|
+
var import_jsx_runtime156 = require("react/jsx-runtime");
|
|
6112
|
+
var import_react116 = require("react");
|
|
6113
|
+
var import_react117 = require("react");
|
|
6114
|
+
var import_lucide_react73 = require("lucide-react");
|
|
6115
|
+
var import_jsx_runtime157 = require("react/jsx-runtime");
|
|
6116
|
+
var import_lucide_react74 = require("lucide-react");
|
|
6117
|
+
var import_jsx_runtime158 = require("react/jsx-runtime");
|
|
6118
|
+
var import_react118 = require("react");
|
|
6119
|
+
var import_jsx_runtime159 = require("react/jsx-runtime");
|
|
6120
|
+
var import_jsx_runtime160 = require("react/jsx-runtime");
|
|
6121
|
+
var import_react119 = require("react");
|
|
6122
|
+
var import_jsx_runtime161 = require("react/jsx-runtime");
|
|
6123
|
+
var import_jsx_runtime162 = require("react/jsx-runtime");
|
|
6124
|
+
var import_react120 = require("react");
|
|
6125
|
+
var import_jsx_runtime163 = require("react/jsx-runtime");
|
|
6126
|
+
var import_jsx_runtime164 = require("react/jsx-runtime");
|
|
6127
|
+
var import_jsx_runtime165 = require("react/jsx-runtime");
|
|
6128
|
+
var import_react121 = require("react");
|
|
6129
|
+
var import_jsx_runtime166 = require("react/jsx-runtime");
|
|
6130
|
+
var import_jsx_runtime167 = require("react/jsx-runtime");
|
|
6131
|
+
var import_jsx_runtime168 = require("react/jsx-runtime");
|
|
6132
|
+
var import_react122 = require("react");
|
|
6133
|
+
var import_jsx_runtime169 = require("react/jsx-runtime");
|
|
6134
|
+
var import_jsx_runtime170 = require("react/jsx-runtime");
|
|
6135
|
+
var import_jsx_runtime171 = require("react/jsx-runtime");
|
|
6136
|
+
var import_react123 = require("react");
|
|
6137
|
+
var import_jsx_runtime172 = require("react/jsx-runtime");
|
|
6138
|
+
var import_jsx_runtime173 = require("react/jsx-runtime");
|
|
6139
|
+
var import_jsx_runtime174 = require("react/jsx-runtime");
|
|
6140
|
+
var import_react124 = require("react");
|
|
6141
|
+
var import_jsx_runtime175 = require("react/jsx-runtime");
|
|
6142
|
+
var import_jsx_runtime176 = require("react/jsx-runtime");
|
|
6143
|
+
var import_jsx_runtime177 = require("react/jsx-runtime");
|
|
6144
|
+
var import_react125 = require("react");
|
|
6145
|
+
var import_jsx_runtime178 = require("react/jsx-runtime");
|
|
6146
|
+
var import_jsx_runtime179 = require("react/jsx-runtime");
|
|
6147
|
+
var import_jsx_runtime180 = require("react/jsx-runtime");
|
|
6148
|
+
var import_react126 = require("react");
|
|
6149
|
+
var import_jsx_runtime181 = require("react/jsx-runtime");
|
|
6150
|
+
var import_jsx_runtime182 = require("react/jsx-runtime");
|
|
6151
|
+
var import_jsx_runtime183 = require("react/jsx-runtime");
|
|
5448
6152
|
var PrimaryButton2 = ({
|
|
5449
6153
|
loading = false,
|
|
5450
6154
|
children,
|
|
@@ -5545,26 +6249,26 @@ var ADDRESS_IP22 = chooseEnv22 === "prod" ? "back.rewise.praeduim-tech.com" : "l
|
|
|
5545
6249
|
var ADDRESS_IP_URL22 = chooseEnv22 === "prod" ? `https://${ADDRESS_IP22}/` : `http://${ADDRESS_IP22}/`;
|
|
5546
6250
|
var API_URL22 = `${ADDRESS_IP_URL22}api`;
|
|
5547
6251
|
var API_BASE_URL32 = `${API_URL22}/core/auth/`;
|
|
6252
|
+
var VENDORS_API_URL22 = `${API_URL22}/accounting/vendors/`;
|
|
5548
6253
|
var SessionContext22 = (0, import_react26.createContext)(void 0);
|
|
5549
6254
|
var API_BASE_URL222 = `${API_URL22}/core/auth/`;
|
|
5550
6255
|
var USERS_API_URL22 = `${API_URL22}/core/users/`;
|
|
5551
6256
|
var ToastContext22 = (0, import_react27.createContext)(void 0);
|
|
5552
6257
|
var APPROVAL_API_URL22 = `${API_URL22}/approvals/cases/`;
|
|
5553
6258
|
var AlertContext22 = (0, import_react34.createContext)(void 0);
|
|
5554
|
-
var VENDORS_API_URL22 = `${API_URL22}/accounting/vendors/`;
|
|
5555
6259
|
var ThemeContext222 = (0, import_react37.createContext)(void 0);
|
|
5556
6260
|
var chooseEnv222 = localStorage.getItem("env") ?? "prod";
|
|
5557
6261
|
var ADDRESS_IP222 = chooseEnv222 === "prod" ? "back.rewise.praeduim-tech.com" : "localhost:8000";
|
|
5558
6262
|
var ADDRESS_IP_URL222 = chooseEnv222 === "prod" ? `https://${ADDRESS_IP222}/` : `http://${ADDRESS_IP222}/`;
|
|
5559
6263
|
var API_URL222 = `${ADDRESS_IP_URL222}api`;
|
|
5560
6264
|
var API_BASE_URL322 = `${API_URL222}/core/auth/`;
|
|
6265
|
+
var VENDORS_API_URL222 = `${API_URL222}/accounting/vendors/`;
|
|
5561
6266
|
var SessionContext222 = (0, import_react38.createContext)(void 0);
|
|
5562
6267
|
var API_BASE_URL2222 = `${API_URL222}/core/auth/`;
|
|
5563
6268
|
var USERS_API_URL222 = `${API_URL222}/core/users/`;
|
|
5564
6269
|
var ToastContext222 = (0, import_react39.createContext)(void 0);
|
|
5565
6270
|
var APPROVAL_API_URL222 = `${API_URL222}/approvals/cases/`;
|
|
5566
6271
|
var AlertContext222 = (0, import_react46.createContext)(void 0);
|
|
5567
|
-
var VENDORS_API_URL222 = `${API_URL222}/accounting/vendors/`;
|
|
5568
6272
|
var ThemeContext2222 = (0, import_react49.createContext)(void 0);
|
|
5569
6273
|
var chooseEnv2222 = localStorage.getItem("env") ?? "prod";
|
|
5570
6274
|
var ADDRESS_IP2222 = chooseEnv2222 === "prod" ? "back.rewise.praeduim-tech.com" : "localhost:8000";
|
|
@@ -5579,8 +6283,9 @@ var APPROVAL_API_URL2222 = `${API_URL2222}/approvals/cases/`;
|
|
|
5579
6283
|
var AlertContext2222 = (0, import_react58.createContext)(void 0);
|
|
5580
6284
|
var VENDORS_API_URL2222 = `${API_URL2222}/accounting/vendors/`;
|
|
5581
6285
|
var ThemeContext22222 = (0, import_react61.createContext)(void 0);
|
|
5582
|
-
var
|
|
5583
|
-
var
|
|
6286
|
+
var chooseEnv22222 = localStorage.getItem("env") ?? "prod";
|
|
6287
|
+
var ADDRESS_IP22222 = chooseEnv22222 === "prod" ? "back.rewise.praeduim-tech.com" : "localhost:8000";
|
|
6288
|
+
var ADDRESS_IP_URL22222 = chooseEnv22222 === "prod" ? `https://${ADDRESS_IP22222}/` : `http://${ADDRESS_IP22222}/`;
|
|
5584
6289
|
var API_URL22222 = `${ADDRESS_IP_URL22222}api`;
|
|
5585
6290
|
var API_BASE_URL32222 = `${API_URL22222}/core/auth/`;
|
|
5586
6291
|
var SessionContext22222 = (0, import_react62.createContext)(void 0);
|
|
@@ -5591,8 +6296,9 @@ var APPROVAL_API_URL22222 = `${API_URL22222}/approvals/cases/`;
|
|
|
5591
6296
|
var AlertContext22222 = (0, import_react70.createContext)(void 0);
|
|
5592
6297
|
var VENDORS_API_URL22222 = `${API_URL22222}/accounting/vendors/`;
|
|
5593
6298
|
var ThemeContext222222 = (0, import_react73.createContext)(void 0);
|
|
5594
|
-
var
|
|
5595
|
-
var
|
|
6299
|
+
var chooseEnv222222 = localStorage.getItem("env") ?? "prod";
|
|
6300
|
+
var ADDRESS_IP222222 = chooseEnv222222 === "prod" ? "back.rewise.praeduim-tech.com" : "localhost:8000";
|
|
6301
|
+
var ADDRESS_IP_URL222222 = chooseEnv222222 === "prod" ? `https://${ADDRESS_IP222222}/` : `http://${ADDRESS_IP222222}/`;
|
|
5596
6302
|
var API_URL222222 = `${ADDRESS_IP_URL222222}api`;
|
|
5597
6303
|
var API_BASE_URL322222 = `${API_URL222222}/core/auth/`;
|
|
5598
6304
|
var SessionContext222222 = (0, import_react74.createContext)(void 0);
|
|
@@ -5613,34 +6319,66 @@ var USERS_API_URL2222222 = `${API_URL2222222}/core/users/`;
|
|
|
5613
6319
|
var ToastContext2222222 = (0, import_react87.createContext)(void 0);
|
|
5614
6320
|
var APPROVAL_API_URL2222222 = `${API_URL2222222}/approvals/cases/`;
|
|
5615
6321
|
var AlertContext2222222 = (0, import_react94.createContext)(void 0);
|
|
5616
|
-
var
|
|
5617
|
-
var
|
|
5618
|
-
var
|
|
5619
|
-
var
|
|
5620
|
-
var
|
|
5621
|
-
var
|
|
5622
|
-
var
|
|
5623
|
-
var
|
|
5624
|
-
var
|
|
5625
|
-
var
|
|
5626
|
-
var
|
|
5627
|
-
var
|
|
5628
|
-
var
|
|
5629
|
-
var
|
|
5630
|
-
var
|
|
5631
|
-
var
|
|
5632
|
-
var
|
|
5633
|
-
var
|
|
5634
|
-
var
|
|
5635
|
-
var
|
|
5636
|
-
var
|
|
5637
|
-
var
|
|
5638
|
-
var
|
|
5639
|
-
var
|
|
6322
|
+
var VENDORS_API_URL2222222 = `${API_URL2222222}/accounting/vendors/`;
|
|
6323
|
+
var ThemeContext22222222 = (0, import_react97.createContext)(void 0);
|
|
6324
|
+
var ADDRESS_IP22222222 = "localhost:8000";
|
|
6325
|
+
var ADDRESS_IP_URL22222222 = `http://${ADDRESS_IP22222222}/`;
|
|
6326
|
+
var API_URL22222222 = `${ADDRESS_IP_URL22222222}api`;
|
|
6327
|
+
var API_BASE_URL32222222 = `${API_URL22222222}/core/auth/`;
|
|
6328
|
+
var SessionContext22222222 = (0, import_react98.createContext)(void 0);
|
|
6329
|
+
var API_BASE_URL222222222 = `${API_URL22222222}/core/auth/`;
|
|
6330
|
+
var USERS_API_URL22222222 = `${API_URL22222222}/core/users/`;
|
|
6331
|
+
var ToastContext22222222 = (0, import_react99.createContext)(void 0);
|
|
6332
|
+
var APPROVAL_API_URL22222222 = `${API_URL22222222}/approvals/cases/`;
|
|
6333
|
+
var AlertContext22222222 = (0, import_react106.createContext)(void 0);
|
|
6334
|
+
var VENDORS_API_URL22222222 = `${API_URL22222222}/accounting/vendors/`;
|
|
6335
|
+
var ThemeContext222222222 = (0, import_react109.createContext)(void 0);
|
|
6336
|
+
var ADDRESS_IP222222222 = "localhost:8000";
|
|
6337
|
+
var ADDRESS_IP_URL222222222 = `http://${ADDRESS_IP222222222}/`;
|
|
6338
|
+
var API_URL222222222 = `${ADDRESS_IP_URL222222222}api`;
|
|
6339
|
+
var API_BASE_URL322222222 = `${API_URL222222222}/core/auth/`;
|
|
6340
|
+
var SessionContext222222222 = (0, import_react110.createContext)(void 0);
|
|
6341
|
+
var API_BASE_URL2222222222 = `${API_URL222222222}/core/auth/`;
|
|
6342
|
+
var USERS_API_URL222222222 = `${API_URL222222222}/core/users/`;
|
|
6343
|
+
var ToastContext222222222 = (0, import_react111.createContext)(void 0);
|
|
6344
|
+
var APPROVAL_API_URL222222222 = `${API_URL222222222}/approvals/cases/`;
|
|
6345
|
+
var AlertContext222222222 = (0, import_react118.createContext)(void 0);
|
|
6346
|
+
var URI = `${API_URL22222222}/core/departments/`;
|
|
6347
|
+
var URI2 = `${API_URL22222222}/accounting/profit-or-cost-center/`;
|
|
6348
|
+
var COST_URI = `${API_URL22222222}/accounting/cost-center/`;
|
|
6349
|
+
var PROFIT_URI = `${API_URL22222222}/accounting/profit-center/`;
|
|
6350
|
+
var URI3 = `${API_URL2222222}/core/departments/`;
|
|
6351
|
+
var URI4 = `${API_URL2222222}/accounting/profit-or-cost-center/`;
|
|
6352
|
+
var COST_URI2 = `${API_URL2222222}/accounting/cost-center/`;
|
|
6353
|
+
var PROFIT_URI2 = `${API_URL2222222}/accounting/profit-center/`;
|
|
6354
|
+
var URI5 = `${API_URL222222}/core/departments/`;
|
|
6355
|
+
var URI6 = `${API_URL222222}/accounting/profit-or-cost-center/`;
|
|
6356
|
+
var COST_URI3 = `${API_URL222222}/accounting/cost-center/`;
|
|
6357
|
+
var PROFIT_URI3 = `${API_URL222222}/accounting/profit-center/`;
|
|
6358
|
+
var URI7 = `${API_URL22222}/core/departments/`;
|
|
6359
|
+
var URI8 = `${API_URL22222}/accounting/profit-or-cost-center/`;
|
|
6360
|
+
var COST_URI4 = `${API_URL22222}/accounting/cost-center/`;
|
|
6361
|
+
var PROFIT_URI4 = `${API_URL22222}/accounting/profit-center/`;
|
|
6362
|
+
var URI9 = `${API_URL2222}/core/departments/`;
|
|
6363
|
+
var URI10 = `${API_URL2222}/accounting/profit-or-cost-center/`;
|
|
6364
|
+
var COST_URI5 = `${API_URL2222}/accounting/cost-center/`;
|
|
6365
|
+
var PROFIT_URI5 = `${API_URL2222}/accounting/profit-center/`;
|
|
6366
|
+
var URI11 = `${API_URL222}/core/departments/`;
|
|
6367
|
+
var URI12 = `${API_URL222}/accounting/profit-or-cost-center/`;
|
|
6368
|
+
var COST_URI6 = `${API_URL222}/accounting/cost-center/`;
|
|
6369
|
+
var PROFIT_URI6 = `${API_URL222}/accounting/profit-center/`;
|
|
6370
|
+
var URI13 = `${API_URL22}/core/departments/`;
|
|
6371
|
+
var URI14 = `${API_URL22}/accounting/profit-or-cost-center/`;
|
|
6372
|
+
var COST_URI7 = `${API_URL22}/accounting/cost-center/`;
|
|
6373
|
+
var PROFIT_URI7 = `${API_URL22}/accounting/profit-center/`;
|
|
6374
|
+
var URI15 = `${API_URL2}/core/departments/`;
|
|
6375
|
+
var URI16 = `${API_URL2}/accounting/profit-or-cost-center/`;
|
|
6376
|
+
var COST_URI8 = `${API_URL2}/accounting/cost-center/`;
|
|
6377
|
+
var PROFIT_URI8 = `${API_URL2}/accounting/profit-center/`;
|
|
5640
6378
|
|
|
5641
6379
|
// src/components/common/FormVendor.tsx
|
|
5642
|
-
var
|
|
5643
|
-
var
|
|
6380
|
+
var import_react127 = require("react");
|
|
6381
|
+
var import_jsx_runtime184 = require("react/jsx-runtime");
|
|
5644
6382
|
var MinimalVendorForm = ({
|
|
5645
6383
|
isOpen,
|
|
5646
6384
|
onClose,
|
|
@@ -5649,13 +6387,13 @@ var MinimalVendorForm = ({
|
|
|
5649
6387
|
refresh = () => {
|
|
5650
6388
|
}
|
|
5651
6389
|
}) => {
|
|
5652
|
-
const [formData, setFormData] = (0,
|
|
6390
|
+
const [formData, setFormData] = (0, import_react127.useState)(object || {
|
|
5653
6391
|
from_module: from ?? null,
|
|
5654
6392
|
legal_name: "",
|
|
5655
6393
|
trading_name: ""
|
|
5656
6394
|
});
|
|
5657
|
-
const [errors, setErrors] = (0,
|
|
5658
|
-
const [loading, setLoading] = (0,
|
|
6395
|
+
const [errors, setErrors] = (0, import_react127.useState)({});
|
|
6396
|
+
const [loading, setLoading] = (0, import_react127.useState)(false);
|
|
5659
6397
|
const { token } = useSession();
|
|
5660
6398
|
const { success, error: showError } = useToast();
|
|
5661
6399
|
const handleInputChange = (e) => {
|
|
@@ -5714,7 +6452,7 @@ var MinimalVendorForm = ({
|
|
|
5714
6452
|
}
|
|
5715
6453
|
};
|
|
5716
6454
|
if (!isOpen) return null;
|
|
5717
|
-
return /* @__PURE__ */ (0,
|
|
6455
|
+
return /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(
|
|
5718
6456
|
Modals_default2,
|
|
5719
6457
|
{
|
|
5720
6458
|
title: "Ajouter un fournisseur",
|
|
@@ -5722,9 +6460,9 @@ var MinimalVendorForm = ({
|
|
|
5722
6460
|
description: ``,
|
|
5723
6461
|
open: isOpen,
|
|
5724
6462
|
onClose,
|
|
5725
|
-
children: /* @__PURE__ */ (0,
|
|
5726
|
-
/* @__PURE__ */ (0,
|
|
5727
|
-
/* @__PURE__ */ (0,
|
|
6463
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime184.jsxs)("form", { onSubmit: handleSubmit, className: "p-", children: [
|
|
6464
|
+
/* @__PURE__ */ (0, import_jsx_runtime184.jsx)("div", { className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime184.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
6465
|
+
/* @__PURE__ */ (0, import_jsx_runtime184.jsx)(
|
|
5728
6466
|
TextInput2,
|
|
5729
6467
|
{
|
|
5730
6468
|
label: "Raison sociale",
|
|
@@ -5736,7 +6474,7 @@ var MinimalVendorForm = ({
|
|
|
5736
6474
|
onChange: handleInputChange
|
|
5737
6475
|
}
|
|
5738
6476
|
),
|
|
5739
|
-
/* @__PURE__ */ (0,
|
|
6477
|
+
/* @__PURE__ */ (0, import_jsx_runtime184.jsx)(
|
|
5740
6478
|
TextInput2,
|
|
5741
6479
|
{
|
|
5742
6480
|
label: "Nom commercial",
|
|
@@ -5747,8 +6485,8 @@ var MinimalVendorForm = ({
|
|
|
5747
6485
|
}
|
|
5748
6486
|
)
|
|
5749
6487
|
] }) }),
|
|
5750
|
-
/* @__PURE__ */ (0,
|
|
5751
|
-
/* @__PURE__ */ (0,
|
|
6488
|
+
/* @__PURE__ */ (0, import_jsx_runtime184.jsxs)("div", { className: "flex justify-between pt-6 mt-8", children: [
|
|
6489
|
+
/* @__PURE__ */ (0, import_jsx_runtime184.jsx)(
|
|
5752
6490
|
"button",
|
|
5753
6491
|
{
|
|
5754
6492
|
type: "button",
|
|
@@ -5757,7 +6495,7 @@ var MinimalVendorForm = ({
|
|
|
5757
6495
|
children: "Annuler"
|
|
5758
6496
|
}
|
|
5759
6497
|
),
|
|
5760
|
-
/* @__PURE__ */ (0,
|
|
6498
|
+
/* @__PURE__ */ (0, import_jsx_runtime184.jsx)(
|
|
5761
6499
|
Buttons_default2,
|
|
5762
6500
|
{
|
|
5763
6501
|
type: "button",
|
|
@@ -5773,43 +6511,43 @@ var MinimalVendorForm = ({
|
|
|
5773
6511
|
};
|
|
5774
6512
|
|
|
5775
6513
|
// src/services/DepartmentServices.ts
|
|
5776
|
-
var
|
|
6514
|
+
var URI17 = `${API_URL}/core/departments/`;
|
|
5777
6515
|
var DepartmentServices = {
|
|
5778
|
-
create: (data) => FetchApi.post(`${
|
|
5779
|
-
get: (id) => FetchApi.get(`${
|
|
5780
|
-
list: (params) => FetchApi.get(`${
|
|
5781
|
-
update: (id, data) => FetchApi.put(`${
|
|
5782
|
-
delete: (id) => FetchApi.delete(`${
|
|
6516
|
+
create: (data) => FetchApi.post(`${URI17}`, data),
|
|
6517
|
+
get: (id) => FetchApi.get(`${URI17}${id}/`),
|
|
6518
|
+
list: (params) => FetchApi.get(`${URI17}?${new URLSearchParams(params).toString()}`),
|
|
6519
|
+
update: (id, data) => FetchApi.put(`${URI17}${id}/`, data),
|
|
6520
|
+
delete: (id) => FetchApi.delete(`${URI17}${id}/`)
|
|
5783
6521
|
};
|
|
5784
6522
|
|
|
5785
6523
|
// src/services/ProfitCostsServices.ts
|
|
5786
|
-
var
|
|
5787
|
-
var
|
|
6524
|
+
var URI18 = `${API_URL}/accounting/profit-or-cost-center/`;
|
|
6525
|
+
var COST_URI9 = `${API_URL}/accounting/cost-center/`;
|
|
5788
6526
|
var CostServices = {
|
|
5789
|
-
create: (data) => FetchApi.post(`${
|
|
5790
|
-
get: (id) => FetchApi.get(`${
|
|
5791
|
-
list: (params) => FetchApi.get(`${
|
|
5792
|
-
update: (id, data) => FetchApi.put(`${
|
|
5793
|
-
delete: (id) => FetchApi.delete(`${
|
|
6527
|
+
create: (data) => FetchApi.post(`${COST_URI9}`, data),
|
|
6528
|
+
get: (id) => FetchApi.get(`${COST_URI9}${id}/`),
|
|
6529
|
+
list: (params) => FetchApi.get(`${COST_URI9}?${new URLSearchParams(params).toString()}`),
|
|
6530
|
+
update: (id, data) => FetchApi.put(`${COST_URI9}${id}/`, data),
|
|
6531
|
+
delete: (id) => FetchApi.delete(`${COST_URI9}${id}/`)
|
|
5794
6532
|
};
|
|
5795
|
-
var
|
|
6533
|
+
var PROFIT_URI9 = `${API_URL}/accounting/profit-center/`;
|
|
5796
6534
|
|
|
5797
6535
|
// src/components/common/CommonSelect.tsx
|
|
5798
|
-
var
|
|
6536
|
+
var import_jsx_runtime185 = require("react/jsx-runtime");
|
|
5799
6537
|
var SelectVendor = ({
|
|
5800
6538
|
value,
|
|
5801
6539
|
onSelect
|
|
5802
6540
|
}) => {
|
|
5803
|
-
const [showModal, setShowModal] = (0,
|
|
5804
|
-
const [selectedVendor, setSelectedVendor] = (0,
|
|
6541
|
+
const [showModal, setShowModal] = (0, import_react128.useState)(false);
|
|
6542
|
+
const [selectedVendor, setSelectedVendor] = (0, import_react128.useState)(null);
|
|
5805
6543
|
const { token, activeBusinessEntity } = useSession();
|
|
5806
|
-
const [vendors, setVendors] = (0,
|
|
6544
|
+
const [vendors, setVendors] = (0, import_react128.useState)(() => {
|
|
5807
6545
|
const cacheKey = `vendors_cache_${activeBusinessEntity?.id || "default"}`;
|
|
5808
6546
|
const cached = sessionStorage.getItem(cacheKey);
|
|
5809
6547
|
return cached ? JSON.parse(cached) : [];
|
|
5810
6548
|
});
|
|
5811
|
-
const [loadingVendors, setLoadingVendors] = (0,
|
|
5812
|
-
(0,
|
|
6549
|
+
const [loadingVendors, setLoadingVendors] = (0, import_react128.useState)(false);
|
|
6550
|
+
(0, import_react128.useEffect)(() => {
|
|
5813
6551
|
const cacheKey = `vendors_cache_${activeBusinessEntity?.id || "default"}`;
|
|
5814
6552
|
const cached = sessionStorage.getItem(cacheKey);
|
|
5815
6553
|
if (!cached) {
|
|
@@ -5847,9 +6585,9 @@ var SelectVendor = ({
|
|
|
5847
6585
|
sessionStorage.removeItem(cacheKey);
|
|
5848
6586
|
loadVendors();
|
|
5849
6587
|
};
|
|
5850
|
-
return /* @__PURE__ */ (0,
|
|
5851
|
-
/* @__PURE__ */ (0,
|
|
5852
|
-
/* @__PURE__ */ (0,
|
|
6588
|
+
return /* @__PURE__ */ (0, import_jsx_runtime185.jsxs)("div", { children: [
|
|
6589
|
+
/* @__PURE__ */ (0, import_jsx_runtime185.jsx)("div", { className: "flex justify-between ", children: /* @__PURE__ */ (0, import_jsx_runtime185.jsx)("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "Ajouter un fournisseur" }) }),
|
|
6590
|
+
/* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
|
|
5853
6591
|
SearchableSelect,
|
|
5854
6592
|
{
|
|
5855
6593
|
value,
|
|
@@ -5865,8 +6603,8 @@ var SelectVendor = ({
|
|
|
5865
6603
|
},
|
|
5866
6604
|
"fourni" + value
|
|
5867
6605
|
),
|
|
5868
|
-
loadingVendors && /* @__PURE__ */ (0,
|
|
5869
|
-
showModal && /* @__PURE__ */ (0,
|
|
6606
|
+
loadingVendors && /* @__PURE__ */ (0, import_jsx_runtime185.jsx)("p", { className: "text-sm text-gray-500 mt-2", children: "Chargement des fournisseurs..." }),
|
|
6607
|
+
showModal && /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
|
|
5870
6608
|
MinimalVendorForm,
|
|
5871
6609
|
{
|
|
5872
6610
|
object: selectedVendor,
|
|
@@ -5883,13 +6621,13 @@ var SelectUser = ({
|
|
|
5883
6621
|
onSelect
|
|
5884
6622
|
}) => {
|
|
5885
6623
|
const { token, activeBusinessEntity } = useSession();
|
|
5886
|
-
const [users, setUsers] = (0,
|
|
6624
|
+
const [users, setUsers] = (0, import_react128.useState)(() => {
|
|
5887
6625
|
const cacheKey = `users_cache_${activeBusinessEntity?.id || "default"}`;
|
|
5888
6626
|
const cached = sessionStorage.getItem(cacheKey);
|
|
5889
6627
|
return cached ? JSON.parse(cached) : [];
|
|
5890
6628
|
});
|
|
5891
|
-
const [loading, setLoading] = (0,
|
|
5892
|
-
(0,
|
|
6629
|
+
const [loading, setLoading] = (0, import_react128.useState)(false);
|
|
6630
|
+
(0, import_react128.useEffect)(() => {
|
|
5893
6631
|
const cacheKey = `users_cache_${activeBusinessEntity?.id || "default"}`;
|
|
5894
6632
|
const cached = sessionStorage.getItem(cacheKey);
|
|
5895
6633
|
if (!cached) {
|
|
@@ -5925,19 +6663,19 @@ var SelectUser = ({
|
|
|
5925
6663
|
return users.map((user) => ({
|
|
5926
6664
|
value: user.id,
|
|
5927
6665
|
label: `${user.first_name} ${user.last_name}`,
|
|
5928
|
-
content: /* @__PURE__ */ (0,
|
|
5929
|
-
/* @__PURE__ */ (0,
|
|
6666
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime185.jsx)("div", { className: "flex items-center space-x-3", children: /* @__PURE__ */ (0, import_jsx_runtime185.jsxs)("div", { className: "flex-1", children: [
|
|
6667
|
+
/* @__PURE__ */ (0, import_jsx_runtime185.jsxs)("div", { className: "font-medium text-gray-900", children: [
|
|
5930
6668
|
user.first_name,
|
|
5931
6669
|
" ",
|
|
5932
6670
|
user.last_name
|
|
5933
6671
|
] }),
|
|
5934
|
-
/* @__PURE__ */ (0,
|
|
6672
|
+
/* @__PURE__ */ (0, import_jsx_runtime185.jsx)("div", { className: "text-sm text-gray-500", children: user.email })
|
|
5935
6673
|
] }) })
|
|
5936
6674
|
}));
|
|
5937
6675
|
};
|
|
5938
|
-
return /* @__PURE__ */ (0,
|
|
5939
|
-
/* @__PURE__ */ (0,
|
|
5940
|
-
/* @__PURE__ */ (0,
|
|
6676
|
+
return /* @__PURE__ */ (0, import_jsx_runtime185.jsxs)("div", { children: [
|
|
6677
|
+
/* @__PURE__ */ (0, import_jsx_runtime185.jsx)("div", { className: "flex justify-between ", children: /* @__PURE__ */ (0, import_jsx_runtime185.jsx)("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "S\xE9lectionner un utilisateur" }) }),
|
|
6678
|
+
/* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
|
|
5941
6679
|
SearchableSelect,
|
|
5942
6680
|
{
|
|
5943
6681
|
value,
|
|
@@ -5950,7 +6688,7 @@ var SelectUser = ({
|
|
|
5950
6688
|
},
|
|
5951
6689
|
"user" + value
|
|
5952
6690
|
),
|
|
5953
|
-
loading && /* @__PURE__ */ (0,
|
|
6691
|
+
loading && /* @__PURE__ */ (0, import_jsx_runtime185.jsx)("p", { className: "text-sm text-gray-500 mt-2", children: "Chargement des utilisateurs..." })
|
|
5954
6692
|
] });
|
|
5955
6693
|
};
|
|
5956
6694
|
var SelectDepartment = ({
|
|
@@ -5958,13 +6696,13 @@ var SelectDepartment = ({
|
|
|
5958
6696
|
onSelect
|
|
5959
6697
|
}) => {
|
|
5960
6698
|
const { token, activeBusinessEntity } = useSession();
|
|
5961
|
-
const [departments, setDepartments] = (0,
|
|
6699
|
+
const [departments, setDepartments] = (0, import_react128.useState)(() => {
|
|
5962
6700
|
const cacheKey = `departments_cache_${activeBusinessEntity?.id || "default"}`;
|
|
5963
6701
|
const cached = sessionStorage.getItem(cacheKey);
|
|
5964
6702
|
return cached ? JSON.parse(cached) : [];
|
|
5965
6703
|
});
|
|
5966
|
-
const [loading, setLoading] = (0,
|
|
5967
|
-
(0,
|
|
6704
|
+
const [loading, setLoading] = (0, import_react128.useState)(false);
|
|
6705
|
+
(0, import_react128.useEffect)(() => {
|
|
5968
6706
|
const cacheKey = `departments_cache_${activeBusinessEntity?.id || "default"}`;
|
|
5969
6707
|
const cached = sessionStorage.getItem(cacheKey);
|
|
5970
6708
|
if (!cached) {
|
|
@@ -6000,9 +6738,9 @@ var SelectDepartment = ({
|
|
|
6000
6738
|
label: dept.name
|
|
6001
6739
|
}));
|
|
6002
6740
|
};
|
|
6003
|
-
return /* @__PURE__ */ (0,
|
|
6004
|
-
/* @__PURE__ */ (0,
|
|
6005
|
-
/* @__PURE__ */ (0,
|
|
6741
|
+
return /* @__PURE__ */ (0, import_jsx_runtime185.jsxs)("div", { children: [
|
|
6742
|
+
/* @__PURE__ */ (0, import_jsx_runtime185.jsx)("div", { className: "flex justify-between ", children: /* @__PURE__ */ (0, import_jsx_runtime185.jsx)("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "S\xE9lectionner un d\xE9partement" }) }),
|
|
6743
|
+
/* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
|
|
6006
6744
|
SearchableSelect,
|
|
6007
6745
|
{
|
|
6008
6746
|
value,
|
|
@@ -6015,7 +6753,7 @@ var SelectDepartment = ({
|
|
|
6015
6753
|
},
|
|
6016
6754
|
"dept" + value
|
|
6017
6755
|
),
|
|
6018
|
-
loading && /* @__PURE__ */ (0,
|
|
6756
|
+
loading && /* @__PURE__ */ (0, import_jsx_runtime185.jsx)("p", { className: "text-sm text-gray-500 mt-2", children: "Chargement des d\xE9partements..." })
|
|
6019
6757
|
] });
|
|
6020
6758
|
};
|
|
6021
6759
|
var SelectCostCenter = ({
|
|
@@ -6023,13 +6761,13 @@ var SelectCostCenter = ({
|
|
|
6023
6761
|
onSelect
|
|
6024
6762
|
}) => {
|
|
6025
6763
|
const { token, activeBusinessEntity } = useSession();
|
|
6026
|
-
const [costCenters, setCostCenters] = (0,
|
|
6764
|
+
const [costCenters, setCostCenters] = (0, import_react128.useState)(() => {
|
|
6027
6765
|
const cacheKey = `cost_centers_cache_${activeBusinessEntity?.id || "default"}`;
|
|
6028
6766
|
const cached = sessionStorage.getItem(cacheKey);
|
|
6029
6767
|
return cached ? JSON.parse(cached) : [];
|
|
6030
6768
|
});
|
|
6031
|
-
const [loading, setLoading] = (0,
|
|
6032
|
-
(0,
|
|
6769
|
+
const [loading, setLoading] = (0, import_react128.useState)(false);
|
|
6770
|
+
(0, import_react128.useEffect)(() => {
|
|
6033
6771
|
const cacheKey = `cost_centers_cache_${activeBusinessEntity?.id || "default"}`;
|
|
6034
6772
|
const cached = sessionStorage.getItem(cacheKey);
|
|
6035
6773
|
if (!cached) {
|
|
@@ -6063,18 +6801,18 @@ var SelectCostCenter = ({
|
|
|
6063
6801
|
return costCenters.map((center) => ({
|
|
6064
6802
|
value: center.id,
|
|
6065
6803
|
label: `${center.code ? `[${center.code}] ` : ""}${center.name}`,
|
|
6066
|
-
content: /* @__PURE__ */ (0,
|
|
6067
|
-
/* @__PURE__ */ (0,
|
|
6068
|
-
center.code && /* @__PURE__ */ (0,
|
|
6804
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime185.jsx)("div", { className: "flex items-center space-x-3", children: /* @__PURE__ */ (0, import_jsx_runtime185.jsxs)("div", { className: "flex-1", children: [
|
|
6805
|
+
/* @__PURE__ */ (0, import_jsx_runtime185.jsx)("div", { className: "font-medium text-gray-900", children: center.name }),
|
|
6806
|
+
center.code && /* @__PURE__ */ (0, import_jsx_runtime185.jsxs)("div", { className: "text-sm text-gray-500", children: [
|
|
6069
6807
|
"Code: ",
|
|
6070
6808
|
center.code
|
|
6071
6809
|
] })
|
|
6072
6810
|
] }) })
|
|
6073
6811
|
}));
|
|
6074
6812
|
};
|
|
6075
|
-
return /* @__PURE__ */ (0,
|
|
6076
|
-
/* @__PURE__ */ (0,
|
|
6077
|
-
/* @__PURE__ */ (0,
|
|
6813
|
+
return /* @__PURE__ */ (0, import_jsx_runtime185.jsxs)("div", { children: [
|
|
6814
|
+
/* @__PURE__ */ (0, import_jsx_runtime185.jsx)("div", { className: "flex justify-between ", children: /* @__PURE__ */ (0, import_jsx_runtime185.jsx)("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "S\xE9lectionner un centre de co\xFBt" }) }),
|
|
6815
|
+
/* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
|
|
6078
6816
|
SearchableSelect,
|
|
6079
6817
|
{
|
|
6080
6818
|
value,
|
|
@@ -6087,12 +6825,12 @@ var SelectCostCenter = ({
|
|
|
6087
6825
|
},
|
|
6088
6826
|
"cost" + value
|
|
6089
6827
|
),
|
|
6090
|
-
loading && /* @__PURE__ */ (0,
|
|
6828
|
+
loading && /* @__PURE__ */ (0, import_jsx_runtime185.jsx)("p", { className: "text-sm text-gray-500 mt-2", children: "Chargement des centres de co\xFBt..." })
|
|
6091
6829
|
] });
|
|
6092
6830
|
};
|
|
6093
6831
|
|
|
6094
6832
|
// src/components/common/Choices.tsx
|
|
6095
|
-
var
|
|
6833
|
+
var import_jsx_runtime186 = require("react/jsx-runtime");
|
|
6096
6834
|
var CHOICES = {
|
|
6097
6835
|
INVOICE_TYPES: [
|
|
6098
6836
|
{ value: "sale", label: { fr: "Vente", en: "Sale", default: "Sale" } },
|
|
@@ -6350,7 +7088,7 @@ var InvoiceTypeSelector = ({
|
|
|
6350
7088
|
value: item.value,
|
|
6351
7089
|
label: item.label[language]
|
|
6352
7090
|
}));
|
|
6353
|
-
return /* @__PURE__ */ (0,
|
|
7091
|
+
return /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
|
|
6354
7092
|
SearchableSelect,
|
|
6355
7093
|
{
|
|
6356
7094
|
value,
|
|
@@ -6373,7 +7111,7 @@ var PaymentMethodSelector = ({
|
|
|
6373
7111
|
value: item.value,
|
|
6374
7112
|
label: item.label[language]
|
|
6375
7113
|
}));
|
|
6376
|
-
return /* @__PURE__ */ (0,
|
|
7114
|
+
return /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
|
|
6377
7115
|
SearchableSelect,
|
|
6378
7116
|
{
|
|
6379
7117
|
value,
|
|
@@ -6396,7 +7134,7 @@ var TemplateFNESelector = ({
|
|
|
6396
7134
|
value: item.value,
|
|
6397
7135
|
label: item.label[language]
|
|
6398
7136
|
}));
|
|
6399
|
-
return /* @__PURE__ */ (0,
|
|
7137
|
+
return /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
|
|
6400
7138
|
SearchableSelect,
|
|
6401
7139
|
{
|
|
6402
7140
|
value,
|
|
@@ -6419,7 +7157,7 @@ var ForeignCurrencySelector = ({
|
|
|
6419
7157
|
value: item.value,
|
|
6420
7158
|
label: item.label[language]
|
|
6421
7159
|
}));
|
|
6422
|
-
return /* @__PURE__ */ (0,
|
|
7160
|
+
return /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
|
|
6423
7161
|
SearchableSelect,
|
|
6424
7162
|
{
|
|
6425
7163
|
value,
|
|
@@ -6443,7 +7181,7 @@ var TaxSelector = ({
|
|
|
6443
7181
|
value: item.value,
|
|
6444
7182
|
label: item.label[language]
|
|
6445
7183
|
}));
|
|
6446
|
-
return /* @__PURE__ */ (0,
|
|
7184
|
+
return /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
|
|
6447
7185
|
SearchableSelect,
|
|
6448
7186
|
{
|
|
6449
7187
|
value,
|
|
@@ -6471,7 +7209,7 @@ var LegalFormSelector = ({
|
|
|
6471
7209
|
value: item.value,
|
|
6472
7210
|
label: item.label[language] ?? item.label.default
|
|
6473
7211
|
}));
|
|
6474
|
-
return /* @__PURE__ */ (0,
|
|
7212
|
+
return /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
|
|
6475
7213
|
SearchableSelect,
|
|
6476
7214
|
{
|
|
6477
7215
|
value,
|
|
@@ -6494,7 +7232,7 @@ var CountrySelector = ({
|
|
|
6494
7232
|
value: item.value,
|
|
6495
7233
|
label: item.label[language]
|
|
6496
7234
|
}));
|
|
6497
|
-
return /* @__PURE__ */ (0,
|
|
7235
|
+
return /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
|
|
6498
7236
|
SearchableSelect,
|
|
6499
7237
|
{
|
|
6500
7238
|
value,
|