ptechcore_ui 1.0.38 → 1.0.39
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 +2162 -2
- package/dist/index.d.cts +36 -1
- package/dist/index.d.ts +36 -1
- package/dist/index.js +2323 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -987,6 +987,7 @@ var SessionProvider = ({ children }) => {
|
|
|
987
987
|
setActiveBusinessEntity(result.data.user.centers_access.find((item) => parseInt(item.id) === parseInt(saved_center_id)) || result.data.user.centers_access[0] || null);
|
|
988
988
|
} else {
|
|
989
989
|
setLoggedUser(null);
|
|
990
|
+
localStorage.removeItem("token");
|
|
990
991
|
}
|
|
991
992
|
}).catch(() => setLoggedUser(null));
|
|
992
993
|
} else {
|
|
@@ -1770,7 +1771,7 @@ var MODULE_CODE_MAP = {
|
|
|
1770
1771
|
"PURCHASE": "WiseProcure",
|
|
1771
1772
|
"HR": "WiseHR"
|
|
1772
1773
|
};
|
|
1773
|
-
var RewiseLayout = ({ children, module_name = "Rewise", module_description = "
|
|
1774
|
+
var RewiseLayout = ({ children, module_name = "Rewise", module_description = "", primaryMenuItems, secondaryMenuItems }) => {
|
|
1774
1775
|
const location = useLocation();
|
|
1775
1776
|
const navigate = useNavigate();
|
|
1776
1777
|
const { theme, themeType, setTheme } = useTheme();
|
|
@@ -1918,7 +1919,7 @@ var RewiseLayout = ({ children, module_name = "Rewise", module_description = "De
|
|
|
1918
1919
|
const isModuleActive = (moduleId) => selectedModule === moduleId;
|
|
1919
1920
|
const getBreadcrumbs = () => {
|
|
1920
1921
|
const paths = location.pathname.split("/").filter(Boolean);
|
|
1921
|
-
const breadcrumbs = [{ label: "Accueil", path: "/" }];
|
|
1922
|
+
const breadcrumbs = [{ label: "Accueil", path: "/workspace/" }];
|
|
1922
1923
|
paths.forEach((path, index) => {
|
|
1923
1924
|
const fullPath = "/" + paths.slice(0, index + 1).join("/");
|
|
1924
1925
|
const module = primaryMenuItems.find((m) => m.id === path);
|
|
@@ -11848,10 +11849,2321 @@ var WorkSpace = () => {
|
|
|
11848
11849
|
] });
|
|
11849
11850
|
};
|
|
11850
11851
|
var WorkSpace_default = WorkSpace;
|
|
11852
|
+
|
|
11853
|
+
// src/pages/workspaces/HRConnectPage.tsx
|
|
11854
|
+
import { UserCog, Users as Users6, FileText as FileText9, Calendar as Calendar4, Award, TrendingUp as TrendingUp3 } from "lucide-react";
|
|
11855
|
+
import { jsx as jsx38, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
11856
|
+
var HRConnectPage = () => {
|
|
11857
|
+
return /* @__PURE__ */ jsxs33("div", { className: "h-full flex flex-col", children: [
|
|
11858
|
+
/* @__PURE__ */ jsx38("div", { className: "bg-[var(--color-surface)] border-b border-[var(--color-border)] px-6 py-4", children: /* @__PURE__ */ jsxs33("div", { className: "flex items-center gap-3", children: [
|
|
11859
|
+
/* @__PURE__ */ jsx38("div", { className: "p-2 bg-purple-100 rounded-lg", children: /* @__PURE__ */ jsx38(UserCog, { className: "w-6 h-6 text-purple-600" }) }),
|
|
11860
|
+
/* @__PURE__ */ jsxs33("div", { children: [
|
|
11861
|
+
/* @__PURE__ */ jsx38("h1", { className: "text-xl font-semibold text-[var(--color-text-primary)]", children: "HR Connect" }),
|
|
11862
|
+
/* @__PURE__ */ jsx38("p", { className: "text-sm text-[var(--color-text-secondary)]", children: "Gestion des ressources humaines" })
|
|
11863
|
+
] })
|
|
11864
|
+
] }) }),
|
|
11865
|
+
/* @__PURE__ */ jsx38("div", { className: "flex-1 p-6 bg-[var(--color-background)]", children: /* @__PURE__ */ jsxs33("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: [
|
|
11866
|
+
/* @__PURE__ */ jsxs33("div", { className: "bg-[var(--color-surface)] rounded-xl p-6 border border-[var(--color-border-light)] hover:shadow-md transition-shadow", children: [
|
|
11867
|
+
/* @__PURE__ */ jsxs33("div", { className: "flex items-center gap-3 mb-4", children: [
|
|
11868
|
+
/* @__PURE__ */ jsx38("div", { className: "p-2 bg-blue-100 rounded-lg", children: /* @__PURE__ */ jsx38(Users6, { className: "w-5 h-5 text-blue-600" }) }),
|
|
11869
|
+
/* @__PURE__ */ jsx38("h3", { className: "font-medium text-[var(--color-text-primary)]", children: "Employ\xE9s" })
|
|
11870
|
+
] }),
|
|
11871
|
+
/* @__PURE__ */ jsx38("p", { className: "text-sm text-[var(--color-text-secondary)]", children: "G\xE9rer les profils et informations des employ\xE9s" })
|
|
11872
|
+
] }),
|
|
11873
|
+
/* @__PURE__ */ jsxs33("div", { className: "bg-[var(--color-surface)] rounded-xl p-6 border border-[var(--color-border-light)] hover:shadow-md transition-shadow", children: [
|
|
11874
|
+
/* @__PURE__ */ jsxs33("div", { className: "flex items-center gap-3 mb-4", children: [
|
|
11875
|
+
/* @__PURE__ */ jsx38("div", { className: "p-2 bg-green-100 rounded-lg", children: /* @__PURE__ */ jsx38(Calendar4, { className: "w-5 h-5 text-green-600" }) }),
|
|
11876
|
+
/* @__PURE__ */ jsx38("h3", { className: "font-medium text-[var(--color-text-primary)]", children: "Cong\xE9s" })
|
|
11877
|
+
] }),
|
|
11878
|
+
/* @__PURE__ */ jsx38("p", { className: "text-sm text-[var(--color-text-secondary)]", children: "Suivi des demandes de cong\xE9s et absences" })
|
|
11879
|
+
] }),
|
|
11880
|
+
/* @__PURE__ */ jsxs33("div", { className: "bg-[var(--color-surface)] rounded-xl p-6 border border-[var(--color-border-light)] hover:shadow-md transition-shadow", children: [
|
|
11881
|
+
/* @__PURE__ */ jsxs33("div", { className: "flex items-center gap-3 mb-4", children: [
|
|
11882
|
+
/* @__PURE__ */ jsx38("div", { className: "p-2 bg-orange-100 rounded-lg", children: /* @__PURE__ */ jsx38(FileText9, { className: "w-5 h-5 text-orange-600" }) }),
|
|
11883
|
+
/* @__PURE__ */ jsx38("h3", { className: "font-medium text-[var(--color-text-primary)]", children: "Documents" })
|
|
11884
|
+
] }),
|
|
11885
|
+
/* @__PURE__ */ jsx38("p", { className: "text-sm text-[var(--color-text-secondary)]", children: "Gestion des documents RH et contrats" })
|
|
11886
|
+
] }),
|
|
11887
|
+
/* @__PURE__ */ jsxs33("div", { className: "bg-[var(--color-surface)] rounded-xl p-6 border border-[var(--color-border-light)] hover:shadow-md transition-shadow", children: [
|
|
11888
|
+
/* @__PURE__ */ jsxs33("div", { className: "flex items-center gap-3 mb-4", children: [
|
|
11889
|
+
/* @__PURE__ */ jsx38("div", { className: "p-2 bg-indigo-100 rounded-lg", children: /* @__PURE__ */ jsx38(TrendingUp3, { className: "w-5 h-5 text-indigo-600" }) }),
|
|
11890
|
+
/* @__PURE__ */ jsx38("h3", { className: "font-medium text-[var(--color-text-primary)]", children: "Performance" })
|
|
11891
|
+
] }),
|
|
11892
|
+
/* @__PURE__ */ jsx38("p", { className: "text-sm text-[var(--color-text-secondary)]", children: "\xC9valuations et objectifs des employ\xE9s" })
|
|
11893
|
+
] }),
|
|
11894
|
+
/* @__PURE__ */ jsxs33("div", { className: "bg-[var(--color-surface)] rounded-xl p-6 border border-[var(--color-border-light)] hover:shadow-md transition-shadow", children: [
|
|
11895
|
+
/* @__PURE__ */ jsxs33("div", { className: "flex items-center gap-3 mb-4", children: [
|
|
11896
|
+
/* @__PURE__ */ jsx38("div", { className: "p-2 bg-pink-100 rounded-lg", children: /* @__PURE__ */ jsx38(Award, { className: "w-5 h-5 text-pink-600" }) }),
|
|
11897
|
+
/* @__PURE__ */ jsx38("h3", { className: "font-medium text-[var(--color-text-primary)]", children: "Formations" })
|
|
11898
|
+
] }),
|
|
11899
|
+
/* @__PURE__ */ jsx38("p", { className: "text-sm text-[var(--color-text-secondary)]", children: "Programmes de formation et d\xE9veloppement" })
|
|
11900
|
+
] })
|
|
11901
|
+
] }) })
|
|
11902
|
+
] });
|
|
11903
|
+
};
|
|
11904
|
+
var HRConnectPage_default = HRConnectPage;
|
|
11905
|
+
|
|
11906
|
+
// src/pages/workspaces/MeetingHubPage.tsx
|
|
11907
|
+
import { Calendar as Calendar5, Video, Users as Users7, Clock as Clock6, MapPin as MapPin4, Plus as Plus5 } from "lucide-react";
|
|
11908
|
+
import { jsx as jsx39, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
11909
|
+
var MeetingHubPage = () => {
|
|
11910
|
+
return /* @__PURE__ */ jsxs34("div", { className: "h-full flex flex-col", children: [
|
|
11911
|
+
/* @__PURE__ */ jsx39("div", { className: "bg-[var(--color-surface)] border-b border-[var(--color-border)] px-6 py-4", children: /* @__PURE__ */ jsxs34("div", { className: "flex items-center justify-between", children: [
|
|
11912
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex items-center gap-3", children: [
|
|
11913
|
+
/* @__PURE__ */ jsx39("div", { className: "p-2 bg-blue-100 rounded-lg", children: /* @__PURE__ */ jsx39(Calendar5, { className: "w-6 h-6 text-blue-600" }) }),
|
|
11914
|
+
/* @__PURE__ */ jsxs34("div", { children: [
|
|
11915
|
+
/* @__PURE__ */ jsx39("h1", { className: "text-xl font-semibold text-[var(--color-text-primary)]", children: "Meeting Hub" }),
|
|
11916
|
+
/* @__PURE__ */ jsx39("p", { className: "text-sm text-[var(--color-text-secondary)]", children: "Planification et gestion des r\xE9unions" })
|
|
11917
|
+
] })
|
|
11918
|
+
] }),
|
|
11919
|
+
/* @__PURE__ */ jsxs34(Buttons_default, { children: [
|
|
11920
|
+
/* @__PURE__ */ jsx39(Plus5, { className: "w-4 h-4 mr-2" }),
|
|
11921
|
+
"Nouvelle r\xE9union"
|
|
11922
|
+
] })
|
|
11923
|
+
] }) }),
|
|
11924
|
+
/* @__PURE__ */ jsx39("div", { className: "flex-1 p-6 bg-[var(--color-background)]", children: /* @__PURE__ */ jsxs34("div", { className: "grid grid-cols-1 lg:grid-cols-3 gap-6", children: [
|
|
11925
|
+
/* @__PURE__ */ jsxs34("div", { className: "lg:col-span-2 bg-[var(--color-surface)] rounded-xl border border-[var(--color-border-light)]", children: [
|
|
11926
|
+
/* @__PURE__ */ jsx39("div", { className: "p-4 border-b border-[var(--color-border-light)]", children: /* @__PURE__ */ jsx39("h2", { className: "font-semibold text-[var(--color-text-primary)]", children: "R\xE9unions du jour" }) }),
|
|
11927
|
+
/* @__PURE__ */ jsxs34("div", { className: "p-4 space-y-4", children: [
|
|
11928
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex items-start gap-4 p-4 bg-[var(--color-background)] rounded-lg", children: [
|
|
11929
|
+
/* @__PURE__ */ jsx39("div", { className: "p-2 bg-blue-100 rounded-lg", children: /* @__PURE__ */ jsx39(Video, { className: "w-5 h-5 text-blue-600" }) }),
|
|
11930
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex-1", children: [
|
|
11931
|
+
/* @__PURE__ */ jsx39("h3", { className: "font-medium text-[var(--color-text-primary)]", children: "Stand-up quotidien" }),
|
|
11932
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex items-center gap-4 mt-2 text-sm text-[var(--color-text-secondary)]", children: [
|
|
11933
|
+
/* @__PURE__ */ jsxs34("span", { className: "flex items-center gap-1", children: [
|
|
11934
|
+
/* @__PURE__ */ jsx39(Clock6, { className: "w-4 h-4" }),
|
|
11935
|
+
"09:00 - 09:30"
|
|
11936
|
+
] }),
|
|
11937
|
+
/* @__PURE__ */ jsxs34("span", { className: "flex items-center gap-1", children: [
|
|
11938
|
+
/* @__PURE__ */ jsx39(Users7, { className: "w-4 h-4" }),
|
|
11939
|
+
"8 participants"
|
|
11940
|
+
] })
|
|
11941
|
+
] })
|
|
11942
|
+
] })
|
|
11943
|
+
] }),
|
|
11944
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex items-start gap-4 p-4 bg-[var(--color-background)] rounded-lg", children: [
|
|
11945
|
+
/* @__PURE__ */ jsx39("div", { className: "p-2 bg-green-100 rounded-lg", children: /* @__PURE__ */ jsx39(MapPin4, { className: "w-5 h-5 text-green-600" }) }),
|
|
11946
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex-1", children: [
|
|
11947
|
+
/* @__PURE__ */ jsx39("h3", { className: "font-medium text-[var(--color-text-primary)]", children: "Revue de sprint" }),
|
|
11948
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex items-center gap-4 mt-2 text-sm text-[var(--color-text-secondary)]", children: [
|
|
11949
|
+
/* @__PURE__ */ jsxs34("span", { className: "flex items-center gap-1", children: [
|
|
11950
|
+
/* @__PURE__ */ jsx39(Clock6, { className: "w-4 h-4" }),
|
|
11951
|
+
"14:00 - 15:30"
|
|
11952
|
+
] }),
|
|
11953
|
+
/* @__PURE__ */ jsxs34("span", { className: "flex items-center gap-1", children: [
|
|
11954
|
+
/* @__PURE__ */ jsx39(Users7, { className: "w-4 h-4" }),
|
|
11955
|
+
"12 participants"
|
|
11956
|
+
] })
|
|
11957
|
+
] })
|
|
11958
|
+
] })
|
|
11959
|
+
] }),
|
|
11960
|
+
/* @__PURE__ */ jsx39("p", { className: "text-center text-sm text-[var(--color-text-tertiary)] py-4", children: "Aucune autre r\xE9union pr\xE9vue aujourd'hui" })
|
|
11961
|
+
] })
|
|
11962
|
+
] }),
|
|
11963
|
+
/* @__PURE__ */ jsxs34("div", { className: "space-y-6", children: [
|
|
11964
|
+
/* @__PURE__ */ jsxs34("div", { className: "bg-[var(--color-surface)] rounded-xl p-6 border border-[var(--color-border-light)]", children: [
|
|
11965
|
+
/* @__PURE__ */ jsx39("h3", { className: "font-medium text-[var(--color-text-primary)] mb-4", children: "Cette semaine" }),
|
|
11966
|
+
/* @__PURE__ */ jsxs34("div", { className: "space-y-3", children: [
|
|
11967
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex justify-between", children: [
|
|
11968
|
+
/* @__PURE__ */ jsx39("span", { className: "text-sm text-[var(--color-text-secondary)]", children: "R\xE9unions planifi\xE9es" }),
|
|
11969
|
+
/* @__PURE__ */ jsx39("span", { className: "font-semibold text-[var(--color-text-primary)]", children: "12" })
|
|
11970
|
+
] }),
|
|
11971
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex justify-between", children: [
|
|
11972
|
+
/* @__PURE__ */ jsx39("span", { className: "text-sm text-[var(--color-text-secondary)]", children: "Heures de r\xE9union" }),
|
|
11973
|
+
/* @__PURE__ */ jsx39("span", { className: "font-semibold text-[var(--color-text-primary)]", children: "8h" })
|
|
11974
|
+
] }),
|
|
11975
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex justify-between", children: [
|
|
11976
|
+
/* @__PURE__ */ jsx39("span", { className: "text-sm text-[var(--color-text-secondary)]", children: "Participants uniques" }),
|
|
11977
|
+
/* @__PURE__ */ jsx39("span", { className: "font-semibold text-[var(--color-text-primary)]", children: "24" })
|
|
11978
|
+
] })
|
|
11979
|
+
] })
|
|
11980
|
+
] }),
|
|
11981
|
+
/* @__PURE__ */ jsxs34("div", { className: "bg-[var(--color-surface)] rounded-xl p-6 border border-[var(--color-border-light)]", children: [
|
|
11982
|
+
/* @__PURE__ */ jsx39("h3", { className: "font-medium text-[var(--color-text-primary)] mb-4", children: "Salles disponibles" }),
|
|
11983
|
+
/* @__PURE__ */ jsxs34("div", { className: "space-y-2", children: [
|
|
11984
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex items-center justify-between p-2 bg-green-50 rounded-lg", children: [
|
|
11985
|
+
/* @__PURE__ */ jsx39("span", { className: "text-sm text-[var(--color-text-primary)]", children: "Salle A" }),
|
|
11986
|
+
/* @__PURE__ */ jsx39("span", { className: "text-xs px-2 py-1 bg-green-100 text-green-700 rounded", children: "Libre" })
|
|
11987
|
+
] }),
|
|
11988
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex items-center justify-between p-2 bg-red-50 rounded-lg", children: [
|
|
11989
|
+
/* @__PURE__ */ jsx39("span", { className: "text-sm text-[var(--color-text-primary)]", children: "Salle B" }),
|
|
11990
|
+
/* @__PURE__ */ jsx39("span", { className: "text-xs px-2 py-1 bg-red-100 text-red-700 rounded", children: "Occup\xE9e" })
|
|
11991
|
+
] }),
|
|
11992
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex items-center justify-between p-2 bg-green-50 rounded-lg", children: [
|
|
11993
|
+
/* @__PURE__ */ jsx39("span", { className: "text-sm text-[var(--color-text-primary)]", children: "Salle C" }),
|
|
11994
|
+
/* @__PURE__ */ jsx39("span", { className: "text-xs px-2 py-1 bg-green-100 text-green-700 rounded", children: "Libre" })
|
|
11995
|
+
] })
|
|
11996
|
+
] })
|
|
11997
|
+
] })
|
|
11998
|
+
] })
|
|
11999
|
+
] }) })
|
|
12000
|
+
] });
|
|
12001
|
+
};
|
|
12002
|
+
var MeetingHubPage_default = MeetingHubPage;
|
|
12003
|
+
|
|
12004
|
+
// src/pages/workspaces/BudgetPage.tsx
|
|
12005
|
+
import { CircleDollarSign, TrendingUp as TrendingUp4, TrendingDown as TrendingDown2, PieChart, BarChart3 as BarChart32, FileText as FileText10 } from "lucide-react";
|
|
12006
|
+
import { jsx as jsx40, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
12007
|
+
var BudgetPage = () => {
|
|
12008
|
+
return /* @__PURE__ */ jsxs35("div", { className: "h-full flex flex-col", children: [
|
|
12009
|
+
/* @__PURE__ */ jsx40("div", { className: "bg-[var(--color-surface)] border-b border-[var(--color-border)] px-6 py-4", children: /* @__PURE__ */ jsxs35("div", { className: "flex items-center gap-3", children: [
|
|
12010
|
+
/* @__PURE__ */ jsx40("div", { className: "p-2 bg-emerald-100 rounded-lg", children: /* @__PURE__ */ jsx40(CircleDollarSign, { className: "w-6 h-6 text-emerald-600" }) }),
|
|
12011
|
+
/* @__PURE__ */ jsxs35("div", { children: [
|
|
12012
|
+
/* @__PURE__ */ jsx40("h1", { className: "text-xl font-semibold text-[var(--color-text-primary)]", children: "Budget" }),
|
|
12013
|
+
/* @__PURE__ */ jsx40("p", { className: "text-sm text-[var(--color-text-secondary)]", children: "Gestion budg\xE9taire et suivi financier" })
|
|
12014
|
+
] })
|
|
12015
|
+
] }) }),
|
|
12016
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex-1 p-6 bg-[var(--color-background)]", children: [
|
|
12017
|
+
/* @__PURE__ */ jsxs35("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-6 mb-6", children: [
|
|
12018
|
+
/* @__PURE__ */ jsxs35("div", { className: "bg-[var(--color-surface)] rounded-xl p-6 border border-[var(--color-border-light)]", children: [
|
|
12019
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex items-center justify-between mb-4", children: [
|
|
12020
|
+
/* @__PURE__ */ jsx40("span", { className: "text-sm text-[var(--color-text-secondary)]", children: "Budget Total" }),
|
|
12021
|
+
/* @__PURE__ */ jsx40("div", { className: "p-2 bg-blue-100 rounded-lg", children: /* @__PURE__ */ jsx40(CircleDollarSign, { className: "w-5 h-5 text-blue-600" }) })
|
|
12022
|
+
] }),
|
|
12023
|
+
/* @__PURE__ */ jsx40("p", { className: "text-2xl font-bold text-[var(--color-text-primary)]", children: "1,250,000 \u20AC" }),
|
|
12024
|
+
/* @__PURE__ */ jsxs35("p", { className: "text-sm text-green-600 mt-2 flex items-center gap-1", children: [
|
|
12025
|
+
/* @__PURE__ */ jsx40(TrendingUp4, { className: "w-4 h-4" }),
|
|
12026
|
+
"+12% vs ann\xE9e pr\xE9c\xE9dente"
|
|
12027
|
+
] })
|
|
12028
|
+
] }),
|
|
12029
|
+
/* @__PURE__ */ jsxs35("div", { className: "bg-[var(--color-surface)] rounded-xl p-6 border border-[var(--color-border-light)]", children: [
|
|
12030
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex items-center justify-between mb-4", children: [
|
|
12031
|
+
/* @__PURE__ */ jsx40("span", { className: "text-sm text-[var(--color-text-secondary)]", children: "D\xE9penses YTD" }),
|
|
12032
|
+
/* @__PURE__ */ jsx40("div", { className: "p-2 bg-orange-100 rounded-lg", children: /* @__PURE__ */ jsx40(TrendingDown2, { className: "w-5 h-5 text-orange-600" }) })
|
|
12033
|
+
] }),
|
|
12034
|
+
/* @__PURE__ */ jsx40("p", { className: "text-2xl font-bold text-[var(--color-text-primary)]", children: "875,000 \u20AC" }),
|
|
12035
|
+
/* @__PURE__ */ jsx40("p", { className: "text-sm text-[var(--color-text-secondary)] mt-2", children: "70% du budget utilis\xE9" })
|
|
12036
|
+
] }),
|
|
12037
|
+
/* @__PURE__ */ jsxs35("div", { className: "bg-[var(--color-surface)] rounded-xl p-6 border border-[var(--color-border-light)]", children: [
|
|
12038
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex items-center justify-between mb-4", children: [
|
|
12039
|
+
/* @__PURE__ */ jsx40("span", { className: "text-sm text-[var(--color-text-secondary)]", children: "Disponible" }),
|
|
12040
|
+
/* @__PURE__ */ jsx40("div", { className: "p-2 bg-green-100 rounded-lg", children: /* @__PURE__ */ jsx40(PieChart, { className: "w-5 h-5 text-green-600" }) })
|
|
12041
|
+
] }),
|
|
12042
|
+
/* @__PURE__ */ jsx40("p", { className: "text-2xl font-bold text-green-600", children: "375,000 \u20AC" }),
|
|
12043
|
+
/* @__PURE__ */ jsx40("p", { className: "text-sm text-[var(--color-text-secondary)] mt-2", children: "30% restant" })
|
|
12044
|
+
] })
|
|
12045
|
+
] }),
|
|
12046
|
+
/* @__PURE__ */ jsxs35("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-6", children: [
|
|
12047
|
+
/* @__PURE__ */ jsxs35("div", { className: "bg-[var(--color-surface)] rounded-xl border border-[var(--color-border-light)]", children: [
|
|
12048
|
+
/* @__PURE__ */ jsxs35("div", { className: "p-4 border-b border-[var(--color-border-light)] flex items-center gap-2", children: [
|
|
12049
|
+
/* @__PURE__ */ jsx40(BarChart32, { className: "w-5 h-5 text-[var(--color-text-secondary)]" }),
|
|
12050
|
+
/* @__PURE__ */ jsx40("h2", { className: "font-semibold text-[var(--color-text-primary)]", children: "OPEX - D\xE9penses Op\xE9rationnelles" })
|
|
12051
|
+
] }),
|
|
12052
|
+
/* @__PURE__ */ jsxs35("div", { className: "p-4 space-y-4", children: [
|
|
12053
|
+
/* @__PURE__ */ jsxs35("div", { children: [
|
|
12054
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex justify-between text-sm mb-1", children: [
|
|
12055
|
+
/* @__PURE__ */ jsx40("span", { className: "text-[var(--color-text-secondary)]", children: "Salaires" }),
|
|
12056
|
+
/* @__PURE__ */ jsx40("span", { className: "text-[var(--color-text-primary)]", children: "450,000 \u20AC" })
|
|
12057
|
+
] }),
|
|
12058
|
+
/* @__PURE__ */ jsx40("div", { className: "w-full bg-[var(--color-border)] rounded-full h-2", children: /* @__PURE__ */ jsx40("div", { className: "bg-blue-600 h-2 rounded-full", style: { width: "75%" } }) })
|
|
12059
|
+
] }),
|
|
12060
|
+
/* @__PURE__ */ jsxs35("div", { children: [
|
|
12061
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex justify-between text-sm mb-1", children: [
|
|
12062
|
+
/* @__PURE__ */ jsx40("span", { className: "text-[var(--color-text-secondary)]", children: "Fournitures" }),
|
|
12063
|
+
/* @__PURE__ */ jsx40("span", { className: "text-[var(--color-text-primary)]", children: "125,000 \u20AC" })
|
|
12064
|
+
] }),
|
|
12065
|
+
/* @__PURE__ */ jsx40("div", { className: "w-full bg-[var(--color-border)] rounded-full h-2", children: /* @__PURE__ */ jsx40("div", { className: "bg-green-600 h-2 rounded-full", style: { width: "60%" } }) })
|
|
12066
|
+
] }),
|
|
12067
|
+
/* @__PURE__ */ jsxs35("div", { children: [
|
|
12068
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex justify-between text-sm mb-1", children: [
|
|
12069
|
+
/* @__PURE__ */ jsx40("span", { className: "text-[var(--color-text-secondary)]", children: "Services" }),
|
|
12070
|
+
/* @__PURE__ */ jsx40("span", { className: "text-[var(--color-text-primary)]", children: "200,000 \u20AC" })
|
|
12071
|
+
] }),
|
|
12072
|
+
/* @__PURE__ */ jsx40("div", { className: "w-full bg-[var(--color-border)] rounded-full h-2", children: /* @__PURE__ */ jsx40("div", { className: "bg-purple-600 h-2 rounded-full", style: { width: "80%" } }) })
|
|
12073
|
+
] })
|
|
12074
|
+
] })
|
|
12075
|
+
] }),
|
|
12076
|
+
/* @__PURE__ */ jsxs35("div", { className: "bg-[var(--color-surface)] rounded-xl border border-[var(--color-border-light)]", children: [
|
|
12077
|
+
/* @__PURE__ */ jsxs35("div", { className: "p-4 border-b border-[var(--color-border-light)] flex items-center gap-2", children: [
|
|
12078
|
+
/* @__PURE__ */ jsx40(FileText10, { className: "w-5 h-5 text-[var(--color-text-secondary)]" }),
|
|
12079
|
+
/* @__PURE__ */ jsx40("h2", { className: "font-semibold text-[var(--color-text-primary)]", children: "CAPEX - Investissements" })
|
|
12080
|
+
] }),
|
|
12081
|
+
/* @__PURE__ */ jsxs35("div", { className: "p-4 space-y-4", children: [
|
|
12082
|
+
/* @__PURE__ */ jsxs35("div", { children: [
|
|
12083
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex justify-between text-sm mb-1", children: [
|
|
12084
|
+
/* @__PURE__ */ jsx40("span", { className: "text-[var(--color-text-secondary)]", children: "\xC9quipements IT" }),
|
|
12085
|
+
/* @__PURE__ */ jsx40("span", { className: "text-[var(--color-text-primary)]", children: "75,000 \u20AC" })
|
|
12086
|
+
] }),
|
|
12087
|
+
/* @__PURE__ */ jsx40("div", { className: "w-full bg-[var(--color-border)] rounded-full h-2", children: /* @__PURE__ */ jsx40("div", { className: "bg-indigo-600 h-2 rounded-full", style: { width: "50%" } }) })
|
|
12088
|
+
] }),
|
|
12089
|
+
/* @__PURE__ */ jsxs35("div", { children: [
|
|
12090
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex justify-between text-sm mb-1", children: [
|
|
12091
|
+
/* @__PURE__ */ jsx40("span", { className: "text-[var(--color-text-secondary)]", children: "Mobilier" }),
|
|
12092
|
+
/* @__PURE__ */ jsx40("span", { className: "text-[var(--color-text-primary)]", children: "25,000 \u20AC" })
|
|
12093
|
+
] }),
|
|
12094
|
+
/* @__PURE__ */ jsx40("div", { className: "w-full bg-[var(--color-border)] rounded-full h-2", children: /* @__PURE__ */ jsx40("div", { className: "bg-pink-600 h-2 rounded-full", style: { width: "30%" } }) })
|
|
12095
|
+
] }),
|
|
12096
|
+
/* @__PURE__ */ jsxs35("div", { children: [
|
|
12097
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex justify-between text-sm mb-1", children: [
|
|
12098
|
+
/* @__PURE__ */ jsx40("span", { className: "text-[var(--color-text-secondary)]", children: "V\xE9hicules" }),
|
|
12099
|
+
/* @__PURE__ */ jsx40("span", { className: "text-[var(--color-text-primary)]", children: "0 \u20AC" })
|
|
12100
|
+
] }),
|
|
12101
|
+
/* @__PURE__ */ jsx40("div", { className: "w-full bg-[var(--color-border)] rounded-full h-2", children: /* @__PURE__ */ jsx40("div", { className: "bg-orange-600 h-2 rounded-full", style: { width: "0%" } }) })
|
|
12102
|
+
] })
|
|
12103
|
+
] })
|
|
12104
|
+
] })
|
|
12105
|
+
] })
|
|
12106
|
+
] })
|
|
12107
|
+
] });
|
|
12108
|
+
};
|
|
12109
|
+
var BudgetPage_default = BudgetPage;
|
|
12110
|
+
|
|
12111
|
+
// src/pages/workspaces/ChatEquipePage.tsx
|
|
12112
|
+
import { useState as useState26 } from "react";
|
|
12113
|
+
import { MessageCircle, Send as Send3, Search as Search4, Users as Users8, Plus as Plus6, Phone as Phone3, Video as Video2, MoreVertical as MoreVertical2 } from "lucide-react";
|
|
12114
|
+
import { jsx as jsx41, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
12115
|
+
var ChatEquipePage = () => {
|
|
12116
|
+
const [message, setMessage] = useState26("");
|
|
12117
|
+
return /* @__PURE__ */ jsxs36("div", { className: "h-full flex flex-col", children: [
|
|
12118
|
+
/* @__PURE__ */ jsx41("div", { className: "bg-[var(--color-surface)] border-b border-[var(--color-border)] px-6 py-4", children: /* @__PURE__ */ jsxs36("div", { className: "flex items-center gap-3", children: [
|
|
12119
|
+
/* @__PURE__ */ jsx41("div", { className: "p-2 bg-indigo-100 rounded-lg", children: /* @__PURE__ */ jsx41(MessageCircle, { className: "w-6 h-6 text-indigo-600" }) }),
|
|
12120
|
+
/* @__PURE__ */ jsxs36("div", { children: [
|
|
12121
|
+
/* @__PURE__ */ jsx41("h1", { className: "text-xl font-semibold text-[var(--color-text-primary)]", children: "Chat \xC9quipe" }),
|
|
12122
|
+
/* @__PURE__ */ jsx41("p", { className: "text-sm text-[var(--color-text-secondary)]", children: "Communication interne et messagerie" })
|
|
12123
|
+
] })
|
|
12124
|
+
] }) }),
|
|
12125
|
+
/* @__PURE__ */ jsxs36("div", { className: "flex-1 flex overflow-hidden bg-[var(--color-background)]", children: [
|
|
12126
|
+
/* @__PURE__ */ jsxs36("div", { className: "w-80 border-r border-[var(--color-border)] bg-[var(--color-surface)] flex flex-col", children: [
|
|
12127
|
+
/* @__PURE__ */ jsx41("div", { className: "p-4 border-b border-[var(--color-border-light)]", children: /* @__PURE__ */ jsxs36("div", { className: "relative", children: [
|
|
12128
|
+
/* @__PURE__ */ jsx41(Search4, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-[var(--color-text-tertiary)]" }),
|
|
12129
|
+
/* @__PURE__ */ jsx41(
|
|
12130
|
+
"input",
|
|
12131
|
+
{
|
|
12132
|
+
type: "text",
|
|
12133
|
+
placeholder: "Rechercher...",
|
|
12134
|
+
className: "w-full pl-9 pr-4 py-2 text-sm border border-[var(--color-border)] rounded-lg\r\n focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)]/20 focus:border-[var(--color-primary)]\r\n bg-[var(--color-background)] text-[var(--color-text-primary)]"
|
|
12135
|
+
}
|
|
12136
|
+
)
|
|
12137
|
+
] }) }),
|
|
12138
|
+
/* @__PURE__ */ jsxs36("div", { className: "flex-1 overflow-y-auto", children: [
|
|
12139
|
+
/* @__PURE__ */ jsxs36("div", { className: "p-2", children: [
|
|
12140
|
+
/* @__PURE__ */ jsxs36("div", { className: "flex items-center justify-between px-3 py-2", children: [
|
|
12141
|
+
/* @__PURE__ */ jsx41("span", { className: "text-xs font-semibold text-[var(--color-text-tertiary)] uppercase", children: "Canaux" }),
|
|
12142
|
+
/* @__PURE__ */ jsx41("button", { className: "p-1 hover:bg-[var(--color-surface-hover)] rounded", children: /* @__PURE__ */ jsx41(Plus6, { className: "w-4 h-4 text-[var(--color-text-tertiary)]" }) })
|
|
12143
|
+
] }),
|
|
12144
|
+
/* @__PURE__ */ jsxs36("button", { className: "w-full flex items-center gap-3 px-3 py-2 rounded-lg bg-[var(--color-primary-light)] text-[var(--color-primary)]", children: [
|
|
12145
|
+
/* @__PURE__ */ jsx41("span", { className: "text-lg", children: "#" }),
|
|
12146
|
+
/* @__PURE__ */ jsx41("span", { className: "text-sm font-medium", children: "g\xE9n\xE9ral" }),
|
|
12147
|
+
/* @__PURE__ */ jsx41("span", { className: "ml-auto text-xs bg-[var(--color-primary)] text-white px-2 py-0.5 rounded-full", children: "3" })
|
|
12148
|
+
] }),
|
|
12149
|
+
/* @__PURE__ */ jsxs36("button", { className: "w-full flex items-center gap-3 px-3 py-2 rounded-lg hover:bg-[var(--color-surface-hover)] text-[var(--color-text-primary)]", children: [
|
|
12150
|
+
/* @__PURE__ */ jsx41("span", { className: "text-lg", children: "#" }),
|
|
12151
|
+
/* @__PURE__ */ jsx41("span", { className: "text-sm", children: "projets" })
|
|
12152
|
+
] }),
|
|
12153
|
+
/* @__PURE__ */ jsxs36("button", { className: "w-full flex items-center gap-3 px-3 py-2 rounded-lg hover:bg-[var(--color-surface-hover)] text-[var(--color-text-primary)]", children: [
|
|
12154
|
+
/* @__PURE__ */ jsx41("span", { className: "text-lg", children: "#" }),
|
|
12155
|
+
/* @__PURE__ */ jsx41("span", { className: "text-sm", children: "annonces" })
|
|
12156
|
+
] })
|
|
12157
|
+
] }),
|
|
12158
|
+
/* @__PURE__ */ jsxs36("div", { className: "p-2 mt-2", children: [
|
|
12159
|
+
/* @__PURE__ */ jsx41("div", { className: "flex items-center justify-between px-3 py-2", children: /* @__PURE__ */ jsx41("span", { className: "text-xs font-semibold text-[var(--color-text-tertiary)] uppercase", children: "Messages Directs" }) }),
|
|
12160
|
+
/* @__PURE__ */ jsxs36("button", { className: "w-full flex items-center gap-3 px-3 py-2 rounded-lg hover:bg-[var(--color-surface-hover)]", children: [
|
|
12161
|
+
/* @__PURE__ */ jsx41("div", { className: "w-8 h-8 bg-blue-100 rounded-full flex items-center justify-center", children: /* @__PURE__ */ jsx41("span", { className: "text-xs font-medium text-blue-600", children: "JD" }) }),
|
|
12162
|
+
/* @__PURE__ */ jsxs36("div", { className: "flex-1 text-left", children: [
|
|
12163
|
+
/* @__PURE__ */ jsx41("span", { className: "text-sm text-[var(--color-text-primary)]", children: "Jean Dupont" }),
|
|
12164
|
+
/* @__PURE__ */ jsx41("p", { className: "text-xs text-[var(--color-text-tertiary)] truncate", children: "D'accord, merci!" })
|
|
12165
|
+
] })
|
|
12166
|
+
] }),
|
|
12167
|
+
/* @__PURE__ */ jsxs36("button", { className: "w-full flex items-center gap-3 px-3 py-2 rounded-lg hover:bg-[var(--color-surface-hover)]", children: [
|
|
12168
|
+
/* @__PURE__ */ jsx41("div", { className: "w-8 h-8 bg-green-100 rounded-full flex items-center justify-center", children: /* @__PURE__ */ jsx41("span", { className: "text-xs font-medium text-green-600", children: "ML" }) }),
|
|
12169
|
+
/* @__PURE__ */ jsxs36("div", { className: "flex-1 text-left", children: [
|
|
12170
|
+
/* @__PURE__ */ jsx41("span", { className: "text-sm text-[var(--color-text-primary)]", children: "Marie Lambert" }),
|
|
12171
|
+
/* @__PURE__ */ jsx41("p", { className: "text-xs text-[var(--color-text-tertiary)] truncate", children: "Le rapport est pr\xEAt" })
|
|
12172
|
+
] })
|
|
12173
|
+
] })
|
|
12174
|
+
] })
|
|
12175
|
+
] })
|
|
12176
|
+
] }),
|
|
12177
|
+
/* @__PURE__ */ jsxs36("div", { className: "flex-1 flex flex-col", children: [
|
|
12178
|
+
/* @__PURE__ */ jsxs36("div", { className: "bg-[var(--color-surface)] border-b border-[var(--color-border-light)] px-6 py-3 flex items-center justify-between", children: [
|
|
12179
|
+
/* @__PURE__ */ jsxs36("div", { className: "flex items-center gap-3", children: [
|
|
12180
|
+
/* @__PURE__ */ jsx41("span", { className: "text-lg font-medium text-[var(--color-text-primary)]", children: "# g\xE9n\xE9ral" }),
|
|
12181
|
+
/* @__PURE__ */ jsx41("span", { className: "text-sm text-[var(--color-text-tertiary)]", children: "|" }),
|
|
12182
|
+
/* @__PURE__ */ jsx41("span", { className: "text-sm text-[var(--color-text-secondary)]", children: "Canal de discussion g\xE9n\xE9rale" })
|
|
12183
|
+
] }),
|
|
12184
|
+
/* @__PURE__ */ jsxs36("div", { className: "flex items-center gap-2", children: [
|
|
12185
|
+
/* @__PURE__ */ jsx41("button", { className: "p-2 hover:bg-[var(--color-surface-hover)] rounded-lg", children: /* @__PURE__ */ jsx41(Users8, { className: "w-5 h-5 text-[var(--color-text-tertiary)]" }) }),
|
|
12186
|
+
/* @__PURE__ */ jsx41("button", { className: "p-2 hover:bg-[var(--color-surface-hover)] rounded-lg", children: /* @__PURE__ */ jsx41(Phone3, { className: "w-5 h-5 text-[var(--color-text-tertiary)]" }) }),
|
|
12187
|
+
/* @__PURE__ */ jsx41("button", { className: "p-2 hover:bg-[var(--color-surface-hover)] rounded-lg", children: /* @__PURE__ */ jsx41(Video2, { className: "w-5 h-5 text-[var(--color-text-tertiary)]" }) }),
|
|
12188
|
+
/* @__PURE__ */ jsx41("button", { className: "p-2 hover:bg-[var(--color-surface-hover)] rounded-lg", children: /* @__PURE__ */ jsx41(MoreVertical2, { className: "w-5 h-5 text-[var(--color-text-tertiary)]" }) })
|
|
12189
|
+
] })
|
|
12190
|
+
] }),
|
|
12191
|
+
/* @__PURE__ */ jsxs36("div", { className: "flex-1 overflow-y-auto p-6 space-y-4", children: [
|
|
12192
|
+
/* @__PURE__ */ jsxs36("div", { className: "flex gap-3", children: [
|
|
12193
|
+
/* @__PURE__ */ jsx41("div", { className: "w-10 h-10 bg-blue-100 rounded-full flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ jsx41("span", { className: "text-sm font-medium text-blue-600", children: "JD" }) }),
|
|
12194
|
+
/* @__PURE__ */ jsxs36("div", { children: [
|
|
12195
|
+
/* @__PURE__ */ jsxs36("div", { className: "flex items-center gap-2", children: [
|
|
12196
|
+
/* @__PURE__ */ jsx41("span", { className: "font-medium text-[var(--color-text-primary)]", children: "Jean Dupont" }),
|
|
12197
|
+
/* @__PURE__ */ jsx41("span", { className: "text-xs text-[var(--color-text-tertiary)]", children: "10:30" })
|
|
12198
|
+
] }),
|
|
12199
|
+
/* @__PURE__ */ jsx41("p", { className: "text-sm text-[var(--color-text-primary)] mt-1", children: "Bonjour \xE0 tous ! La r\xE9union de ce matin est report\xE9e \xE0 14h." })
|
|
12200
|
+
] })
|
|
12201
|
+
] }),
|
|
12202
|
+
/* @__PURE__ */ jsxs36("div", { className: "flex gap-3", children: [
|
|
12203
|
+
/* @__PURE__ */ jsx41("div", { className: "w-10 h-10 bg-green-100 rounded-full flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ jsx41("span", { className: "text-sm font-medium text-green-600", children: "ML" }) }),
|
|
12204
|
+
/* @__PURE__ */ jsxs36("div", { children: [
|
|
12205
|
+
/* @__PURE__ */ jsxs36("div", { className: "flex items-center gap-2", children: [
|
|
12206
|
+
/* @__PURE__ */ jsx41("span", { className: "font-medium text-[var(--color-text-primary)]", children: "Marie Lambert" }),
|
|
12207
|
+
/* @__PURE__ */ jsx41("span", { className: "text-xs text-[var(--color-text-tertiary)]", children: "10:32" })
|
|
12208
|
+
] }),
|
|
12209
|
+
/* @__PURE__ */ jsx41("p", { className: "text-sm text-[var(--color-text-primary)] mt-1", children: "Bien not\xE9, merci pour l'info !" })
|
|
12210
|
+
] })
|
|
12211
|
+
] })
|
|
12212
|
+
] }),
|
|
12213
|
+
/* @__PURE__ */ jsx41("div", { className: "bg-[var(--color-surface)] border-t border-[var(--color-border-light)] p-4", children: /* @__PURE__ */ jsxs36("div", { className: "flex items-center gap-3", children: [
|
|
12214
|
+
/* @__PURE__ */ jsx41(
|
|
12215
|
+
"input",
|
|
12216
|
+
{
|
|
12217
|
+
type: "text",
|
|
12218
|
+
placeholder: "\xC9crire un message...",
|
|
12219
|
+
value: message,
|
|
12220
|
+
onChange: (e) => setMessage(e.target.value),
|
|
12221
|
+
className: "flex-1 px-4 py-2 border border-[var(--color-border)] rounded-lg\r\n focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)]/20 focus:border-[var(--color-primary)]\r\n bg-[var(--color-background)] text-[var(--color-text-primary)]"
|
|
12222
|
+
}
|
|
12223
|
+
),
|
|
12224
|
+
/* @__PURE__ */ jsx41("button", { className: "p-2 bg-[var(--color-primary)] text-white rounded-lg hover:bg-[var(--color-primary-dark)] transition-colors", children: /* @__PURE__ */ jsx41(Send3, { className: "w-5 h-5" }) })
|
|
12225
|
+
] }) })
|
|
12226
|
+
] })
|
|
12227
|
+
] })
|
|
12228
|
+
] });
|
|
12229
|
+
};
|
|
12230
|
+
var ChatEquipePage_default = ChatEquipePage;
|
|
12231
|
+
|
|
12232
|
+
// src/pages/workspaces/ActifsPage.tsx
|
|
12233
|
+
import { Building2 as Building26, Package as Package2, Truck as Truck2, Laptop, Wrench as Wrench2, MapPin as MapPin5, Search as Search5, Plus as Plus7, Filter as Filter2 } from "lucide-react";
|
|
12234
|
+
import { jsx as jsx42, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
12235
|
+
var ActifsPage = () => {
|
|
12236
|
+
return /* @__PURE__ */ jsxs37("div", { className: "h-full flex flex-col", children: [
|
|
12237
|
+
/* @__PURE__ */ jsx42("div", { className: "bg-[var(--color-surface)] border-b border-[var(--color-border)] px-6 py-4", children: /* @__PURE__ */ jsxs37("div", { className: "flex items-center justify-between", children: [
|
|
12238
|
+
/* @__PURE__ */ jsxs37("div", { className: "flex items-center gap-3", children: [
|
|
12239
|
+
/* @__PURE__ */ jsx42("div", { className: "p-2 bg-orange-100 rounded-lg", children: /* @__PURE__ */ jsx42(Building26, { className: "w-6 h-6 text-orange-600" }) }),
|
|
12240
|
+
/* @__PURE__ */ jsxs37("div", { children: [
|
|
12241
|
+
/* @__PURE__ */ jsx42("h1", { className: "text-xl font-semibold text-[var(--color-text-primary)]", children: "Actifs" }),
|
|
12242
|
+
/* @__PURE__ */ jsx42("p", { className: "text-sm text-[var(--color-text-secondary)]", children: "Gestion des immobilisations et \xE9quipements" })
|
|
12243
|
+
] })
|
|
12244
|
+
] }),
|
|
12245
|
+
/* @__PURE__ */ jsxs37("div", { className: "flex items-center gap-3", children: [
|
|
12246
|
+
/* @__PURE__ */ jsxs37(SecondaryButton, { variant: "outline", children: [
|
|
12247
|
+
/* @__PURE__ */ jsx42(Filter2, { className: "w-4 h-4 mr-2" }),
|
|
12248
|
+
"Filtrer"
|
|
12249
|
+
] }),
|
|
12250
|
+
/* @__PURE__ */ jsxs37(Buttons_default, { children: [
|
|
12251
|
+
/* @__PURE__ */ jsx42(Plus7, { className: "w-4 h-4 mr-2" }),
|
|
12252
|
+
"Nouvel actif"
|
|
12253
|
+
] })
|
|
12254
|
+
] })
|
|
12255
|
+
] }) }),
|
|
12256
|
+
/* @__PURE__ */ jsxs37("div", { className: "flex-1 p-6 bg-[var(--color-background)]", children: [
|
|
12257
|
+
/* @__PURE__ */ jsx42("div", { className: "mb-6", children: /* @__PURE__ */ jsxs37("div", { className: "relative max-w-md", children: [
|
|
12258
|
+
/* @__PURE__ */ jsx42(Search5, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-[var(--color-text-tertiary)]" }),
|
|
12259
|
+
/* @__PURE__ */ jsx42(
|
|
12260
|
+
"input",
|
|
12261
|
+
{
|
|
12262
|
+
type: "text",
|
|
12263
|
+
placeholder: "Rechercher un actif...",
|
|
12264
|
+
className: "w-full pl-9 pr-4 py-2 text-sm border border-[var(--color-border)] rounded-lg\r\n focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)]/20 focus:border-[var(--color-primary)]\r\n bg-[var(--color-surface)] text-[var(--color-text-primary)]"
|
|
12265
|
+
}
|
|
12266
|
+
)
|
|
12267
|
+
] }) }),
|
|
12268
|
+
/* @__PURE__ */ jsxs37("div", { className: "grid grid-cols-1 md:grid-cols-4 gap-4 mb-6", children: [
|
|
12269
|
+
/* @__PURE__ */ jsx42("div", { className: "bg-[var(--color-surface)] rounded-xl p-4 border border-[var(--color-border-light)]", children: /* @__PURE__ */ jsxs37("div", { className: "flex items-center gap-3", children: [
|
|
12270
|
+
/* @__PURE__ */ jsx42("div", { className: "p-2 bg-blue-100 rounded-lg", children: /* @__PURE__ */ jsx42(Laptop, { className: "w-5 h-5 text-blue-600" }) }),
|
|
12271
|
+
/* @__PURE__ */ jsxs37("div", { children: [
|
|
12272
|
+
/* @__PURE__ */ jsx42("p", { className: "text-2xl font-bold text-[var(--color-text-primary)]", children: "156" }),
|
|
12273
|
+
/* @__PURE__ */ jsx42("p", { className: "text-xs text-[var(--color-text-secondary)]", children: "\xC9quipements IT" })
|
|
12274
|
+
] })
|
|
12275
|
+
] }) }),
|
|
12276
|
+
/* @__PURE__ */ jsx42("div", { className: "bg-[var(--color-surface)] rounded-xl p-4 border border-[var(--color-border-light)]", children: /* @__PURE__ */ jsxs37("div", { className: "flex items-center gap-3", children: [
|
|
12277
|
+
/* @__PURE__ */ jsx42("div", { className: "p-2 bg-green-100 rounded-lg", children: /* @__PURE__ */ jsx42(Truck2, { className: "w-5 h-5 text-green-600" }) }),
|
|
12278
|
+
/* @__PURE__ */ jsxs37("div", { children: [
|
|
12279
|
+
/* @__PURE__ */ jsx42("p", { className: "text-2xl font-bold text-[var(--color-text-primary)]", children: "24" }),
|
|
12280
|
+
/* @__PURE__ */ jsx42("p", { className: "text-xs text-[var(--color-text-secondary)]", children: "V\xE9hicules" })
|
|
12281
|
+
] })
|
|
12282
|
+
] }) }),
|
|
12283
|
+
/* @__PURE__ */ jsx42("div", { className: "bg-[var(--color-surface)] rounded-xl p-4 border border-[var(--color-border-light)]", children: /* @__PURE__ */ jsxs37("div", { className: "flex items-center gap-3", children: [
|
|
12284
|
+
/* @__PURE__ */ jsx42("div", { className: "p-2 bg-purple-100 rounded-lg", children: /* @__PURE__ */ jsx42(Package2, { className: "w-5 h-5 text-purple-600" }) }),
|
|
12285
|
+
/* @__PURE__ */ jsxs37("div", { children: [
|
|
12286
|
+
/* @__PURE__ */ jsx42("p", { className: "text-2xl font-bold text-[var(--color-text-primary)]", children: "89" }),
|
|
12287
|
+
/* @__PURE__ */ jsx42("p", { className: "text-xs text-[var(--color-text-secondary)]", children: "Mobilier" })
|
|
12288
|
+
] })
|
|
12289
|
+
] }) }),
|
|
12290
|
+
/* @__PURE__ */ jsx42("div", { className: "bg-[var(--color-surface)] rounded-xl p-4 border border-[var(--color-border-light)]", children: /* @__PURE__ */ jsxs37("div", { className: "flex items-center gap-3", children: [
|
|
12291
|
+
/* @__PURE__ */ jsx42("div", { className: "p-2 bg-orange-100 rounded-lg", children: /* @__PURE__ */ jsx42(Wrench2, { className: "w-5 h-5 text-orange-600" }) }),
|
|
12292
|
+
/* @__PURE__ */ jsxs37("div", { children: [
|
|
12293
|
+
/* @__PURE__ */ jsx42("p", { className: "text-2xl font-bold text-[var(--color-text-primary)]", children: "12" }),
|
|
12294
|
+
/* @__PURE__ */ jsx42("p", { className: "text-xs text-[var(--color-text-secondary)]", children: "En maintenance" })
|
|
12295
|
+
] })
|
|
12296
|
+
] }) })
|
|
12297
|
+
] }),
|
|
12298
|
+
/* @__PURE__ */ jsx42("div", { className: "bg-[var(--color-surface)] rounded-xl border border-[var(--color-border-light)] overflow-hidden", children: /* @__PURE__ */ jsx42("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxs37("table", { className: "w-full", children: [
|
|
12299
|
+
/* @__PURE__ */ jsx42("thead", { className: "bg-[var(--color-background)]", children: /* @__PURE__ */ jsxs37("tr", { children: [
|
|
12300
|
+
/* @__PURE__ */ jsx42("th", { className: "px-6 py-3 text-left text-xs font-semibold text-[var(--color-text-secondary)] uppercase", children: "Code" }),
|
|
12301
|
+
/* @__PURE__ */ jsx42("th", { className: "px-6 py-3 text-left text-xs font-semibold text-[var(--color-text-secondary)] uppercase", children: "D\xE9signation" }),
|
|
12302
|
+
/* @__PURE__ */ jsx42("th", { className: "px-6 py-3 text-left text-xs font-semibold text-[var(--color-text-secondary)] uppercase", children: "Cat\xE9gorie" }),
|
|
12303
|
+
/* @__PURE__ */ jsx42("th", { className: "px-6 py-3 text-left text-xs font-semibold text-[var(--color-text-secondary)] uppercase", children: "Localisation" }),
|
|
12304
|
+
/* @__PURE__ */ jsx42("th", { className: "px-6 py-3 text-left text-xs font-semibold text-[var(--color-text-secondary)] uppercase", children: "\xC9tat" }),
|
|
12305
|
+
/* @__PURE__ */ jsx42("th", { className: "px-6 py-3 text-left text-xs font-semibold text-[var(--color-text-secondary)] uppercase", children: "Valeur" })
|
|
12306
|
+
] }) }),
|
|
12307
|
+
/* @__PURE__ */ jsxs37("tbody", { className: "divide-y divide-[var(--color-border-light)]", children: [
|
|
12308
|
+
/* @__PURE__ */ jsxs37("tr", { className: "hover:bg-[var(--color-surface-hover)]", children: [
|
|
12309
|
+
/* @__PURE__ */ jsx42("td", { className: "px-6 py-4 text-sm font-medium text-[var(--color-primary)]", children: "ACT-001" }),
|
|
12310
|
+
/* @__PURE__ */ jsx42("td", { className: "px-6 py-4 text-sm text-[var(--color-text-primary)]", children: 'MacBook Pro 16"' }),
|
|
12311
|
+
/* @__PURE__ */ jsx42("td", { className: "px-6 py-4", children: /* @__PURE__ */ jsxs37("span", { className: "inline-flex items-center gap-1 px-2 py-1 text-xs bg-blue-100 text-blue-700 rounded", children: [
|
|
12312
|
+
/* @__PURE__ */ jsx42(Laptop, { className: "w-3 h-3" }),
|
|
12313
|
+
"IT"
|
|
12314
|
+
] }) }),
|
|
12315
|
+
/* @__PURE__ */ jsx42("td", { className: "px-6 py-4 text-sm text-[var(--color-text-secondary)]", children: /* @__PURE__ */ jsxs37("span", { className: "flex items-center gap-1", children: [
|
|
12316
|
+
/* @__PURE__ */ jsx42(MapPin5, { className: "w-3 h-3" }),
|
|
12317
|
+
"Bureau A-201"
|
|
12318
|
+
] }) }),
|
|
12319
|
+
/* @__PURE__ */ jsx42("td", { className: "px-6 py-4", children: /* @__PURE__ */ jsx42("span", { className: "px-2 py-1 text-xs bg-green-100 text-green-700 rounded", children: "Actif" }) }),
|
|
12320
|
+
/* @__PURE__ */ jsx42("td", { className: "px-6 py-4 text-sm text-[var(--color-text-primary)]", children: "2,499 \u20AC" })
|
|
12321
|
+
] }),
|
|
12322
|
+
/* @__PURE__ */ jsxs37("tr", { className: "hover:bg-[var(--color-surface-hover)]", children: [
|
|
12323
|
+
/* @__PURE__ */ jsx42("td", { className: "px-6 py-4 text-sm font-medium text-[var(--color-primary)]", children: "ACT-002" }),
|
|
12324
|
+
/* @__PURE__ */ jsx42("td", { className: "px-6 py-4 text-sm text-[var(--color-text-primary)]", children: "Bureau ergonomique" }),
|
|
12325
|
+
/* @__PURE__ */ jsx42("td", { className: "px-6 py-4", children: /* @__PURE__ */ jsxs37("span", { className: "inline-flex items-center gap-1 px-2 py-1 text-xs bg-purple-100 text-purple-700 rounded", children: [
|
|
12326
|
+
/* @__PURE__ */ jsx42(Package2, { className: "w-3 h-3" }),
|
|
12327
|
+
"Mobilier"
|
|
12328
|
+
] }) }),
|
|
12329
|
+
/* @__PURE__ */ jsx42("td", { className: "px-6 py-4 text-sm text-[var(--color-text-secondary)]", children: /* @__PURE__ */ jsxs37("span", { className: "flex items-center gap-1", children: [
|
|
12330
|
+
/* @__PURE__ */ jsx42(MapPin5, { className: "w-3 h-3" }),
|
|
12331
|
+
"Bureau A-201"
|
|
12332
|
+
] }) }),
|
|
12333
|
+
/* @__PURE__ */ jsx42("td", { className: "px-6 py-4", children: /* @__PURE__ */ jsx42("span", { className: "px-2 py-1 text-xs bg-green-100 text-green-700 rounded", children: "Actif" }) }),
|
|
12334
|
+
/* @__PURE__ */ jsx42("td", { className: "px-6 py-4 text-sm text-[var(--color-text-primary)]", children: "890 \u20AC" })
|
|
12335
|
+
] }),
|
|
12336
|
+
/* @__PURE__ */ jsxs37("tr", { className: "hover:bg-[var(--color-surface-hover)]", children: [
|
|
12337
|
+
/* @__PURE__ */ jsx42("td", { className: "px-6 py-4 text-sm font-medium text-[var(--color-primary)]", children: "ACT-003" }),
|
|
12338
|
+
/* @__PURE__ */ jsx42("td", { className: "px-6 py-4 text-sm text-[var(--color-text-primary)]", children: "Renault Kangoo" }),
|
|
12339
|
+
/* @__PURE__ */ jsx42("td", { className: "px-6 py-4", children: /* @__PURE__ */ jsxs37("span", { className: "inline-flex items-center gap-1 px-2 py-1 text-xs bg-green-100 text-green-700 rounded", children: [
|
|
12340
|
+
/* @__PURE__ */ jsx42(Truck2, { className: "w-3 h-3" }),
|
|
12341
|
+
"V\xE9hicule"
|
|
12342
|
+
] }) }),
|
|
12343
|
+
/* @__PURE__ */ jsx42("td", { className: "px-6 py-4 text-sm text-[var(--color-text-secondary)]", children: /* @__PURE__ */ jsxs37("span", { className: "flex items-center gap-1", children: [
|
|
12344
|
+
/* @__PURE__ */ jsx42(MapPin5, { className: "w-3 h-3" }),
|
|
12345
|
+
"Parking B"
|
|
12346
|
+
] }) }),
|
|
12347
|
+
/* @__PURE__ */ jsx42("td", { className: "px-6 py-4", children: /* @__PURE__ */ jsx42("span", { className: "px-2 py-1 text-xs bg-orange-100 text-orange-700 rounded", children: "Maintenance" }) }),
|
|
12348
|
+
/* @__PURE__ */ jsx42("td", { className: "px-6 py-4 text-sm text-[var(--color-text-primary)]", children: "18,500 \u20AC" })
|
|
12349
|
+
] })
|
|
12350
|
+
] })
|
|
12351
|
+
] }) }) })
|
|
12352
|
+
] })
|
|
12353
|
+
] });
|
|
12354
|
+
};
|
|
12355
|
+
var ActifsPage_default = ActifsPage;
|
|
12356
|
+
|
|
12357
|
+
// src/pages/workspaces/PlanningPage.tsx
|
|
12358
|
+
import { useState as useState27 } from "react";
|
|
12359
|
+
import { CalendarClock, ChevronLeft as ChevronLeft4, ChevronRight as ChevronRight4, Plus as Plus8, Users as Users9, Clock as Clock7 } from "lucide-react";
|
|
12360
|
+
import { Fragment as Fragment10, jsx as jsx43, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
12361
|
+
var DAYS = ["Lun", "Mar", "Mer", "Jeu", "Ven", "Sam", "Dim"];
|
|
12362
|
+
var MONTHS = ["Janvier", "F\xE9vrier", "Mars", "Avril", "Mai", "Juin", "Juillet", "Ao\xFBt", "Septembre", "Octobre", "Novembre", "D\xE9cembre"];
|
|
12363
|
+
var PlanningPage = () => {
|
|
12364
|
+
const [currentDate] = useState27(/* @__PURE__ */ new Date());
|
|
12365
|
+
const currentMonth = MONTHS[currentDate.getMonth()];
|
|
12366
|
+
const currentYear = currentDate.getFullYear();
|
|
12367
|
+
return /* @__PURE__ */ jsxs38("div", { className: "h-full flex flex-col", children: [
|
|
12368
|
+
/* @__PURE__ */ jsx43("div", { className: "bg-[var(--color-surface)] border-b border-[var(--color-border)] px-6 py-4", children: /* @__PURE__ */ jsxs38("div", { className: "flex items-center justify-between", children: [
|
|
12369
|
+
/* @__PURE__ */ jsxs38("div", { className: "flex items-center gap-3", children: [
|
|
12370
|
+
/* @__PURE__ */ jsx43("div", { className: "p-2 bg-teal-100 rounded-lg", children: /* @__PURE__ */ jsx43(CalendarClock, { className: "w-6 h-6 text-teal-600" }) }),
|
|
12371
|
+
/* @__PURE__ */ jsxs38("div", { children: [
|
|
12372
|
+
/* @__PURE__ */ jsx43("h1", { className: "text-xl font-semibold text-[var(--color-text-primary)]", children: "Planning" }),
|
|
12373
|
+
/* @__PURE__ */ jsx43("p", { className: "text-sm text-[var(--color-text-secondary)]", children: "Planification des ressources et emploi du temps" })
|
|
12374
|
+
] })
|
|
12375
|
+
] }),
|
|
12376
|
+
/* @__PURE__ */ jsxs38(Buttons_default, { children: [
|
|
12377
|
+
/* @__PURE__ */ jsx43(Plus8, { className: "w-4 h-4 mr-2" }),
|
|
12378
|
+
"Nouveau planning"
|
|
12379
|
+
] })
|
|
12380
|
+
] }) }),
|
|
12381
|
+
/* @__PURE__ */ jsx43("div", { className: "flex-1 p-6 bg-[var(--color-background)]", children: /* @__PURE__ */ jsxs38("div", { className: "grid grid-cols-1 lg:grid-cols-4 gap-6", children: [
|
|
12382
|
+
/* @__PURE__ */ jsxs38("div", { className: "lg:col-span-3 bg-[var(--color-surface)] rounded-xl border border-[var(--color-border-light)]", children: [
|
|
12383
|
+
/* @__PURE__ */ jsxs38("div", { className: "flex items-center justify-between p-4 border-b border-[var(--color-border-light)]", children: [
|
|
12384
|
+
/* @__PURE__ */ jsxs38("div", { className: "flex items-center gap-4", children: [
|
|
12385
|
+
/* @__PURE__ */ jsx43("button", { className: "p-2 hover:bg-[var(--color-surface-hover)] rounded-lg", children: /* @__PURE__ */ jsx43(ChevronLeft4, { className: "w-5 h-5 text-[var(--color-text-secondary)]" }) }),
|
|
12386
|
+
/* @__PURE__ */ jsxs38("h2", { className: "text-lg font-semibold text-[var(--color-text-primary)]", children: [
|
|
12387
|
+
currentMonth,
|
|
12388
|
+
" ",
|
|
12389
|
+
currentYear
|
|
12390
|
+
] }),
|
|
12391
|
+
/* @__PURE__ */ jsx43("button", { className: "p-2 hover:bg-[var(--color-surface-hover)] rounded-lg", children: /* @__PURE__ */ jsx43(ChevronRight4, { className: "w-5 h-5 text-[var(--color-text-secondary)]" }) })
|
|
12392
|
+
] }),
|
|
12393
|
+
/* @__PURE__ */ jsxs38("div", { className: "flex items-center gap-2", children: [
|
|
12394
|
+
/* @__PURE__ */ jsx43("button", { className: "px-3 py-1.5 text-sm bg-[var(--color-primary)] text-white rounded-lg", children: "Aujourd'hui" }),
|
|
12395
|
+
/* @__PURE__ */ jsx43("button", { className: "px-3 py-1.5 text-sm border border-[var(--color-border)] rounded-lg hover:bg-[var(--color-surface-hover)]", children: "Semaine" }),
|
|
12396
|
+
/* @__PURE__ */ jsx43("button", { className: "px-3 py-1.5 text-sm border border-[var(--color-border)] rounded-lg hover:bg-[var(--color-surface-hover)]", children: "Mois" })
|
|
12397
|
+
] })
|
|
12398
|
+
] }),
|
|
12399
|
+
/* @__PURE__ */ jsxs38("div", { className: "p-4", children: [
|
|
12400
|
+
/* @__PURE__ */ jsx43("div", { className: "grid grid-cols-7 gap-2 mb-2", children: DAYS.map((day) => /* @__PURE__ */ jsx43("div", { className: "text-center text-xs font-semibold text-[var(--color-text-tertiary)] py-2", children: day }, day)) }),
|
|
12401
|
+
/* @__PURE__ */ jsx43("div", { className: "grid grid-cols-7 gap-2", children: Array.from({ length: 35 }, (_, i) => {
|
|
12402
|
+
const dayNum = i - 3;
|
|
12403
|
+
const isCurrentMonth = dayNum >= 0 && dayNum < 31;
|
|
12404
|
+
const isToday = dayNum + 1 === currentDate.getDate();
|
|
12405
|
+
return /* @__PURE__ */ jsx43(
|
|
12406
|
+
"div",
|
|
12407
|
+
{
|
|
12408
|
+
className: `
|
|
12409
|
+
min-h-[80px] p-2 rounded-lg border transition-colors cursor-pointer
|
|
12410
|
+
${isCurrentMonth ? "border-[var(--color-border-light)] hover:border-[var(--color-primary)]" : "border-transparent"}
|
|
12411
|
+
${isToday ? "bg-[var(--color-primary-light)] border-[var(--color-primary)]" : ""}
|
|
12412
|
+
`,
|
|
12413
|
+
children: isCurrentMonth && /* @__PURE__ */ jsxs38(Fragment10, { children: [
|
|
12414
|
+
/* @__PURE__ */ jsx43("span", { className: `text-sm ${isToday ? "font-bold text-[var(--color-primary)]" : "text-[var(--color-text-primary)]"}`, children: dayNum + 1 }),
|
|
12415
|
+
dayNum === 4 && /* @__PURE__ */ jsx43("div", { className: "mt-1 px-1.5 py-0.5 bg-blue-100 text-blue-700 text-xs rounded truncate", children: "R\xE9union \xE9quipe" }),
|
|
12416
|
+
dayNum === 10 && /* @__PURE__ */ jsx43("div", { className: "mt-1 px-1.5 py-0.5 bg-green-100 text-green-700 text-xs rounded truncate", children: "Formation" }),
|
|
12417
|
+
dayNum === 15 && /* @__PURE__ */ jsx43("div", { className: "mt-1 px-1.5 py-0.5 bg-purple-100 text-purple-700 text-xs rounded truncate", children: "Deadline projet" })
|
|
12418
|
+
] })
|
|
12419
|
+
},
|
|
12420
|
+
i
|
|
12421
|
+
);
|
|
12422
|
+
}) })
|
|
12423
|
+
] })
|
|
12424
|
+
] }),
|
|
12425
|
+
/* @__PURE__ */ jsxs38("div", { className: "space-y-6", children: [
|
|
12426
|
+
/* @__PURE__ */ jsxs38("div", { className: "bg-[var(--color-surface)] rounded-xl border border-[var(--color-border-light)]", children: [
|
|
12427
|
+
/* @__PURE__ */ jsx43("div", { className: "p-4 border-b border-[var(--color-border-light)]", children: /* @__PURE__ */ jsx43("h3", { className: "font-semibold text-[var(--color-text-primary)]", children: "\xC9v\xE9nements \xE0 venir" }) }),
|
|
12428
|
+
/* @__PURE__ */ jsxs38("div", { className: "p-4 space-y-3", children: [
|
|
12429
|
+
/* @__PURE__ */ jsxs38("div", { className: "flex items-start gap-3 p-3 bg-blue-50 rounded-lg", children: [
|
|
12430
|
+
/* @__PURE__ */ jsx43("div", { className: "p-1.5 bg-blue-100 rounded", children: /* @__PURE__ */ jsx43(Clock7, { className: "w-4 h-4 text-blue-600" }) }),
|
|
12431
|
+
/* @__PURE__ */ jsxs38("div", { children: [
|
|
12432
|
+
/* @__PURE__ */ jsx43("p", { className: "text-sm font-medium text-[var(--color-text-primary)]", children: "R\xE9union \xE9quipe" }),
|
|
12433
|
+
/* @__PURE__ */ jsx43("p", { className: "text-xs text-[var(--color-text-secondary)]", children: "Demain, 09:00" })
|
|
12434
|
+
] })
|
|
12435
|
+
] }),
|
|
12436
|
+
/* @__PURE__ */ jsxs38("div", { className: "flex items-start gap-3 p-3 bg-green-50 rounded-lg", children: [
|
|
12437
|
+
/* @__PURE__ */ jsx43("div", { className: "p-1.5 bg-green-100 rounded", children: /* @__PURE__ */ jsx43(Users9, { className: "w-4 h-4 text-green-600" }) }),
|
|
12438
|
+
/* @__PURE__ */ jsxs38("div", { children: [
|
|
12439
|
+
/* @__PURE__ */ jsx43("p", { className: "text-sm font-medium text-[var(--color-text-primary)]", children: "Formation" }),
|
|
12440
|
+
/* @__PURE__ */ jsx43("p", { className: "text-xs text-[var(--color-text-secondary)]", children: "15 D\xE9c, 14:00" })
|
|
12441
|
+
] })
|
|
12442
|
+
] }),
|
|
12443
|
+
/* @__PURE__ */ jsxs38("div", { className: "flex items-start gap-3 p-3 bg-purple-50 rounded-lg", children: [
|
|
12444
|
+
/* @__PURE__ */ jsx43("div", { className: "p-1.5 bg-purple-100 rounded", children: /* @__PURE__ */ jsx43(CalendarClock, { className: "w-4 h-4 text-purple-600" }) }),
|
|
12445
|
+
/* @__PURE__ */ jsxs38("div", { children: [
|
|
12446
|
+
/* @__PURE__ */ jsx43("p", { className: "text-sm font-medium text-[var(--color-text-primary)]", children: "Deadline projet" }),
|
|
12447
|
+
/* @__PURE__ */ jsx43("p", { className: "text-xs text-[var(--color-text-secondary)]", children: "20 D\xE9c, 18:00" })
|
|
12448
|
+
] })
|
|
12449
|
+
] })
|
|
12450
|
+
] })
|
|
12451
|
+
] }),
|
|
12452
|
+
/* @__PURE__ */ jsxs38("div", { className: "bg-[var(--color-surface)] rounded-xl p-4 border border-[var(--color-border-light)]", children: [
|
|
12453
|
+
/* @__PURE__ */ jsx43("h3", { className: "font-semibold text-[var(--color-text-primary)] mb-4", children: "Cette semaine" }),
|
|
12454
|
+
/* @__PURE__ */ jsxs38("div", { className: "space-y-3", children: [
|
|
12455
|
+
/* @__PURE__ */ jsxs38("div", { className: "flex justify-between items-center", children: [
|
|
12456
|
+
/* @__PURE__ */ jsx43("span", { className: "text-sm text-[var(--color-text-secondary)]", children: "R\xE9unions" }),
|
|
12457
|
+
/* @__PURE__ */ jsx43("span", { className: "font-semibold text-[var(--color-text-primary)]", children: "8" })
|
|
12458
|
+
] }),
|
|
12459
|
+
/* @__PURE__ */ jsxs38("div", { className: "flex justify-between items-center", children: [
|
|
12460
|
+
/* @__PURE__ */ jsx43("span", { className: "text-sm text-[var(--color-text-secondary)]", children: "T\xE2ches planifi\xE9es" }),
|
|
12461
|
+
/* @__PURE__ */ jsx43("span", { className: "font-semibold text-[var(--color-text-primary)]", children: "15" })
|
|
12462
|
+
] }),
|
|
12463
|
+
/* @__PURE__ */ jsxs38("div", { className: "flex justify-between items-center", children: [
|
|
12464
|
+
/* @__PURE__ */ jsx43("span", { className: "text-sm text-[var(--color-text-secondary)]", children: "Heures occup\xE9es" }),
|
|
12465
|
+
/* @__PURE__ */ jsx43("span", { className: "font-semibold text-[var(--color-text-primary)]", children: "32h" })
|
|
12466
|
+
] })
|
|
12467
|
+
] })
|
|
12468
|
+
] })
|
|
12469
|
+
] })
|
|
12470
|
+
] }) })
|
|
12471
|
+
] });
|
|
12472
|
+
};
|
|
12473
|
+
var PlanningPage_default = PlanningPage;
|
|
12474
|
+
|
|
12475
|
+
// src/pages/workspaces/TaskPilot.tsx
|
|
12476
|
+
import { useState as useState29, useEffect as useEffect19, useCallback as useCallback5 } from "react";
|
|
12477
|
+
import {
|
|
12478
|
+
Plus as Plus9,
|
|
12479
|
+
MoreVertical as MoreVertical3,
|
|
12480
|
+
MessageSquare,
|
|
12481
|
+
Paperclip,
|
|
12482
|
+
Search as Search6,
|
|
12483
|
+
Filter as Filter3,
|
|
12484
|
+
Calendar as Calendar6,
|
|
12485
|
+
GripVertical,
|
|
12486
|
+
Loader2 as Loader24,
|
|
12487
|
+
Trash2 as Trash25,
|
|
12488
|
+
Edit3 as Edit33
|
|
12489
|
+
} from "lucide-react";
|
|
12490
|
+
|
|
12491
|
+
// src/models/Task.ts
|
|
12492
|
+
var TASK_STATUS_OPTIONS = [
|
|
12493
|
+
{ value: "new", label: "\xC0 faire" },
|
|
12494
|
+
{ value: "in_progress", label: "En cours" },
|
|
12495
|
+
{ value: "in_review", label: "En r\xE9vision" },
|
|
12496
|
+
{ value: "done", label: "Termin\xE9" }
|
|
12497
|
+
];
|
|
12498
|
+
var TASK_PRIORITY_OPTIONS = [
|
|
12499
|
+
{ value: "high", label: "Haute", color: "bg-red-100 text-red-700" },
|
|
12500
|
+
{ value: "medium", label: "Moyenne", color: "bg-yellow-100 text-yellow-700" },
|
|
12501
|
+
{ value: "minimum", label: "Basse", color: "bg-green-100 text-green-700" }
|
|
12502
|
+
];
|
|
12503
|
+
|
|
12504
|
+
// src/services/TaskServices.ts
|
|
12505
|
+
var URI5 = `${API_URL}/workspace/tasks/`;
|
|
12506
|
+
var TaskServices = {
|
|
12507
|
+
create: (data) => FetchApi.post(`${URI5}`, data),
|
|
12508
|
+
get: (id) => FetchApi.get(`${URI5}${id}/`),
|
|
12509
|
+
list: (params) => FetchApi.get(`${URI5}?${new URLSearchParams(params).toString()}`),
|
|
12510
|
+
update: (id, data) => FetchApi.put(`${URI5}${id}/`, data),
|
|
12511
|
+
patch: (id, data) => FetchApi.patch(`${URI5}${id}/`, data),
|
|
12512
|
+
delete: (id) => FetchApi.delete(`${URI5}${id}/`),
|
|
12513
|
+
updateStatus: (id, status) => FetchApi.patch(`${URI5}${id}/`, { status })
|
|
12514
|
+
};
|
|
12515
|
+
|
|
12516
|
+
// src/pages/workspaces/FormTask.tsx
|
|
12517
|
+
import { useState as useState28, useEffect as useEffect18 } from "react";
|
|
12518
|
+
import { Loader2 as Loader23 } from "lucide-react";
|
|
12519
|
+
import { jsx as jsx44, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
12520
|
+
var FormTask = ({ open, onClose, task, defaultStatus = "new", onSuccess }) => {
|
|
12521
|
+
const { addToast } = useToast();
|
|
12522
|
+
const [loading, setLoading] = useState28(false);
|
|
12523
|
+
const [formData, setFormData] = useState28({
|
|
12524
|
+
title: "",
|
|
12525
|
+
description: "",
|
|
12526
|
+
status: defaultStatus,
|
|
12527
|
+
priority: "medium",
|
|
12528
|
+
start_date: "",
|
|
12529
|
+
end_date: ""
|
|
12530
|
+
});
|
|
12531
|
+
useEffect18(() => {
|
|
12532
|
+
if (task) {
|
|
12533
|
+
setFormData({
|
|
12534
|
+
title: task.title || "",
|
|
12535
|
+
description: task.description || "",
|
|
12536
|
+
status: task.status || defaultStatus,
|
|
12537
|
+
priority: task.priority || "medium",
|
|
12538
|
+
start_date: task.start_date ? task.start_date.split("T")[0] : "",
|
|
12539
|
+
end_date: task.end_date ? task.end_date.split("T")[0] : ""
|
|
12540
|
+
});
|
|
12541
|
+
} else {
|
|
12542
|
+
setFormData({
|
|
12543
|
+
title: "",
|
|
12544
|
+
description: "",
|
|
12545
|
+
status: defaultStatus,
|
|
12546
|
+
priority: "medium",
|
|
12547
|
+
start_date: "",
|
|
12548
|
+
end_date: ""
|
|
12549
|
+
});
|
|
12550
|
+
}
|
|
12551
|
+
}, [task, defaultStatus, open]);
|
|
12552
|
+
const handleInputChange = (e) => {
|
|
12553
|
+
const { name, value } = e.target;
|
|
12554
|
+
setFormData((prev) => ({ ...prev, [name]: value }));
|
|
12555
|
+
};
|
|
12556
|
+
const handleSelectChange = (e) => {
|
|
12557
|
+
const { name, value } = e.target;
|
|
12558
|
+
setFormData((prev) => ({ ...prev, [name]: value }));
|
|
12559
|
+
};
|
|
12560
|
+
const handleTextAreaChange = (e) => {
|
|
12561
|
+
const { name, value } = e.target;
|
|
12562
|
+
setFormData((prev) => ({ ...prev, [name]: value }));
|
|
12563
|
+
};
|
|
12564
|
+
const handleSubmit = async (e) => {
|
|
12565
|
+
e.preventDefault();
|
|
12566
|
+
if (!formData.title.trim()) {
|
|
12567
|
+
addToast({ type: "error", message: "Le titre est obligatoire" });
|
|
12568
|
+
return;
|
|
12569
|
+
}
|
|
12570
|
+
setLoading(true);
|
|
12571
|
+
try {
|
|
12572
|
+
const payload = {
|
|
12573
|
+
...formData,
|
|
12574
|
+
start_date: formData.start_date || null,
|
|
12575
|
+
end_date: formData.end_date || null
|
|
12576
|
+
};
|
|
12577
|
+
if (task?.id) {
|
|
12578
|
+
await TaskServices.update(task.id, payload);
|
|
12579
|
+
addToast({ type: "success", message: "T\xE2che mise \xE0 jour avec succ\xE8s" });
|
|
12580
|
+
} else {
|
|
12581
|
+
await TaskServices.create(payload);
|
|
12582
|
+
addToast({ type: "success", message: "T\xE2che cr\xE9\xE9e avec succ\xE8s" });
|
|
12583
|
+
}
|
|
12584
|
+
onSuccess?.();
|
|
12585
|
+
onClose();
|
|
12586
|
+
} catch (error) {
|
|
12587
|
+
console.error("Error saving task:", error);
|
|
12588
|
+
addToast({ type: "error", message: "Erreur lors de la sauvegarde" });
|
|
12589
|
+
} finally {
|
|
12590
|
+
setLoading(false);
|
|
12591
|
+
}
|
|
12592
|
+
};
|
|
12593
|
+
return /* @__PURE__ */ jsx44(
|
|
12594
|
+
Modals_default,
|
|
12595
|
+
{
|
|
12596
|
+
open,
|
|
12597
|
+
onClose,
|
|
12598
|
+
title: task ? "Modifier la t\xE2che" : "Nouvelle t\xE2che",
|
|
12599
|
+
description: task ? "Modifiez les d\xE9tails de la t\xE2che" : "Cr\xE9ez une nouvelle t\xE2che",
|
|
12600
|
+
width: "max-w-lg",
|
|
12601
|
+
children: /* @__PURE__ */ jsxs39("form", { onSubmit: handleSubmit, className: "space-y-5", children: [
|
|
12602
|
+
/* @__PURE__ */ jsx44(
|
|
12603
|
+
TextInput,
|
|
12604
|
+
{
|
|
12605
|
+
label: "Titre",
|
|
12606
|
+
name: "title",
|
|
12607
|
+
value: formData.title,
|
|
12608
|
+
onChange: handleInputChange,
|
|
12609
|
+
placeholder: "Entrez le titre de la t\xE2che",
|
|
12610
|
+
required: true
|
|
12611
|
+
}
|
|
12612
|
+
),
|
|
12613
|
+
/* @__PURE__ */ jsxs39("div", { className: "flex flex-col gap-1 w-full", children: [
|
|
12614
|
+
/* @__PURE__ */ jsx44("label", { className: "block text-[var(--color-text-secondary)] text-sm font-medium mb-2", children: "Description" }),
|
|
12615
|
+
/* @__PURE__ */ jsx44(
|
|
12616
|
+
"textarea",
|
|
12617
|
+
{
|
|
12618
|
+
name: "description",
|
|
12619
|
+
value: formData.description,
|
|
12620
|
+
onChange: handleTextAreaChange,
|
|
12621
|
+
placeholder: "D\xE9crivez la t\xE2che...",
|
|
12622
|
+
rows: 3,
|
|
12623
|
+
className: "w-full px-3 py-2 border border-[var(--color-border)] rounded-lg\r\n focus:ring-2 focus:ring-[var(--color-primary)]/20 focus:border-[var(--color-primary)]\r\n text-sm resize-none bg-[var(--color-surface)] text-[var(--color-text-primary)]"
|
|
12624
|
+
}
|
|
12625
|
+
)
|
|
12626
|
+
] }),
|
|
12627
|
+
/* @__PURE__ */ jsxs39("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
12628
|
+
/* @__PURE__ */ jsx44(
|
|
12629
|
+
SelectInput,
|
|
12630
|
+
{
|
|
12631
|
+
label: "Statut",
|
|
12632
|
+
name: "status",
|
|
12633
|
+
value: formData.status,
|
|
12634
|
+
onChange: handleSelectChange,
|
|
12635
|
+
options: TASK_STATUS_OPTIONS.map((opt) => ({ label: opt.label, value: opt.value }))
|
|
12636
|
+
}
|
|
12637
|
+
),
|
|
12638
|
+
/* @__PURE__ */ jsx44(
|
|
12639
|
+
SelectInput,
|
|
12640
|
+
{
|
|
12641
|
+
label: "Priorit\xE9",
|
|
12642
|
+
name: "priority",
|
|
12643
|
+
value: formData.priority,
|
|
12644
|
+
onChange: handleSelectChange,
|
|
12645
|
+
options: TASK_PRIORITY_OPTIONS.map((opt) => ({ label: opt.label, value: opt.value }))
|
|
12646
|
+
}
|
|
12647
|
+
)
|
|
12648
|
+
] }),
|
|
12649
|
+
/* @__PURE__ */ jsxs39("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
12650
|
+
/* @__PURE__ */ jsx44(
|
|
12651
|
+
DateInput,
|
|
12652
|
+
{
|
|
12653
|
+
label: "Date de d\xE9but",
|
|
12654
|
+
name: "start_date",
|
|
12655
|
+
value: formData.start_date,
|
|
12656
|
+
onChange: handleInputChange
|
|
12657
|
+
}
|
|
12658
|
+
),
|
|
12659
|
+
/* @__PURE__ */ jsx44(
|
|
12660
|
+
DateInput,
|
|
12661
|
+
{
|
|
12662
|
+
label: "Date de fin",
|
|
12663
|
+
name: "end_date",
|
|
12664
|
+
value: formData.end_date,
|
|
12665
|
+
onChange: handleInputChange
|
|
12666
|
+
}
|
|
12667
|
+
)
|
|
12668
|
+
] }),
|
|
12669
|
+
/* @__PURE__ */ jsxs39("div", { className: "flex justify-end gap-3 pt-4 border-t border-[var(--color-border)]", children: [
|
|
12670
|
+
/* @__PURE__ */ jsx44(
|
|
12671
|
+
SecondaryButton,
|
|
12672
|
+
{
|
|
12673
|
+
type: "button",
|
|
12674
|
+
onClick: onClose,
|
|
12675
|
+
disabled: loading,
|
|
12676
|
+
variant: "outline",
|
|
12677
|
+
children: "Annuler"
|
|
12678
|
+
}
|
|
12679
|
+
),
|
|
12680
|
+
/* @__PURE__ */ jsxs39(
|
|
12681
|
+
Buttons_default,
|
|
12682
|
+
{
|
|
12683
|
+
type: "submit",
|
|
12684
|
+
disabled: loading,
|
|
12685
|
+
children: [
|
|
12686
|
+
loading && /* @__PURE__ */ jsx44(Loader23, { className: "w-4 h-4 animate-spin mr-2" }),
|
|
12687
|
+
task ? "Mettre \xE0 jour" : "Cr\xE9er"
|
|
12688
|
+
]
|
|
12689
|
+
}
|
|
12690
|
+
)
|
|
12691
|
+
] })
|
|
12692
|
+
] })
|
|
12693
|
+
}
|
|
12694
|
+
);
|
|
12695
|
+
};
|
|
12696
|
+
var FormTask_default = FormTask;
|
|
12697
|
+
|
|
12698
|
+
// src/pages/workspaces/TaskPilot.tsx
|
|
12699
|
+
import { jsx as jsx45, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
12700
|
+
var COLUMNS = [
|
|
12701
|
+
{ id: "new", title: "\xC0 faire", color: "bg-[var(--color-surface)]" },
|
|
12702
|
+
{ id: "in_progress", title: "En cours", color: "bg-[var(--color-info-light)]" },
|
|
12703
|
+
{ id: "in_review", title: "En r\xE9vision", color: "bg-[var(--color-warning-light)]" },
|
|
12704
|
+
{ id: "done", title: "Termin\xE9", color: "bg-[var(--color-success-light)]" }
|
|
12705
|
+
];
|
|
12706
|
+
var PriorityBadge = ({ priority }) => {
|
|
12707
|
+
const option = TASK_PRIORITY_OPTIONS.find((p) => p.value === priority);
|
|
12708
|
+
if (!option) return null;
|
|
12709
|
+
return /* @__PURE__ */ jsx45("span", { className: `px-2 py-0.5 text-xs font-medium rounded ${option.color}`, children: option.label });
|
|
12710
|
+
};
|
|
12711
|
+
var TaskCard = ({ task, isDragging, onDragStart, onDragEnd, onEdit, onDelete }) => {
|
|
12712
|
+
const [showMenu, setShowMenu] = useState29(false);
|
|
12713
|
+
return /* @__PURE__ */ jsxs40(
|
|
12714
|
+
"div",
|
|
12715
|
+
{
|
|
12716
|
+
draggable: true,
|
|
12717
|
+
onDragStart: (e) => onDragStart(e, task),
|
|
12718
|
+
onDragEnd,
|
|
12719
|
+
className: `
|
|
12720
|
+
bg-[var(--color-surface)] rounded-lg p-4 shadow-sm border border-[var(--color-border-light)]
|
|
12721
|
+
hover:shadow-md transition-all cursor-grab active:cursor-grabbing
|
|
12722
|
+
${isDragging ? "opacity-50 scale-105 shadow-lg ring-2 ring-[var(--color-primary)]" : ""}
|
|
12723
|
+
`,
|
|
12724
|
+
children: [
|
|
12725
|
+
/* @__PURE__ */ jsxs40("div", { className: "flex items-start justify-between mb-3", children: [
|
|
12726
|
+
/* @__PURE__ */ jsx45("div", { className: "flex flex-wrap gap-1.5", children: /* @__PURE__ */ jsx45(PriorityBadge, { priority: task.priority }) }),
|
|
12727
|
+
/* @__PURE__ */ jsxs40("div", { className: "flex items-center gap-1 relative", children: [
|
|
12728
|
+
/* @__PURE__ */ jsx45(GripVertical, { className: "w-4 h-4 text-[var(--color-text-tertiary)]" }),
|
|
12729
|
+
/* @__PURE__ */ jsx45(
|
|
12730
|
+
"button",
|
|
12731
|
+
{
|
|
12732
|
+
onClick: (e) => {
|
|
12733
|
+
e.stopPropagation();
|
|
12734
|
+
setShowMenu(!showMenu);
|
|
12735
|
+
},
|
|
12736
|
+
className: "p-1 hover:bg-[var(--color-surface-hover)] rounded transition-colors",
|
|
12737
|
+
children: /* @__PURE__ */ jsx45(MoreVertical3, { className: "w-4 h-4 text-[var(--color-text-tertiary)]" })
|
|
12738
|
+
}
|
|
12739
|
+
),
|
|
12740
|
+
showMenu && /* @__PURE__ */ jsxs40("div", { className: "absolute right-0 top-8 bg-[var(--color-surface)] border border-[var(--color-border)] rounded-lg shadow-lg py-1 z-10 min-w-[120px]", children: [
|
|
12741
|
+
/* @__PURE__ */ jsxs40(
|
|
12742
|
+
"button",
|
|
12743
|
+
{
|
|
12744
|
+
onClick: (e) => {
|
|
12745
|
+
e.stopPropagation();
|
|
12746
|
+
onEdit(task);
|
|
12747
|
+
setShowMenu(false);
|
|
12748
|
+
},
|
|
12749
|
+
className: "w-full px-3 py-2 text-left text-sm text-[var(--color-text-primary)] hover:bg-[var(--color-surface-hover)] flex items-center gap-2",
|
|
12750
|
+
children: [
|
|
12751
|
+
/* @__PURE__ */ jsx45(Edit33, { className: "w-4 h-4" }),
|
|
12752
|
+
"Modifier"
|
|
12753
|
+
]
|
|
12754
|
+
}
|
|
12755
|
+
),
|
|
12756
|
+
/* @__PURE__ */ jsxs40(
|
|
12757
|
+
"button",
|
|
12758
|
+
{
|
|
12759
|
+
onClick: (e) => {
|
|
12760
|
+
e.stopPropagation();
|
|
12761
|
+
onDelete(task);
|
|
12762
|
+
setShowMenu(false);
|
|
12763
|
+
},
|
|
12764
|
+
className: "w-full px-3 py-2 text-left text-sm text-[var(--color-error)] hover:bg-[var(--color-error-light)] flex items-center gap-2",
|
|
12765
|
+
children: [
|
|
12766
|
+
/* @__PURE__ */ jsx45(Trash25, { className: "w-4 h-4" }),
|
|
12767
|
+
"Supprimer"
|
|
12768
|
+
]
|
|
12769
|
+
}
|
|
12770
|
+
)
|
|
12771
|
+
] })
|
|
12772
|
+
] })
|
|
12773
|
+
] }),
|
|
12774
|
+
/* @__PURE__ */ jsx45("h3", { className: "font-medium text-[var(--color-text-primary)] text-sm mb-1", children: task.title }),
|
|
12775
|
+
task.description && /* @__PURE__ */ jsx45("p", { className: "text-xs text-[var(--color-text-secondary)] mb-4 line-clamp-2", children: task.description }),
|
|
12776
|
+
/* @__PURE__ */ jsxs40("div", { className: "flex items-center justify-between pt-2 text-xs text-[var(--color-text-tertiary)]", children: [
|
|
12777
|
+
task.end_date && /* @__PURE__ */ jsxs40("div", { className: "flex items-center gap-1", children: [
|
|
12778
|
+
/* @__PURE__ */ jsx45(Calendar6, { className: "w-3.5 h-3.5" }),
|
|
12779
|
+
/* @__PURE__ */ jsx45("span", { children: new Date(task.end_date).toLocaleDateString("fr-FR") })
|
|
12780
|
+
] }),
|
|
12781
|
+
/* @__PURE__ */ jsxs40("div", { className: "flex items-center gap-3", children: [
|
|
12782
|
+
task.comment && /* @__PURE__ */ jsx45("div", { className: "flex items-center gap-1", children: /* @__PURE__ */ jsx45(MessageSquare, { className: "w-3.5 h-3.5" }) }),
|
|
12783
|
+
task.file && /* @__PURE__ */ jsx45("div", { className: "flex items-center gap-1", children: /* @__PURE__ */ jsx45(Paperclip, { className: "w-3.5 h-3.5" }) })
|
|
12784
|
+
] })
|
|
12785
|
+
] })
|
|
12786
|
+
]
|
|
12787
|
+
}
|
|
12788
|
+
);
|
|
12789
|
+
};
|
|
12790
|
+
var KanbanColumn = ({ column, tasks, onAddTask, draggedTask, onDragStart, onDragEnd, onDragOver, onDrop, isDropTarget, onEditTask, onDeleteTask }) => {
|
|
12791
|
+
return /* @__PURE__ */ jsxs40(
|
|
12792
|
+
"div",
|
|
12793
|
+
{
|
|
12794
|
+
onDragOver,
|
|
12795
|
+
onDrop: (e) => onDrop(e, column.id),
|
|
12796
|
+
className: `
|
|
12797
|
+
flex flex-col rounded-xl min-w-[300px] max-w-[300px] transition-all duration-200
|
|
12798
|
+
${column.color}
|
|
12799
|
+
${isDropTarget ? "ring-2 ring-[var(--color-primary)] ring-dashed bg-[var(--color-primary-light)]" : ""}
|
|
12800
|
+
`,
|
|
12801
|
+
children: [
|
|
12802
|
+
/* @__PURE__ */ jsxs40("div", { className: "flex items-center justify-between p-4 pb-3", children: [
|
|
12803
|
+
/* @__PURE__ */ jsxs40("div", { className: "flex items-center gap-2", children: [
|
|
12804
|
+
/* @__PURE__ */ jsx45("h2", { className: "font-semibold text-[var(--color-text-primary)] text-sm", children: column.title }),
|
|
12805
|
+
/* @__PURE__ */ jsx45("span", { className: "px-2 py-0.5 text-xs font-medium bg-[var(--color-border)] text-[var(--color-text-secondary)] rounded-full", children: tasks.length })
|
|
12806
|
+
] }),
|
|
12807
|
+
/* @__PURE__ */ jsx45(
|
|
12808
|
+
"button",
|
|
12809
|
+
{
|
|
12810
|
+
onClick: () => onAddTask(column.id),
|
|
12811
|
+
className: "p-1 hover:bg-[var(--color-surface-hover)] rounded transition-colors",
|
|
12812
|
+
children: /* @__PURE__ */ jsx45(Plus9, { className: "w-4 h-4 text-[var(--color-text-secondary)]" })
|
|
12813
|
+
}
|
|
12814
|
+
)
|
|
12815
|
+
] }),
|
|
12816
|
+
/* @__PURE__ */ jsxs40("div", { className: "flex-1 p-2 pt-0 space-y-3 overflow-y-auto max-h-[calc(100vh-250px)]", children: [
|
|
12817
|
+
tasks.map((task) => /* @__PURE__ */ jsx45(
|
|
12818
|
+
TaskCard,
|
|
12819
|
+
{
|
|
12820
|
+
task,
|
|
12821
|
+
isDragging: draggedTask?.id === task.id,
|
|
12822
|
+
onDragStart,
|
|
12823
|
+
onDragEnd,
|
|
12824
|
+
onEdit: onEditTask,
|
|
12825
|
+
onDelete: onDeleteTask
|
|
12826
|
+
},
|
|
12827
|
+
task.id
|
|
12828
|
+
)),
|
|
12829
|
+
tasks.length === 0 && /* @__PURE__ */ jsx45("div", { className: `
|
|
12830
|
+
border-2 border-dashed rounded-lg p-8 text-center transition-colors
|
|
12831
|
+
${isDropTarget ? "border-[var(--color-primary)] bg-[var(--color-primary-light)]" : "border-[var(--color-border)]"}
|
|
12832
|
+
`, children: /* @__PURE__ */ jsx45("p", { className: "text-sm text-[var(--color-text-tertiary)]", children: "D\xE9posez une t\xE2che ici" }) })
|
|
12833
|
+
] })
|
|
12834
|
+
]
|
|
12835
|
+
}
|
|
12836
|
+
);
|
|
12837
|
+
};
|
|
12838
|
+
var TaskPilot = () => {
|
|
12839
|
+
const { success: showSuccess, error: showError, warning: showWarning, info: showInfo, confirm: confirm2 } = useToast();
|
|
12840
|
+
const [tasks, setTasks] = useState29([]);
|
|
12841
|
+
const [loading, setLoading] = useState29(true);
|
|
12842
|
+
const [searchQuery, setSearchQuery] = useState29("");
|
|
12843
|
+
const [draggedTask, setDraggedTask] = useState29(null);
|
|
12844
|
+
const [dropTargetColumn, setDropTargetColumn] = useState29(null);
|
|
12845
|
+
const [isFormOpen, setIsFormOpen] = useState29(false);
|
|
12846
|
+
const [editingTask, setEditingTask] = useState29(null);
|
|
12847
|
+
const [defaultStatus, setDefaultStatus] = useState29("new");
|
|
12848
|
+
const loadTasks = useCallback5(async () => {
|
|
12849
|
+
try {
|
|
12850
|
+
setLoading(true);
|
|
12851
|
+
const response = await TaskServices.list();
|
|
12852
|
+
const data = response;
|
|
12853
|
+
if (Array.isArray(data)) {
|
|
12854
|
+
setTasks(data);
|
|
12855
|
+
} else if (data.results) {
|
|
12856
|
+
setTasks(data.results);
|
|
12857
|
+
} else if (data.data) {
|
|
12858
|
+
setTasks(data.data);
|
|
12859
|
+
}
|
|
12860
|
+
} catch (error) {
|
|
12861
|
+
console.error("Error loading tasks:", error);
|
|
12862
|
+
showError("Erreur lors du chargement des t\xE2ches");
|
|
12863
|
+
} finally {
|
|
12864
|
+
setLoading(false);
|
|
12865
|
+
}
|
|
12866
|
+
}, [showError]);
|
|
12867
|
+
useEffect19(() => {
|
|
12868
|
+
loadTasks();
|
|
12869
|
+
}, [loadTasks]);
|
|
12870
|
+
const getTasksByStatus = (status) => {
|
|
12871
|
+
return tasks.filter((task) => task.status === status).filter(
|
|
12872
|
+
(task) => searchQuery === "" || task.title?.toLowerCase().includes(searchQuery.toLowerCase()) || task.description?.toLowerCase().includes(searchQuery.toLowerCase())
|
|
12873
|
+
);
|
|
12874
|
+
};
|
|
12875
|
+
const handleDragStart = (e, task) => {
|
|
12876
|
+
setDraggedTask(task);
|
|
12877
|
+
e.dataTransfer.effectAllowed = "move";
|
|
12878
|
+
e.dataTransfer.setData("text/plain", String(task.id));
|
|
12879
|
+
};
|
|
12880
|
+
const handleDragEnd = () => {
|
|
12881
|
+
setDraggedTask(null);
|
|
12882
|
+
setDropTargetColumn(null);
|
|
12883
|
+
};
|
|
12884
|
+
const handleDragOver = (e) => {
|
|
12885
|
+
e.preventDefault();
|
|
12886
|
+
e.dataTransfer.dropEffect = "move";
|
|
12887
|
+
};
|
|
12888
|
+
const handleDrop = async (e, columnId) => {
|
|
12889
|
+
e.preventDefault();
|
|
12890
|
+
if (draggedTask && draggedTask.status !== columnId) {
|
|
12891
|
+
setTasks(
|
|
12892
|
+
(prevTasks) => prevTasks.map(
|
|
12893
|
+
(task) => task.id === draggedTask.id ? { ...task, status: columnId } : task
|
|
12894
|
+
)
|
|
12895
|
+
);
|
|
12896
|
+
try {
|
|
12897
|
+
await TaskServices.updateStatus(draggedTask.id, columnId);
|
|
12898
|
+
showSuccess("Statut mis \xE0 jour");
|
|
12899
|
+
} catch (error) {
|
|
12900
|
+
console.error("Error updating status:", error);
|
|
12901
|
+
setTasks(
|
|
12902
|
+
(prevTasks) => prevTasks.map(
|
|
12903
|
+
(task) => task.id === draggedTask.id ? { ...task, status: draggedTask.status } : task
|
|
12904
|
+
)
|
|
12905
|
+
);
|
|
12906
|
+
showError("Erreur lors de la mise \xE0 jour");
|
|
12907
|
+
}
|
|
12908
|
+
}
|
|
12909
|
+
setDraggedTask(null);
|
|
12910
|
+
setDropTargetColumn(null);
|
|
12911
|
+
};
|
|
12912
|
+
const handleColumnDragEnter = (columnId) => {
|
|
12913
|
+
if (draggedTask && draggedTask.status !== columnId) {
|
|
12914
|
+
setDropTargetColumn(columnId);
|
|
12915
|
+
}
|
|
12916
|
+
};
|
|
12917
|
+
const handleColumnDragLeave = () => {
|
|
12918
|
+
setDropTargetColumn(null);
|
|
12919
|
+
};
|
|
12920
|
+
const handleAddTask = (status) => {
|
|
12921
|
+
setEditingTask(null);
|
|
12922
|
+
setDefaultStatus(status);
|
|
12923
|
+
setIsFormOpen(true);
|
|
12924
|
+
};
|
|
12925
|
+
const handleEditTask = (task) => {
|
|
12926
|
+
setEditingTask(task);
|
|
12927
|
+
setDefaultStatus(task.status);
|
|
12928
|
+
setIsFormOpen(true);
|
|
12929
|
+
};
|
|
12930
|
+
const handleDeleteTask = async (task) => {
|
|
12931
|
+
const confirmed = await confirm2("\xCAtes-vous s\xFBr de vouloir supprimer cette t\xE2che ?");
|
|
12932
|
+
if (!confirmed) return;
|
|
12933
|
+
try {
|
|
12934
|
+
await TaskServices.delete(task.id);
|
|
12935
|
+
setTasks((prev) => prev.filter((t) => t.id !== task.id));
|
|
12936
|
+
showSuccess("T\xE2che supprim\xE9e");
|
|
12937
|
+
} catch (error) {
|
|
12938
|
+
console.error("Error deleting task:", error);
|
|
12939
|
+
showError("Erreur lors de la suppression");
|
|
12940
|
+
}
|
|
12941
|
+
};
|
|
12942
|
+
const handleFormSuccess = () => {
|
|
12943
|
+
loadTasks();
|
|
12944
|
+
};
|
|
12945
|
+
if (loading) {
|
|
12946
|
+
return /* @__PURE__ */ jsx45("div", { className: "h-full flex items-center justify-center", children: /* @__PURE__ */ jsx45(Loader24, { className: "w-8 h-8 animate-spin text-[var(--color-primary)]" }) });
|
|
12947
|
+
}
|
|
12948
|
+
return /* @__PURE__ */ jsxs40("div", { className: "h-full flex flex-col", children: [
|
|
12949
|
+
/* @__PURE__ */ jsx45("div", { className: "bg-[var(--color-surface)] border-b border-[var(--color-border)] px-6 py-4", children: /* @__PURE__ */ jsxs40("div", { className: "flex items-center justify-between flex-wrap gap-4", children: [
|
|
12950
|
+
/* @__PURE__ */ jsx45("h1", { className: "text-xl font-semibold text-[var(--color-text-primary)]", children: "Task Pilot" }),
|
|
12951
|
+
/* @__PURE__ */ jsxs40("div", { className: "flex items-center gap-3 flex-wrap", children: [
|
|
12952
|
+
/* @__PURE__ */ jsxs40("div", { className: "relative", children: [
|
|
12953
|
+
/* @__PURE__ */ jsx45(Search6, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-[var(--color-text-tertiary)]" }),
|
|
12954
|
+
/* @__PURE__ */ jsx45(
|
|
12955
|
+
"input",
|
|
12956
|
+
{
|
|
12957
|
+
type: "text",
|
|
12958
|
+
placeholder: "Rechercher...",
|
|
12959
|
+
value: searchQuery,
|
|
12960
|
+
onChange: (e) => setSearchQuery(e.target.value),
|
|
12961
|
+
className: "pl-9 pr-4 py-2 text-sm border border-[var(--color-border)] rounded-lg\r\n focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)]/20 focus:border-[var(--color-primary)]\r\n w-64 bg-[var(--color-surface)] text-[var(--color-text-primary)]"
|
|
12962
|
+
}
|
|
12963
|
+
)
|
|
12964
|
+
] }),
|
|
12965
|
+
/* @__PURE__ */ jsxs40(SecondaryButton, { variant: "outline", children: [
|
|
12966
|
+
/* @__PURE__ */ jsx45(Filter3, { className: "w-4 h-4 mr-2" }),
|
|
12967
|
+
"Filtrer"
|
|
12968
|
+
] }),
|
|
12969
|
+
/* @__PURE__ */ jsxs40(Buttons_default, { onClick: () => handleAddTask("new"), children: [
|
|
12970
|
+
/* @__PURE__ */ jsx45(Plus9, { className: "w-4 h-4 mr-2" }),
|
|
12971
|
+
"Nouvelle t\xE2che"
|
|
12972
|
+
] })
|
|
12973
|
+
] })
|
|
12974
|
+
] }) }),
|
|
12975
|
+
/* @__PURE__ */ jsx45("div", { className: "flex-1 overflow-x-auto p-6 bg-[var(--color-background)]", children: /* @__PURE__ */ jsx45("div", { className: "flex gap-4 h-full", children: COLUMNS.map((column) => /* @__PURE__ */ jsx45(
|
|
12976
|
+
"div",
|
|
12977
|
+
{
|
|
12978
|
+
onDragEnter: () => handleColumnDragEnter(column.id),
|
|
12979
|
+
onDragLeave: handleColumnDragLeave,
|
|
12980
|
+
children: /* @__PURE__ */ jsx45(
|
|
12981
|
+
KanbanColumn,
|
|
12982
|
+
{
|
|
12983
|
+
column,
|
|
12984
|
+
tasks: getTasksByStatus(column.id),
|
|
12985
|
+
onAddTask: handleAddTask,
|
|
12986
|
+
draggedTask,
|
|
12987
|
+
onDragStart: handleDragStart,
|
|
12988
|
+
onDragEnd: handleDragEnd,
|
|
12989
|
+
onDragOver: handleDragOver,
|
|
12990
|
+
onDrop: handleDrop,
|
|
12991
|
+
isDropTarget: dropTargetColumn === column.id,
|
|
12992
|
+
onEditTask: handleEditTask,
|
|
12993
|
+
onDeleteTask: handleDeleteTask
|
|
12994
|
+
}
|
|
12995
|
+
)
|
|
12996
|
+
},
|
|
12997
|
+
column.id
|
|
12998
|
+
)) }) }),
|
|
12999
|
+
draggedTask && /* @__PURE__ */ jsxs40("div", { className: "fixed bottom-4 left-1/2 -translate-x-1/2 bg-[var(--color-primary)] text-[var(--color-text-inverse)] px-4 py-2 rounded-lg shadow-lg text-sm font-medium animate-pulse", children: [
|
|
13000
|
+
'D\xE9placez "',
|
|
13001
|
+
draggedTask.title?.substring(0, 30),
|
|
13002
|
+
'..." vers une colonne'
|
|
13003
|
+
] }),
|
|
13004
|
+
/* @__PURE__ */ jsx45(
|
|
13005
|
+
FormTask_default,
|
|
13006
|
+
{
|
|
13007
|
+
open: isFormOpen,
|
|
13008
|
+
onClose: () => setIsFormOpen(false),
|
|
13009
|
+
task: editingTask,
|
|
13010
|
+
defaultStatus,
|
|
13011
|
+
onSuccess: handleFormSuccess
|
|
13012
|
+
}
|
|
13013
|
+
)
|
|
13014
|
+
] });
|
|
13015
|
+
};
|
|
13016
|
+
var TaskPilot_default = TaskPilot;
|
|
13017
|
+
|
|
13018
|
+
// src/pages/workspaces/PurchaseRequestsPage.tsx
|
|
13019
|
+
import { useEffect as useEffect21, useState as useState31 } from "react";
|
|
13020
|
+
import { ClipboardCheck, Plus as Plus11 } from "lucide-react";
|
|
13021
|
+
|
|
13022
|
+
// src/pages/workspaces/FormPurchaseRequest.tsx
|
|
13023
|
+
import { useState as useState30, useEffect as useEffect20 } from "react";
|
|
13024
|
+
import {
|
|
13025
|
+
Building2 as Building27,
|
|
13026
|
+
Trash2 as Trash26,
|
|
13027
|
+
Plus as Plus10,
|
|
13028
|
+
CreditCard as CreditCard4,
|
|
13029
|
+
FileText as FileText11
|
|
13030
|
+
} from "lucide-react";
|
|
13031
|
+
|
|
13032
|
+
// src/services/PurchaseRequestServices.ts
|
|
13033
|
+
var VENDORS_API_URL2 = `${API_URL}/procurement/purchase-requests/`;
|
|
13034
|
+
var PurchaseRequestServices = {
|
|
13035
|
+
createPurchaseRequest: (data, token) => FetchApi.post(`${VENDORS_API_URL2}`, data, token),
|
|
13036
|
+
getPurchaseRequest: (id, token) => FetchApi.get(`${VENDORS_API_URL2}${id}/`, token),
|
|
13037
|
+
getPurchaseRequests: (token) => FetchApi.get(`${VENDORS_API_URL2}`, token),
|
|
13038
|
+
updatePurchaseRequest: (id, data, token) => FetchApi.put(`${VENDORS_API_URL2}${id}/`, data, token),
|
|
13039
|
+
deletePurchaseRequest: (id, token) => FetchApi.delete(`${VENDORS_API_URL2}${id}/`, token)
|
|
13040
|
+
};
|
|
13041
|
+
|
|
13042
|
+
// src/globals.ts
|
|
13043
|
+
var UNITS = [
|
|
13044
|
+
"Pi\xE8ce",
|
|
13045
|
+
"Unit\xE9",
|
|
13046
|
+
"Lot",
|
|
13047
|
+
"Kg",
|
|
13048
|
+
"Gramme",
|
|
13049
|
+
"Tonne",
|
|
13050
|
+
"Litre",
|
|
13051
|
+
"M\xB2",
|
|
13052
|
+
"M\xB3",
|
|
13053
|
+
"M\xE8tre",
|
|
13054
|
+
"Cm",
|
|
13055
|
+
"Heure",
|
|
13056
|
+
"Jour",
|
|
13057
|
+
"Mois"
|
|
13058
|
+
];
|
|
13059
|
+
|
|
13060
|
+
// src/pages/workspaces/FormPurchaseRequest.tsx
|
|
13061
|
+
import { Fragment as Fragment11, jsx as jsx46, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
13062
|
+
var FormPurchaseRequest = ({
|
|
13063
|
+
isOpen,
|
|
13064
|
+
onClose,
|
|
13065
|
+
object,
|
|
13066
|
+
refresh = () => {
|
|
13067
|
+
}
|
|
13068
|
+
}) => {
|
|
13069
|
+
const [formData, setFormData] = useState30(object || {
|
|
13070
|
+
request_number: "",
|
|
13071
|
+
title: "",
|
|
13072
|
+
description: "",
|
|
13073
|
+
category: "",
|
|
13074
|
+
requester: null,
|
|
13075
|
+
department: null,
|
|
13076
|
+
cost_center: null,
|
|
13077
|
+
estimated_amount: 0,
|
|
13078
|
+
currency: "",
|
|
13079
|
+
budget_available: false,
|
|
13080
|
+
urgency: "low",
|
|
13081
|
+
needed_date: "",
|
|
13082
|
+
delivery_address: "",
|
|
13083
|
+
delivery_contact: "",
|
|
13084
|
+
delivery_phone: "",
|
|
13085
|
+
status: "draft",
|
|
13086
|
+
approval_date: null,
|
|
13087
|
+
approved_by: null,
|
|
13088
|
+
created_at: "",
|
|
13089
|
+
updated_at: "",
|
|
13090
|
+
comments: null,
|
|
13091
|
+
vendor: null,
|
|
13092
|
+
evaluation_score: null,
|
|
13093
|
+
evaluation_notes: null,
|
|
13094
|
+
evaluated_by: null,
|
|
13095
|
+
evaluated_at: null,
|
|
13096
|
+
assigned_buyer: null,
|
|
13097
|
+
budget_approval_requested_at: null,
|
|
13098
|
+
items: [
|
|
13099
|
+
{ description: "", specifications: "", quantity: 1, unit: "", unit_price: 0, total_price: 0, comments: "" }
|
|
13100
|
+
]
|
|
13101
|
+
});
|
|
13102
|
+
const [errors, setErrors] = useState30({});
|
|
13103
|
+
const [activeTab, setActiveTab] = useState30("general");
|
|
13104
|
+
const [loading, setLoading] = useState30(false);
|
|
13105
|
+
const { loggedUser, token } = useSession();
|
|
13106
|
+
const { success, error: showError } = useToast();
|
|
13107
|
+
const [budgetInfo, setBudgetInfo] = useState30({ totalBudget: 0, totalActual: 0, available: 0, loading: false });
|
|
13108
|
+
const readonly = false;
|
|
13109
|
+
const fetchDepartmentBudget = async (departmentId) => {
|
|
13110
|
+
if (!departmentId) {
|
|
13111
|
+
setBudgetInfo({ totalBudget: 0, totalActual: 0, available: 0, loading: false });
|
|
13112
|
+
return;
|
|
13113
|
+
}
|
|
13114
|
+
setBudgetInfo((prev) => ({ ...prev, loading: true }));
|
|
13115
|
+
try {
|
|
13116
|
+
const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
13117
|
+
const response = await fetch(
|
|
13118
|
+
`${API_URL}/core/departments/${departmentId}/budget-and-actual/?year=${currentYear}&category=expenses`,
|
|
13119
|
+
{
|
|
13120
|
+
headers: {
|
|
13121
|
+
"Authorization": `Token ${localStorage.getItem("token")}`
|
|
13122
|
+
}
|
|
13123
|
+
}
|
|
13124
|
+
);
|
|
13125
|
+
if (response.ok) {
|
|
13126
|
+
const data = await response.json();
|
|
13127
|
+
const available = (data.totals?.budget || 0) - (data.totals?.actual || 0);
|
|
13128
|
+
setBudgetInfo({
|
|
13129
|
+
totalBudget: data.totals?.budget || 0,
|
|
13130
|
+
totalActual: data.totals?.actual || 0,
|
|
13131
|
+
available,
|
|
13132
|
+
loading: false
|
|
13133
|
+
});
|
|
13134
|
+
} else {
|
|
13135
|
+
setBudgetInfo({ totalBudget: 0, totalActual: 0, available: 0, loading: false });
|
|
13136
|
+
}
|
|
13137
|
+
} catch (error) {
|
|
13138
|
+
console.error("Erreur lors de la r\xE9cup\xE9ration du budget:", error);
|
|
13139
|
+
setBudgetInfo({ totalBudget: 0, totalActual: 0, available: 0, loading: false });
|
|
13140
|
+
}
|
|
13141
|
+
};
|
|
13142
|
+
useEffect20(() => {
|
|
13143
|
+
if (formData.department) {
|
|
13144
|
+
fetchDepartmentBudget(formData.department);
|
|
13145
|
+
}
|
|
13146
|
+
}, [formData.department]);
|
|
13147
|
+
const handleInputChange = (e) => {
|
|
13148
|
+
const { name, value } = e.target;
|
|
13149
|
+
setFormData((prev) => ({ ...prev, [name]: value }));
|
|
13150
|
+
if (errors[name]) {
|
|
13151
|
+
setErrors((prev) => {
|
|
13152
|
+
const next = { ...prev };
|
|
13153
|
+
delete next[name];
|
|
13154
|
+
return next;
|
|
13155
|
+
});
|
|
13156
|
+
}
|
|
13157
|
+
};
|
|
13158
|
+
const selectDept = (option) => {
|
|
13159
|
+
setFormData({ ...formData, department: option.value });
|
|
13160
|
+
};
|
|
13161
|
+
const selectCostCenter = (option) => {
|
|
13162
|
+
setFormData({ ...formData, cost_center: option.value });
|
|
13163
|
+
};
|
|
13164
|
+
const handleSelectChange = (e) => {
|
|
13165
|
+
const { name, value } = e.target;
|
|
13166
|
+
setFormData((prev) => ({ ...prev, [name]: value }));
|
|
13167
|
+
};
|
|
13168
|
+
const handleTextareaChange = (e) => {
|
|
13169
|
+
const { name, value } = e.target;
|
|
13170
|
+
setFormData((prev) => ({ ...prev, [name]: value }));
|
|
13171
|
+
};
|
|
13172
|
+
const validateForm = () => {
|
|
13173
|
+
const newErrors = {};
|
|
13174
|
+
if (!formData.title?.trim()) {
|
|
13175
|
+
newErrors.title = "Le titre est obligatoire";
|
|
13176
|
+
}
|
|
13177
|
+
if (!formData.category?.trim()) {
|
|
13178
|
+
newErrors.category = "La cat\xE9gorie est obligatoire";
|
|
13179
|
+
}
|
|
13180
|
+
if (!formData.estimated_amount || formData.estimated_amount <= 0) {
|
|
13181
|
+
newErrors.estimated_amount = "Le montant estim\xE9 doit \xEAtre sup\xE9rieur \xE0 0";
|
|
13182
|
+
}
|
|
13183
|
+
setErrors(newErrors);
|
|
13184
|
+
return Object.keys(newErrors).length === 0;
|
|
13185
|
+
};
|
|
13186
|
+
const handleSavePurchaseRequest = async (entityData) => {
|
|
13187
|
+
try {
|
|
13188
|
+
if (object && object.id) {
|
|
13189
|
+
await PurchaseRequestServices.updatePurchaseRequest(object.id, entityData, token);
|
|
13190
|
+
success("Entit\xE9 modifi\xE9e avec succ\xE8s !");
|
|
13191
|
+
} else {
|
|
13192
|
+
await PurchaseRequestServices.createPurchaseRequest({ ...entityData, requester: loggedUser?.id }, token);
|
|
13193
|
+
success("Entit\xE9 cr\xE9\xE9e avec succ\xE8s !");
|
|
13194
|
+
}
|
|
13195
|
+
refresh();
|
|
13196
|
+
onClose();
|
|
13197
|
+
} catch (error) {
|
|
13198
|
+
console.error(error);
|
|
13199
|
+
showError("Erreur lors de l'enregistrement de l'entit\xE9");
|
|
13200
|
+
}
|
|
13201
|
+
};
|
|
13202
|
+
const selectVendor = (option) => {
|
|
13203
|
+
setFormData({ ...formData, suggered_vendor: Number(option.value) });
|
|
13204
|
+
};
|
|
13205
|
+
const handleSubmit = async (e) => {
|
|
13206
|
+
e.preventDefault();
|
|
13207
|
+
if (!validateForm()) return;
|
|
13208
|
+
setLoading(true);
|
|
13209
|
+
try {
|
|
13210
|
+
await handleSavePurchaseRequest(formData);
|
|
13211
|
+
} finally {
|
|
13212
|
+
setLoading(false);
|
|
13213
|
+
}
|
|
13214
|
+
};
|
|
13215
|
+
const tabs = [
|
|
13216
|
+
{ id: "general", label: "G\xE9n\xE9ral", icon: Building27 },
|
|
13217
|
+
{ id: "items", label: "Articles", icon: FileText11 },
|
|
13218
|
+
{ id: "vendors", label: "Fournisseurs et Budgets", icon: CreditCard4 }
|
|
13219
|
+
// { id: 'delivery', label: 'Livraison', icon: MapPin },
|
|
13220
|
+
];
|
|
13221
|
+
const ajouterLigneAchat = () => {
|
|
13222
|
+
setFormData({ ...formData, items: [...formData.items ?? [], { description: "", specifications: "", quantity: 1, unit: "", unit_price: 0, total_price: 0, comments: "" }] });
|
|
13223
|
+
};
|
|
13224
|
+
const renderTabContent = () => {
|
|
13225
|
+
switch (activeTab) {
|
|
13226
|
+
case "general":
|
|
13227
|
+
return /* @__PURE__ */ jsxs41("div", { className: "space-y-4", children: [
|
|
13228
|
+
/* @__PURE__ */ jsx46(
|
|
13229
|
+
TextInput,
|
|
13230
|
+
{
|
|
13231
|
+
label: "Num\xE9ro de demande",
|
|
13232
|
+
name: "request_number",
|
|
13233
|
+
value: formData.request_number || "",
|
|
13234
|
+
placeholder: "Num\xE9ro automatique",
|
|
13235
|
+
onChange: handleInputChange,
|
|
13236
|
+
disabled: true
|
|
13237
|
+
}
|
|
13238
|
+
),
|
|
13239
|
+
/* @__PURE__ */ jsx46(
|
|
13240
|
+
TextInput,
|
|
13241
|
+
{
|
|
13242
|
+
label: "Titre",
|
|
13243
|
+
name: "title",
|
|
13244
|
+
value: formData.title || "",
|
|
13245
|
+
placeholder: "Titre de la demande d'achat",
|
|
13246
|
+
required: true,
|
|
13247
|
+
error: errors.title,
|
|
13248
|
+
onChange: handleInputChange
|
|
13249
|
+
}
|
|
13250
|
+
),
|
|
13251
|
+
/* @__PURE__ */ jsxs41("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
13252
|
+
/* @__PURE__ */ jsx46(
|
|
13253
|
+
TextInput,
|
|
13254
|
+
{
|
|
13255
|
+
label: "Cat\xE9gorie",
|
|
13256
|
+
name: "category",
|
|
13257
|
+
value: formData.category || "",
|
|
13258
|
+
placeholder: "Cat\xE9gorie de produits/services",
|
|
13259
|
+
required: true,
|
|
13260
|
+
error: errors.category,
|
|
13261
|
+
onChange: handleInputChange
|
|
13262
|
+
}
|
|
13263
|
+
),
|
|
13264
|
+
/* @__PURE__ */ jsx46(SelectDepartment, { value: formData.department, onSelect: selectDept }),
|
|
13265
|
+
/* @__PURE__ */ jsx46(
|
|
13266
|
+
TextInput,
|
|
13267
|
+
{
|
|
13268
|
+
label: "Montant estim\xE9",
|
|
13269
|
+
name: "estimated_amount",
|
|
13270
|
+
value: formData.estimated_amount || "",
|
|
13271
|
+
placeholder: "Montant en devise",
|
|
13272
|
+
error: errors.estimated_amount,
|
|
13273
|
+
onChange: handleInputChange
|
|
13274
|
+
}
|
|
13275
|
+
),
|
|
13276
|
+
/* @__PURE__ */ jsxs41("div", { children: [
|
|
13277
|
+
/* @__PURE__ */ jsx46("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "Urgence" }),
|
|
13278
|
+
/* @__PURE__ */ jsxs41(
|
|
13279
|
+
"select",
|
|
13280
|
+
{
|
|
13281
|
+
name: "urgency",
|
|
13282
|
+
value: formData.urgency || "low",
|
|
13283
|
+
onChange: handleSelectChange,
|
|
13284
|
+
className: "w-full px-4 py-3 border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-[#6B7C92] focus:border-transparent",
|
|
13285
|
+
children: [
|
|
13286
|
+
/* @__PURE__ */ jsx46("option", { value: "low", children: "Faible" }),
|
|
13287
|
+
/* @__PURE__ */ jsx46("option", { value: "medium", children: "Moyenne" }),
|
|
13288
|
+
/* @__PURE__ */ jsx46("option", { value: "high", children: "\xC9lev\xE9e" }),
|
|
13289
|
+
/* @__PURE__ */ jsx46("option", { value: "critical", children: "Critique" })
|
|
13290
|
+
]
|
|
13291
|
+
}
|
|
13292
|
+
)
|
|
13293
|
+
] }),
|
|
13294
|
+
/* @__PURE__ */ jsx46(
|
|
13295
|
+
InputField,
|
|
13296
|
+
{
|
|
13297
|
+
label: "Date de besoin",
|
|
13298
|
+
name: "needed_date",
|
|
13299
|
+
type: "date",
|
|
13300
|
+
min: (/* @__PURE__ */ new Date()).toISOString().split("T")[0],
|
|
13301
|
+
value: formData.needed_date || "",
|
|
13302
|
+
onChange: handleInputChange
|
|
13303
|
+
}
|
|
13304
|
+
)
|
|
13305
|
+
] }),
|
|
13306
|
+
/* @__PURE__ */ jsxs41("div", { children: [
|
|
13307
|
+
/* @__PURE__ */ jsx46("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "Description" }),
|
|
13308
|
+
/* @__PURE__ */ jsx46(
|
|
13309
|
+
"textarea",
|
|
13310
|
+
{
|
|
13311
|
+
name: "description",
|
|
13312
|
+
value: formData.description || "",
|
|
13313
|
+
onChange: handleTextareaChange,
|
|
13314
|
+
rows: 3,
|
|
13315
|
+
className: "w-full px-4 py-3 border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-[#6B7C92] focus:border-transparent placeholder-gray-400",
|
|
13316
|
+
placeholder: "Description d\xE9taill\xE9e de la demande"
|
|
13317
|
+
}
|
|
13318
|
+
)
|
|
13319
|
+
] }),
|
|
13320
|
+
/* @__PURE__ */ jsxs41("div", { children: [
|
|
13321
|
+
/* @__PURE__ */ jsx46("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "Commentaires" }),
|
|
13322
|
+
/* @__PURE__ */ jsx46(
|
|
13323
|
+
"textarea",
|
|
13324
|
+
{
|
|
13325
|
+
name: "comments",
|
|
13326
|
+
value: formData.comments || "",
|
|
13327
|
+
onChange: handleTextareaChange,
|
|
13328
|
+
rows: 2,
|
|
13329
|
+
className: "w-full px-4 py-3 border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-[#6B7C92] focus:border-transparent placeholder-gray-400",
|
|
13330
|
+
placeholder: "Commentaires additionnels"
|
|
13331
|
+
}
|
|
13332
|
+
)
|
|
13333
|
+
] })
|
|
13334
|
+
] });
|
|
13335
|
+
case "delivery":
|
|
13336
|
+
return /* @__PURE__ */ jsxs41("div", { className: "space-y-4", children: [
|
|
13337
|
+
/* @__PURE__ */ jsxs41("div", { children: [
|
|
13338
|
+
/* @__PURE__ */ jsx46("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "Adresse de livraison" }),
|
|
13339
|
+
/* @__PURE__ */ jsx46(
|
|
13340
|
+
"textarea",
|
|
13341
|
+
{
|
|
13342
|
+
name: "delivery_address",
|
|
13343
|
+
value: formData.delivery_address || "",
|
|
13344
|
+
onChange: handleTextareaChange,
|
|
13345
|
+
rows: 3,
|
|
13346
|
+
className: "w-full px-4 py-3 border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-[#6B7C92] focus:border-transparent placeholder-gray-400",
|
|
13347
|
+
placeholder: "Adresse compl\xE8te de livraison"
|
|
13348
|
+
}
|
|
13349
|
+
)
|
|
13350
|
+
] }),
|
|
13351
|
+
/* @__PURE__ */ jsxs41("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
13352
|
+
/* @__PURE__ */ jsx46(
|
|
13353
|
+
TextInput,
|
|
13354
|
+
{
|
|
13355
|
+
label: "Contact de livraison",
|
|
13356
|
+
name: "delivery_contact",
|
|
13357
|
+
value: formData.delivery_contact || "",
|
|
13358
|
+
placeholder: "Nom du contact",
|
|
13359
|
+
onChange: handleInputChange
|
|
13360
|
+
}
|
|
13361
|
+
),
|
|
13362
|
+
/* @__PURE__ */ jsx46(
|
|
13363
|
+
InputField,
|
|
13364
|
+
{
|
|
13365
|
+
label: "T\xE9l\xE9phone de livraison",
|
|
13366
|
+
name: "delivery_phone",
|
|
13367
|
+
type: "tel",
|
|
13368
|
+
value: formData.delivery_phone || "",
|
|
13369
|
+
placeholder: "+33 1 23 45 67 89",
|
|
13370
|
+
onChange: handleInputChange
|
|
13371
|
+
}
|
|
13372
|
+
)
|
|
13373
|
+
] })
|
|
13374
|
+
] });
|
|
13375
|
+
case "vendors":
|
|
13376
|
+
return /* @__PURE__ */ jsxs41("div", { className: "space-y-4", children: [
|
|
13377
|
+
(formData?.items?.reduce((sum, item) => sum + (Number(item?.total_price) || 0), 0) ?? 0) < 3e5 ? /* @__PURE__ */ jsx46(Fragment11, { children: /* @__PURE__ */ jsx46(SelectVendor, { value: formData.suggered_vendor, onSelect: selectVendor }) }) : /* @__PURE__ */ jsx46(Fragment11, {}),
|
|
13378
|
+
/* @__PURE__ */ jsx46("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: /* @__PURE__ */ jsx46(SelectCostCenter, { value: formData.cost_center, onSelect: selectCostCenter }) }),
|
|
13379
|
+
object && (formData.approval_date || formData.approved_by || formData.evaluation_score) && /* @__PURE__ */ jsxs41("div", { className: "mt-6 p-4 bg-gray-50 rounded-lg", children: [
|
|
13380
|
+
/* @__PURE__ */ jsx46("h4", { className: "text-sm font-medium text-gray-700 mb-3", children: "Informations syst\xE8me (lecture seule)" }),
|
|
13381
|
+
/* @__PURE__ */ jsxs41("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
13382
|
+
formData.approval_date && /* @__PURE__ */ jsxs41("div", { children: [
|
|
13383
|
+
/* @__PURE__ */ jsx46("span", { className: "text-xs text-gray-500", children: "Date d'approbation:" }),
|
|
13384
|
+
/* @__PURE__ */ jsx46("p", { className: "text-sm", children: formData.approval_date })
|
|
13385
|
+
] }),
|
|
13386
|
+
formData.approved_by && /* @__PURE__ */ jsxs41("div", { children: [
|
|
13387
|
+
/* @__PURE__ */ jsx46("span", { className: "text-xs text-gray-500", children: "Approuv\xE9 par:" }),
|
|
13388
|
+
/* @__PURE__ */ jsx46("p", { className: "text-sm", children: formData.approved_by })
|
|
13389
|
+
] }),
|
|
13390
|
+
formData.evaluation_score && /* @__PURE__ */ jsxs41("div", { children: [
|
|
13391
|
+
/* @__PURE__ */ jsx46("span", { className: "text-xs text-gray-500", children: "Note d'\xE9valuation:" }),
|
|
13392
|
+
/* @__PURE__ */ jsx46("p", { className: "text-sm", children: formData.evaluation_score })
|
|
13393
|
+
] }),
|
|
13394
|
+
formData.evaluated_at && /* @__PURE__ */ jsxs41("div", { children: [
|
|
13395
|
+
/* @__PURE__ */ jsx46("span", { className: "text-xs text-gray-500", children: "Date d'\xE9valuation:" }),
|
|
13396
|
+
/* @__PURE__ */ jsx46("p", { className: "text-sm", children: formData.evaluated_at })
|
|
13397
|
+
] })
|
|
13398
|
+
] }),
|
|
13399
|
+
formData.evaluation_notes && /* @__PURE__ */ jsxs41("div", { className: "mt-3", children: [
|
|
13400
|
+
/* @__PURE__ */ jsx46("span", { className: "text-xs text-gray-500", children: "Notes d'\xE9valuation:" }),
|
|
13401
|
+
/* @__PURE__ */ jsx46("p", { className: "text-sm", children: formData.evaluation_notes })
|
|
13402
|
+
] })
|
|
13403
|
+
] })
|
|
13404
|
+
] });
|
|
13405
|
+
case "items":
|
|
13406
|
+
return /* @__PURE__ */ jsxs41("div", { className: "space-y-4", children: [
|
|
13407
|
+
/* @__PURE__ */ jsxs41("div", { className: "flex justify-between items-center", children: [
|
|
13408
|
+
/* @__PURE__ */ jsx46("h3", { className: "text-lg font-medium text-gray-900", children: "Articles demand\xE9s" }),
|
|
13409
|
+
/* @__PURE__ */ jsxs41(
|
|
13410
|
+
Buttons_default,
|
|
13411
|
+
{
|
|
13412
|
+
type: "button",
|
|
13413
|
+
onClick: ajouterLigneAchat,
|
|
13414
|
+
children: [
|
|
13415
|
+
/* @__PURE__ */ jsx46(Plus10, { className: "w-4 h-4 mr-2" }),
|
|
13416
|
+
"Ajouter ligne"
|
|
13417
|
+
]
|
|
13418
|
+
}
|
|
13419
|
+
)
|
|
13420
|
+
] }),
|
|
13421
|
+
/* @__PURE__ */ jsx46("div", { className: "border border-gray-200 rounded-lg p-4", children: /* @__PURE__ */ jsxs41("table", { className: "w-full", children: [
|
|
13422
|
+
/* @__PURE__ */ jsx46("thead", { className: "bg-[#e8eaec]", children: /* @__PURE__ */ jsxs41("tr", { children: [
|
|
13423
|
+
/* @__PURE__ */ jsx46("th", { className: "border border-[#d1d7de] px-2 py-2 text-left text-xs font-semibold text-[#283042] uppercase", children: "D\xE9signation" }),
|
|
13424
|
+
/* @__PURE__ */ jsx46("th", { className: "border border-[#d1d7de] px-2 py-2 text-left text-xs font-semibold text-[#283042] uppercase", children: "Unit\xE9" }),
|
|
13425
|
+
/* @__PURE__ */ jsx46("th", { className: "border border-[#d1d7de] px-2 py-2 text-right text-xs font-semibold text-[#283042] uppercase", children: "Qt\xE9" }),
|
|
13426
|
+
/* @__PURE__ */ jsx46("th", { className: "border border-[#d1d7de] px-2 py-2 text-right text-xs font-semibold text-[#283042] uppercase", children: "Prix U. HT" }),
|
|
13427
|
+
/* @__PURE__ */ jsx46("th", { className: "border border-[#d1d7de] px-2 py-2 text-right text-xs font-semibold text-[#283042] uppercase", children: "Mont. HT" }),
|
|
13428
|
+
/* @__PURE__ */ jsx46("th", { className: "border border-[#d1d7de] px-2 py-2 text-left text-xs font-semibold text-[#283042] uppercase", children: "Commentaires" }),
|
|
13429
|
+
/* @__PURE__ */ jsx46("th", { className: "border border-[#d1d7de] px-2 py-2 text-center text-xs font-semibold text-[#283042] uppercase print:hidden", children: "Actions" })
|
|
13430
|
+
] }) }),
|
|
13431
|
+
/* @__PURE__ */ jsx46("tbody", { className: "divide-y divide-[#E8E8E8]", children: formData?.items?.map((line, index) => /* @__PURE__ */ jsxs41("tr", { className: index % 2 === 0 ? "bg-white" : "bg-gray-50", children: [
|
|
13432
|
+
/* @__PURE__ */ jsx46("td", { className: "border border-[#d1d7de] px-2 py-2", children: !readonly ? /* @__PURE__ */ jsx46(
|
|
13433
|
+
"textarea",
|
|
13434
|
+
{
|
|
13435
|
+
value: line.description,
|
|
13436
|
+
onChange: (e) => {
|
|
13437
|
+
const newLignes = [...formData.items ?? []];
|
|
13438
|
+
newLignes[index].description = e.target.value;
|
|
13439
|
+
setFormData({ ...formData, items: newLignes });
|
|
13440
|
+
},
|
|
13441
|
+
rows: 2,
|
|
13442
|
+
className: `w-full px-1 py-1 border rounded text-xs resize-none ${errors[`line_${index}_designation`] ? "border-red-500" : "border-[#d1d7de]"}`,
|
|
13443
|
+
placeholder: "Description d\xE9taill\xE9e *"
|
|
13444
|
+
}
|
|
13445
|
+
) : /* @__PURE__ */ jsx46("div", { className: "text-xs", children: line.description }) }),
|
|
13446
|
+
/* @__PURE__ */ jsx46("td", { className: "border border-[#d1d7de] px-2 py-2", children: !readonly ? /* @__PURE__ */ jsx46(
|
|
13447
|
+
"select",
|
|
13448
|
+
{
|
|
13449
|
+
value: line.unit,
|
|
13450
|
+
onChange: (e) => {
|
|
13451
|
+
const newLignes = [...formData.items ?? []];
|
|
13452
|
+
newLignes[index].unit = e.target.value;
|
|
13453
|
+
setFormData({ ...formData, items: newLignes });
|
|
13454
|
+
},
|
|
13455
|
+
className: "w-full px-1 py-1 border border-[#d1d7de] rounded text-xs",
|
|
13456
|
+
children: UNITS.map((unit) => /* @__PURE__ */ jsx46("option", { value: unit, children: unit }, unit))
|
|
13457
|
+
}
|
|
13458
|
+
) : /* @__PURE__ */ jsx46("div", { className: "text-xs", children: line.unit }) }),
|
|
13459
|
+
/* @__PURE__ */ jsx46("td", { className: "border border-[#d1d7de] px-2 py-2 text-right", children: !readonly ? /* @__PURE__ */ jsx46(
|
|
13460
|
+
"input",
|
|
13461
|
+
{
|
|
13462
|
+
type: "number",
|
|
13463
|
+
min: "0",
|
|
13464
|
+
value: line.quantity,
|
|
13465
|
+
onChange: (e) => {
|
|
13466
|
+
const newLignes = [...formData.items ?? []];
|
|
13467
|
+
const quantity = parseFloat(e.target.value) || 0;
|
|
13468
|
+
newLignes[index].quantity = quantity;
|
|
13469
|
+
newLignes[index].total_price = quantity * (newLignes[index].unit_price || 0);
|
|
13470
|
+
setFormData({ ...formData, items: newLignes });
|
|
13471
|
+
},
|
|
13472
|
+
className: `w-full px-1 py-1 border rounded text-xs text-right ${errors[`line_${index}_quantity`] ? "border-red-500" : "border-[#d1d7de]"}`
|
|
13473
|
+
}
|
|
13474
|
+
) : /* @__PURE__ */ jsx46("div", { className: "text-xs font-medium", children: line.quantity.toLocaleString("fr-FR") }) }),
|
|
13475
|
+
/* @__PURE__ */ jsx46("td", { className: "border border-[#d1d7de] px-2 py-2 text-right", children: !readonly ? /* @__PURE__ */ jsx46(
|
|
13476
|
+
"input",
|
|
13477
|
+
{
|
|
13478
|
+
type: "number",
|
|
13479
|
+
min: "0",
|
|
13480
|
+
value: line.unit_price,
|
|
13481
|
+
onChange: (e) => {
|
|
13482
|
+
const newLignes = [...formData.items ?? []];
|
|
13483
|
+
const unitPrice = parseFloat(e.target.value) || 0;
|
|
13484
|
+
newLignes[index].unit_price = unitPrice;
|
|
13485
|
+
newLignes[index].total_price = (newLignes[index].quantity || 0) * unitPrice;
|
|
13486
|
+
setFormData({ ...formData, items: newLignes });
|
|
13487
|
+
},
|
|
13488
|
+
className: `w-full px-1 py-1 border rounded text-xs text-right ${errors[`line_${index}_price`] ? "border-red-500" : "border-[#d1d7de]"}`
|
|
13489
|
+
}
|
|
13490
|
+
) : /* @__PURE__ */ jsxs41("div", { className: "text-xs", children: [
|
|
13491
|
+
line.unit_price?.toFixed(2),
|
|
13492
|
+
" FCFA"
|
|
13493
|
+
] }) }),
|
|
13494
|
+
/* @__PURE__ */ jsx46("td", { className: "border border-[#d1d7de] px-2 py-2 text-right font-medium", children: /* @__PURE__ */ jsxs41("div", { className: "text-xs", children: [
|
|
13495
|
+
((line.quantity || 0) * (line.unit_price || 0)).toFixed(2),
|
|
13496
|
+
" FCFA"
|
|
13497
|
+
] }) }),
|
|
13498
|
+
/* @__PURE__ */ jsx46("td", { className: "border border-[#d1d7de] px-2 py-2", children: !readonly ? /* @__PURE__ */ jsx46(
|
|
13499
|
+
"textarea",
|
|
13500
|
+
{
|
|
13501
|
+
value: line.comments || "",
|
|
13502
|
+
onChange: (e) => {
|
|
13503
|
+
const newLignes = [...formData.items ?? []];
|
|
13504
|
+
newLignes[index].comments = e.target.value;
|
|
13505
|
+
setFormData({ ...formData, items: newLignes });
|
|
13506
|
+
},
|
|
13507
|
+
rows: 1,
|
|
13508
|
+
className: "w-full px-1 py-1 border border-[#d1d7de] rounded text-xs resize-none",
|
|
13509
|
+
placeholder: "Commentaires"
|
|
13510
|
+
}
|
|
13511
|
+
) : /* @__PURE__ */ jsx46("div", { className: "text-xs", children: line.comments || "-" }) }),
|
|
13512
|
+
!readonly && /* @__PURE__ */ jsx46("td", { className: "border border-[#d1d7de] px-2 py-2 text-center print:hidden", children: /* @__PURE__ */ jsx46(
|
|
13513
|
+
Buttons_default,
|
|
13514
|
+
{
|
|
13515
|
+
onClick: () => {
|
|
13516
|
+
const newItems = (formData.items ?? []).filter((_, i) => i !== index);
|
|
13517
|
+
setFormData({ ...formData, items: newItems });
|
|
13518
|
+
},
|
|
13519
|
+
children: /* @__PURE__ */ jsx46(Trash26, { className: "w-3 h-3" })
|
|
13520
|
+
}
|
|
13521
|
+
) })
|
|
13522
|
+
] }, line.id)) })
|
|
13523
|
+
] }) })
|
|
13524
|
+
] });
|
|
13525
|
+
default:
|
|
13526
|
+
return null;
|
|
13527
|
+
}
|
|
13528
|
+
};
|
|
13529
|
+
if (!isOpen) return null;
|
|
13530
|
+
return /* @__PURE__ */ jsxs41(
|
|
13531
|
+
Modals_default,
|
|
13532
|
+
{
|
|
13533
|
+
title: "Demande d'achat",
|
|
13534
|
+
width: "max-w-4xl",
|
|
13535
|
+
minContentHeight: "450px",
|
|
13536
|
+
description: ``,
|
|
13537
|
+
open: isOpen,
|
|
13538
|
+
onClose,
|
|
13539
|
+
children: [
|
|
13540
|
+
/* @__PURE__ */ jsx46("div", { className: "border-b border-gray-200", children: /* @__PURE__ */ jsx46("nav", { className: "flex space-x-8 px-6", children: tabs.map((tab) => {
|
|
13541
|
+
const Icon = tab.icon;
|
|
13542
|
+
return /* @__PURE__ */ jsxs41(
|
|
13543
|
+
"button",
|
|
13544
|
+
{
|
|
13545
|
+
type: "button",
|
|
13546
|
+
onClick: () => setActiveTab(tab.id),
|
|
13547
|
+
className: `
|
|
13548
|
+
flex items-center space-x-2 py-4 px-2 text-sm font-medium border-b-2 transition-colors
|
|
13549
|
+
${activeTab === tab.id ? "border-[#6A8A82] text-[#6A8A82]" : "border-transparent text-[#767676] hover:text-[#6A8A82] hover:border-[#6A8A82]/30"}
|
|
13550
|
+
`,
|
|
13551
|
+
children: [
|
|
13552
|
+
/* @__PURE__ */ jsx46(Icon, { className: "w-4 h-4 inline mr-2" }),
|
|
13553
|
+
/* @__PURE__ */ jsx46("span", { children: tab.label })
|
|
13554
|
+
]
|
|
13555
|
+
},
|
|
13556
|
+
tab.id
|
|
13557
|
+
);
|
|
13558
|
+
}) }) }),
|
|
13559
|
+
/* @__PURE__ */ jsxs41("form", { onSubmit: handleSubmit, className: "p-6", children: [
|
|
13560
|
+
renderTabContent(),
|
|
13561
|
+
/* @__PURE__ */ jsxs41("div", { className: "flex justify-between pt-6 border-t border-gray-200 mt-8", children: [
|
|
13562
|
+
/* @__PURE__ */ jsx46(
|
|
13563
|
+
"button",
|
|
13564
|
+
{
|
|
13565
|
+
type: "button",
|
|
13566
|
+
onClick: onClose,
|
|
13567
|
+
className: "px-6 py-2 border border-gray-300 text-gray-700 rounded-lg hover:bg-gray-50 transition-colors",
|
|
13568
|
+
children: "Annuler"
|
|
13569
|
+
}
|
|
13570
|
+
),
|
|
13571
|
+
/* @__PURE__ */ jsx46(
|
|
13572
|
+
Buttons_default,
|
|
13573
|
+
{
|
|
13574
|
+
type: "submit",
|
|
13575
|
+
disabled: loading,
|
|
13576
|
+
children: loading ? "chargement..." : "Enregistrer l'entit\xE9"
|
|
13577
|
+
}
|
|
13578
|
+
)
|
|
13579
|
+
] })
|
|
13580
|
+
] })
|
|
13581
|
+
]
|
|
13582
|
+
}
|
|
13583
|
+
);
|
|
13584
|
+
};
|
|
13585
|
+
|
|
13586
|
+
// src/pages/workspaces/PurchaseRequestsPage.tsx
|
|
13587
|
+
import { jsx as jsx47, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
13588
|
+
var PurchaseRequestsPage = () => {
|
|
13589
|
+
const [purchaseRequests, setPurchaseRequests] = useState31([]);
|
|
13590
|
+
const [loading, setLoading] = useState31(true);
|
|
13591
|
+
const [refreshToggle, setRefreshToggle] = useState31(false);
|
|
13592
|
+
const [showModal, setShowModal] = useState31(false);
|
|
13593
|
+
const [showModalRFQ, setShowModalRFQ] = useState31(false);
|
|
13594
|
+
const [showModalSourcing, setShowModalSourcing] = useState31(false);
|
|
13595
|
+
const [selectedPurchaseRequest, setSelectedPurchaseRequest] = useState31(null);
|
|
13596
|
+
const { token } = useSession();
|
|
13597
|
+
useEffect21(() => {
|
|
13598
|
+
}, []);
|
|
13599
|
+
const loadPurchaseRequests = async () => {
|
|
13600
|
+
setRefreshToggle((prev) => !prev);
|
|
13601
|
+
};
|
|
13602
|
+
const tabs = [
|
|
13603
|
+
{ id: "purchase_requests", label: "Demande d'achat", icon: ClipboardCheck },
|
|
13604
|
+
{ id: "my_gr_se", label: "My GR-SE", icon: ClipboardCheck }
|
|
13605
|
+
];
|
|
13606
|
+
const [activeTab, setActiveTab] = useState31("purchase_requests");
|
|
13607
|
+
return /* @__PURE__ */ jsxs42(
|
|
13608
|
+
Pages_default,
|
|
13609
|
+
{
|
|
13610
|
+
title: "Proculink",
|
|
13611
|
+
description: "G\xE9rez vos demandes d'achat",
|
|
13612
|
+
sideAction: /* @__PURE__ */ jsxs42(Buttons_default, { onClick: () => {
|
|
13613
|
+
setShowModal(true);
|
|
13614
|
+
setSelectedPurchaseRequest(null);
|
|
13615
|
+
}, children: [
|
|
13616
|
+
/* @__PURE__ */ jsx47(Plus11, { className: "h-4 w-4 mr-2" }),
|
|
13617
|
+
" Nouvelle demande"
|
|
13618
|
+
] }),
|
|
13619
|
+
tabs: /* @__PURE__ */ jsx47("nav", { className: "flex space-x-1 mt-4 overflow-x-auto", children: tabs.map((tab) => {
|
|
13620
|
+
const Icon = tab.icon;
|
|
13621
|
+
return /* @__PURE__ */ jsxs42(
|
|
13622
|
+
"button",
|
|
13623
|
+
{
|
|
13624
|
+
onClick: () => setActiveTab(tab.id),
|
|
13625
|
+
className: `px-4 py-2 text-sm rounded-lg transition-all whitespace-nowrap ${activeTab === tab.id ? "bg-[var(--color-primary)] text-white shadow-md" : "text-gray-600 hover:bg-gray-100"}`,
|
|
13626
|
+
children: [
|
|
13627
|
+
/* @__PURE__ */ jsx47(Icon, { className: "w-4 h-4 inline mr-2" }),
|
|
13628
|
+
tab.label
|
|
13629
|
+
]
|
|
13630
|
+
},
|
|
13631
|
+
tab.id
|
|
13632
|
+
);
|
|
13633
|
+
}) }),
|
|
13634
|
+
children: [
|
|
13635
|
+
activeTab === "purchase_requests" && /* @__PURE__ */ jsx47(
|
|
13636
|
+
FDrawer,
|
|
13637
|
+
{
|
|
13638
|
+
apiEndpoint: `/procurement/purchase-requests/myself/`,
|
|
13639
|
+
toggle: refreshToggle,
|
|
13640
|
+
columns: [
|
|
13641
|
+
{ key: "request_number", label: "N\xB0 DA", type: "text", filterable: true, sortable: true, search_name: "request_number" },
|
|
13642
|
+
{ key: "requested_by_user", label: "Demandeur", type: "text", filterable: true, sortable: false, search_name: "requester__last_name" },
|
|
13643
|
+
{ key: "title", label: "Titre", type: "text", filterable: true, sortable: true, search_name: "title" },
|
|
13644
|
+
{ key: "amount", label: "Montant", type: "number", filterable: true, sortable: true, search_name: "amount" },
|
|
13645
|
+
{ key: "vendor", label: "Fournisseur", type: "text", filterable: true, sortable: true, search_name: "vendor", formule: (item) => item.vendor_info?.legal_name ?? "" },
|
|
13646
|
+
{ key: "created_at", label: "Date de cr\xE9ation", type: "date", filterable: true, sortable: true, search_name: "created_at" },
|
|
13647
|
+
{ key: "status", label: "Statut", type: "text", filterable: true, sortable: true, search_name: "status" },
|
|
13648
|
+
{
|
|
13649
|
+
key: "sourcing_id",
|
|
13650
|
+
label: "Sourcing",
|
|
13651
|
+
type: "text",
|
|
13652
|
+
filterable: true,
|
|
13653
|
+
sortable: false,
|
|
13654
|
+
search_name: "sourcing_id",
|
|
13655
|
+
formule: (item) => {
|
|
13656
|
+
if (item.sourcing_id) {
|
|
13657
|
+
return /* @__PURE__ */ jsx47("span", { className: "bg-secondary text-[13px] text-primary px-4 py-1 rounded-[4px]", onClick: () => {
|
|
13658
|
+
}, children: "SSJ" });
|
|
13659
|
+
}
|
|
13660
|
+
if (item.rfq) {
|
|
13661
|
+
return /* @__PURE__ */ jsx47(
|
|
13662
|
+
"span",
|
|
13663
|
+
{
|
|
13664
|
+
className: "bg-secondary text-[13px] text-primary px-4 py-1 rounded-[4px]",
|
|
13665
|
+
onClick: () => {
|
|
13666
|
+
setSelectedPurchaseRequest(item);
|
|
13667
|
+
setShowModalRFQ(true);
|
|
13668
|
+
},
|
|
13669
|
+
children: "appel d'offre"
|
|
13670
|
+
}
|
|
13671
|
+
);
|
|
13672
|
+
}
|
|
13673
|
+
return "N/A";
|
|
13674
|
+
}
|
|
13675
|
+
},
|
|
13676
|
+
{
|
|
13677
|
+
key: "approval_status",
|
|
13678
|
+
label: "",
|
|
13679
|
+
type: "custom",
|
|
13680
|
+
filterable: true,
|
|
13681
|
+
sortable: false,
|
|
13682
|
+
search_name: "approval_status",
|
|
13683
|
+
formule: (item) => {
|
|
13684
|
+
return /* @__PURE__ */ jsx47(
|
|
13685
|
+
ApprovalWorkflow_default,
|
|
13686
|
+
{
|
|
13687
|
+
title: `Approbation de la demande d'achat ${item.request_number} ${item.title}`,
|
|
13688
|
+
process: "PCR-PR",
|
|
13689
|
+
object_id: item.id,
|
|
13690
|
+
CustomBtn: (props) => /* @__PURE__ */ jsx47(Buttons_default, { className: "rounded-[6px] bg-gray-500 p-1 text-white", ...props, children: /* @__PURE__ */ jsx47(ClipboardCheck, {}) }),
|
|
13691
|
+
readOnly: false
|
|
13692
|
+
}
|
|
13693
|
+
);
|
|
13694
|
+
}
|
|
13695
|
+
}
|
|
13696
|
+
],
|
|
13697
|
+
actions: [
|
|
13698
|
+
{
|
|
13699
|
+
label: "Modifier",
|
|
13700
|
+
permission: "edit_user",
|
|
13701
|
+
onclick: (item) => {
|
|
13702
|
+
setSelectedPurchaseRequest(item);
|
|
13703
|
+
setShowModal(true);
|
|
13704
|
+
}
|
|
13705
|
+
},
|
|
13706
|
+
{ label: "Supprimer", permission: "delete_user", onclick: (item) => {
|
|
13707
|
+
} }
|
|
13708
|
+
],
|
|
13709
|
+
ordering: "title"
|
|
13710
|
+
}
|
|
13711
|
+
),
|
|
13712
|
+
activeTab === "my_gr_se" && /* @__PURE__ */ jsx47(
|
|
13713
|
+
FDrawer,
|
|
13714
|
+
{
|
|
13715
|
+
apiEndpoint: `/procurement/receipts/search/`,
|
|
13716
|
+
columns: [
|
|
13717
|
+
{ key: "created_at", label: "Date de cr\xE9ation", type: "date", filterable: true, sortable: true, search_name: "created_at" },
|
|
13718
|
+
{ key: "receipt_number", label: "N\xB0 R\xE9ception", type: "text", filterable: true, sortable: false, search_name: "receipt_number" },
|
|
13719
|
+
{ key: "type_of_receipt", label: "Type", type: "text", filterable: true, sortable: false, search_name: "type_of_receipt" },
|
|
13720
|
+
{
|
|
13721
|
+
key: "purchase_order",
|
|
13722
|
+
label: "N\xB0 Commande",
|
|
13723
|
+
type: "text",
|
|
13724
|
+
filterable: true,
|
|
13725
|
+
sortable: false,
|
|
13726
|
+
search_name: "purchase_order__quote_number",
|
|
13727
|
+
formule: (item) => item.purchase_order_info?.quote_number ?? "-"
|
|
13728
|
+
},
|
|
13729
|
+
{
|
|
13730
|
+
key: "vendor",
|
|
13731
|
+
label: "Fournisseur",
|
|
13732
|
+
type: "text",
|
|
13733
|
+
filterable: true,
|
|
13734
|
+
sortable: false,
|
|
13735
|
+
search_name: "purchase_order__vendor__legal_name",
|
|
13736
|
+
formule: (item) => item.purchase_order_info?.vendor_info?.legal_name ?? "-"
|
|
13737
|
+
},
|
|
13738
|
+
{ key: "received_at", label: "Date de r\xE9ception", type: "date", filterable: true, sortable: true, search_name: "received_at" },
|
|
13739
|
+
{ key: "receipt_address", label: "Lieu", type: "text", filterable: true, sortable: false, search_name: "receipt_address" },
|
|
13740
|
+
{
|
|
13741
|
+
key: "approval_status",
|
|
13742
|
+
label: "",
|
|
13743
|
+
type: "custom",
|
|
13744
|
+
filterable: true,
|
|
13745
|
+
sortable: false,
|
|
13746
|
+
search_name: "approval_status",
|
|
13747
|
+
formule: (item) => {
|
|
13748
|
+
return /* @__PURE__ */ jsx47(
|
|
13749
|
+
ApprovalWorkflow_default,
|
|
13750
|
+
{
|
|
13751
|
+
title: `Approbation de la reception ${item.receipt_number} ${item.purchase_order_info.quote_number}`,
|
|
13752
|
+
process: "PCR-RCPT",
|
|
13753
|
+
object_id: item.id,
|
|
13754
|
+
CustomBtn: (props) => /* @__PURE__ */ jsx47(Buttons_default, { className: "rounded-[6px] bg-gray-500 p-1 text-white", ...props, children: /* @__PURE__ */ jsx47(ClipboardCheck, {}) }),
|
|
13755
|
+
readOnly: false
|
|
13756
|
+
}
|
|
13757
|
+
);
|
|
13758
|
+
}
|
|
13759
|
+
},
|
|
13760
|
+
{ key: "status", label: "Statut", type: "text", filterable: true, sortable: false, search_name: "status" }
|
|
13761
|
+
],
|
|
13762
|
+
actions: [],
|
|
13763
|
+
ordering: "received_at"
|
|
13764
|
+
}
|
|
13765
|
+
),
|
|
13766
|
+
/* @__PURE__ */ jsx47(
|
|
13767
|
+
FormPurchaseRequest,
|
|
13768
|
+
{
|
|
13769
|
+
isOpen: showModal,
|
|
13770
|
+
onClose: () => setShowModal(false),
|
|
13771
|
+
refresh: loadPurchaseRequests,
|
|
13772
|
+
object: selectedPurchaseRequest
|
|
13773
|
+
},
|
|
13774
|
+
`PRFORM-${selectedPurchaseRequest?.id}`
|
|
13775
|
+
)
|
|
13776
|
+
]
|
|
13777
|
+
}
|
|
13778
|
+
);
|
|
13779
|
+
};
|
|
13780
|
+
|
|
13781
|
+
// src/App.tsx
|
|
13782
|
+
import { Routes, Route, BrowserRouter } from "react-router-dom";
|
|
13783
|
+
|
|
13784
|
+
// src/pages/Home.tsx
|
|
13785
|
+
import { useState as useState32 } from "react";
|
|
13786
|
+
import { useNavigate as useNavigate3 } from "react-router-dom";
|
|
13787
|
+
import {
|
|
13788
|
+
Zap as Zap2,
|
|
13789
|
+
Users as Users10,
|
|
13790
|
+
ArrowRight as ArrowRight5,
|
|
13791
|
+
Sparkles,
|
|
13792
|
+
TrendingUp as TrendingUp5,
|
|
13793
|
+
LogIn,
|
|
13794
|
+
UserPlus as UserPlus2,
|
|
13795
|
+
Play,
|
|
13796
|
+
Star as Star2,
|
|
13797
|
+
Quote,
|
|
13798
|
+
Monitor,
|
|
13799
|
+
Smartphone,
|
|
13800
|
+
Cloud,
|
|
13801
|
+
Lock as Lock2,
|
|
13802
|
+
RefreshCw as RefreshCw9,
|
|
13803
|
+
Headphones,
|
|
13804
|
+
Check as Check3,
|
|
13805
|
+
Mail as Mail3,
|
|
13806
|
+
Phone as Phone4,
|
|
13807
|
+
MapPin as MapPin6,
|
|
13808
|
+
Linkedin,
|
|
13809
|
+
Twitter,
|
|
13810
|
+
Github,
|
|
13811
|
+
ChevronDown as ChevronDown5
|
|
13812
|
+
} from "lucide-react";
|
|
13813
|
+
import { jsx as jsx48, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
13814
|
+
|
|
13815
|
+
// src/pages/auth/Login.tsx
|
|
13816
|
+
import { useState as useState33 } from "react";
|
|
13817
|
+
import { Eye as Eye5, EyeOff as EyeOff3 } from "lucide-react";
|
|
13818
|
+
import { useNavigate as useNavigate4 } from "react-router-dom";
|
|
13819
|
+
import { jsx as jsx49, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
13820
|
+
|
|
13821
|
+
// src/pages/auth/Register.tsx
|
|
13822
|
+
import { useState as useState34 } from "react";
|
|
13823
|
+
import { Eye as Eye6, EyeOff as EyeOff4 } from "lucide-react";
|
|
13824
|
+
import { useNavigate as useNavigate5 } from "react-router-dom";
|
|
13825
|
+
import { jsx as jsx50, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
13826
|
+
|
|
13827
|
+
// src/pages/Dashboard.tsx
|
|
13828
|
+
import { useEffect as useEffect22 } from "react";
|
|
13829
|
+
import { useNavigate as useNavigate6 } from "react-router-dom";
|
|
13830
|
+
import {
|
|
13831
|
+
FileText as FileText12,
|
|
13832
|
+
CheckCircle as CheckCircle5,
|
|
13833
|
+
Receipt as Receipt2,
|
|
13834
|
+
Users as Users11,
|
|
13835
|
+
TrendingUp as TrendingUp6,
|
|
13836
|
+
TrendingDown as TrendingDown3,
|
|
13837
|
+
Clock as Clock8,
|
|
13838
|
+
ArrowRight as ArrowRight6,
|
|
13839
|
+
ShoppingCart as ShoppingCart3,
|
|
13840
|
+
Calculator as Calculator3,
|
|
13841
|
+
Briefcase as Briefcase2,
|
|
13842
|
+
UserCheck
|
|
13843
|
+
} from "lucide-react";
|
|
13844
|
+
import { jsx as jsx51, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
13845
|
+
|
|
13846
|
+
// src/pages/Analytics.tsx
|
|
13847
|
+
import { BarChart3 as BarChart33, TrendingUp as TrendingUp7, Users as Users12, Clock as Clock9 } from "lucide-react";
|
|
13848
|
+
import { jsx as jsx52, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
13849
|
+
|
|
13850
|
+
// src/pages/Team.tsx
|
|
13851
|
+
import { useState as useState35 } from "react";
|
|
13852
|
+
import { Plus as Plus12, Search as Search7, Filter as Filter4, MoreVertical as MoreVertical4, Mail as Mail4, Phone as Phone5, MapPin as MapPin7 } from "lucide-react";
|
|
13853
|
+
import { jsx as jsx53, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
13854
|
+
|
|
13855
|
+
// src/pages/Profile.tsx
|
|
13856
|
+
import { useState as useState36, useEffect as useEffect23 } from "react";
|
|
13857
|
+
import { Camera as Camera2, Mail as Mail5, Phone as Phone6, Calendar as Calendar7, Edit3 as Edit34, Save as Save2, X as X11, User as UserIcon2 } from "lucide-react";
|
|
13858
|
+
import { jsx as jsx54, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
13859
|
+
|
|
13860
|
+
// src/pages/Settings.tsx
|
|
13861
|
+
import { useState as useState37 } from "react";
|
|
13862
|
+
import {
|
|
13863
|
+
Bell as Bell2,
|
|
13864
|
+
Shield as Shield3,
|
|
13865
|
+
Palette as Palette2,
|
|
13866
|
+
Monitor as Monitor2,
|
|
13867
|
+
Moon,
|
|
13868
|
+
Sun,
|
|
13869
|
+
Eye as Eye7,
|
|
13870
|
+
Key,
|
|
13871
|
+
Trash2 as Trash27,
|
|
13872
|
+
Save as Save3,
|
|
13873
|
+
AlertTriangle as AlertTriangle7
|
|
13874
|
+
} from "lucide-react";
|
|
13875
|
+
import { jsx as jsx55, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
13876
|
+
|
|
13877
|
+
// src/pages/CreateOrganization.tsx
|
|
13878
|
+
import { useEffect as useEffect24, useState as useState38 } from "react";
|
|
13879
|
+
import { useNavigate as useNavigate7, useParams as useParams2 } from "react-router-dom";
|
|
13880
|
+
import { ArrowLeft, Loader2 as Loader25 } from "lucide-react";
|
|
13881
|
+
|
|
13882
|
+
// src/services/OrganizationServices.ts
|
|
13883
|
+
var ORGANIZATIONS_API_URL = `${API_URL}/core/organizations/`;
|
|
13884
|
+
var ENTITIES_API_URL = `${API_URL}/core/entities/`;
|
|
13885
|
+
|
|
13886
|
+
// src/pages/CreateOrganization.tsx
|
|
13887
|
+
import { jsx as jsx56, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
13888
|
+
|
|
13889
|
+
// src/pages/organizations/ListOrganizations.tsx
|
|
13890
|
+
import { useState as useState39, useEffect as useEffect25 } from "react";
|
|
13891
|
+
import { useNavigate as useNavigate8 } from "react-router-dom";
|
|
13892
|
+
import {
|
|
13893
|
+
Building2 as Building28,
|
|
13894
|
+
Plus as Plus13,
|
|
13895
|
+
Search as Search8,
|
|
13896
|
+
MoreVertical as MoreVertical5,
|
|
13897
|
+
Edit as Edit2,
|
|
13898
|
+
Trash2 as Trash28,
|
|
13899
|
+
Eye as Eye8,
|
|
13900
|
+
Phone as Phone7,
|
|
13901
|
+
Mail as Mail6,
|
|
13902
|
+
MapPin as MapPin9,
|
|
13903
|
+
Calendar as Calendar8
|
|
13904
|
+
} from "lucide-react";
|
|
13905
|
+
import { jsx as jsx57, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
13906
|
+
|
|
13907
|
+
// src/pages/organizations/DetailOrganizations.tsx
|
|
13908
|
+
import { useState as useState41, useEffect as useEffect27 } from "react";
|
|
13909
|
+
import { useParams as useParams3, useNavigate as useNavigate10 } from "react-router-dom";
|
|
13910
|
+
import {
|
|
13911
|
+
ArrowLeft as ArrowLeft2,
|
|
13912
|
+
Building2 as Building29,
|
|
13913
|
+
Edit as Edit4,
|
|
13914
|
+
Trash2 as Trash29,
|
|
13915
|
+
Plus as Plus14,
|
|
13916
|
+
MapPin as MapPin10,
|
|
13917
|
+
Eye as Eye9,
|
|
13918
|
+
CreditCard as CreditCard5,
|
|
13919
|
+
FileText as FileText13,
|
|
13920
|
+
MoreVertical as MoreVertical6,
|
|
13921
|
+
X as X13,
|
|
13922
|
+
Save as Save4,
|
|
13923
|
+
Loader2 as Loader26
|
|
13924
|
+
} from "lucide-react";
|
|
13925
|
+
|
|
13926
|
+
// src/pages/pricings/ListPricing.tsx
|
|
13927
|
+
import { useState as useState40 } from "react";
|
|
13928
|
+
import { useNavigate as useNavigate9 } from "react-router-dom";
|
|
13929
|
+
import {
|
|
13930
|
+
Check as Check4,
|
|
13931
|
+
X as X12
|
|
13932
|
+
} from "lucide-react";
|
|
13933
|
+
import { Fragment as Fragment12, jsx as jsx58, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
13934
|
+
|
|
13935
|
+
// src/services/PlanSubscriptionServices.tsx
|
|
13936
|
+
var MODULES_API_URL = `${API_URL}/core/modules/`;
|
|
13937
|
+
var PLANS_API_URL = `${API_URL}/core/plans/`;
|
|
13938
|
+
|
|
13939
|
+
// src/pages/organizations/DetailOrganizations.tsx
|
|
13940
|
+
import { Fragment as Fragment13, jsx as jsx59, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
13941
|
+
|
|
13942
|
+
// src/pages/organizations/DetailEntity.tsx
|
|
13943
|
+
import { useState as useState43, useEffect as useEffect29 } from "react";
|
|
13944
|
+
import { useNavigate as useNavigate11, useParams as useParams4 } from "react-router-dom";
|
|
13945
|
+
import { Building2 as Building211, CreditCard as CreditCard6, FileText as FileText14, MapPin as MapPin11, User as UserIcon4 } from "lucide-react";
|
|
13946
|
+
|
|
13947
|
+
// src/forms/UserForm.tsx
|
|
13948
|
+
import { useState as useState42, useEffect as useEffect28 } from "react";
|
|
13949
|
+
|
|
13950
|
+
// src/services/AuthorizationService.ts
|
|
13951
|
+
var API_BASE_URL3 = `${API_URL}/core/permissions`;
|
|
13952
|
+
|
|
13953
|
+
// src/forms/UserForm.tsx
|
|
13954
|
+
import { Building2 as Building210, User as UserIcon3, X as X14 } from "lucide-react";
|
|
13955
|
+
import { Fragment as Fragment14, jsx as jsx60, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
13956
|
+
|
|
13957
|
+
// src/pages/organizations/DetailEntity.tsx
|
|
13958
|
+
import { jsx as jsx61, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
13959
|
+
|
|
13960
|
+
// src/pages/pricings/CartPlan.tsx
|
|
13961
|
+
import { useState as useState44, useEffect as useEffect30 } from "react";
|
|
13962
|
+
import { useNavigate as useNavigate12, useSearchParams as useSearchParams3 } from "react-router-dom";
|
|
13963
|
+
import {
|
|
13964
|
+
Check as Check5,
|
|
13965
|
+
Plus as Plus15,
|
|
13966
|
+
ArrowLeft as ArrowLeft3,
|
|
13967
|
+
CreditCard as CreditCard7,
|
|
13968
|
+
Shield as Shield5,
|
|
13969
|
+
Clock as Clock10,
|
|
13970
|
+
Users as Users13,
|
|
13971
|
+
Zap as Zap3,
|
|
13972
|
+
Trash2 as Trash210
|
|
13973
|
+
} from "lucide-react";
|
|
13974
|
+
import { Fragment as Fragment15, jsx as jsx62, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
13975
|
+
|
|
13976
|
+
// src/App.tsx
|
|
13977
|
+
import {
|
|
13978
|
+
LayoutDashboard as LayoutDashboard2,
|
|
13979
|
+
FileText as FileText17,
|
|
13980
|
+
Users as Users17,
|
|
13981
|
+
TrendingUp as TrendingUp8,
|
|
13982
|
+
Calculator as Calculator4,
|
|
13983
|
+
Briefcase as Briefcase5,
|
|
13984
|
+
UserCheck as UserCheck3,
|
|
13985
|
+
Workflow,
|
|
13986
|
+
Eye as Eye11,
|
|
13987
|
+
HomeIcon,
|
|
13988
|
+
SettingsIcon,
|
|
13989
|
+
MessageCircle as MessageCircle2,
|
|
13990
|
+
CircleDollarSign as CircleDollarSign2,
|
|
13991
|
+
Calendar as Calendar10,
|
|
13992
|
+
UserCog as UserCog2,
|
|
13993
|
+
Building2 as Building220,
|
|
13994
|
+
CalendarClock as CalendarClock2
|
|
13995
|
+
} from "lucide-react";
|
|
13996
|
+
|
|
13997
|
+
// src/pages/auth/ForgotPassword.tsx
|
|
13998
|
+
import { useState as useState45 } from "react";
|
|
13999
|
+
import { useNavigate as useNavigate13 } from "react-router-dom";
|
|
14000
|
+
import { Mail as Mail7, CheckCircle as CheckCircle6 } from "lucide-react";
|
|
14001
|
+
import { jsx as jsx63, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
14002
|
+
|
|
14003
|
+
// src/pages/auth/ResetPassword.tsx
|
|
14004
|
+
import { useState as useState46 } from "react";
|
|
14005
|
+
import { useNavigate as useNavigate14, useParams as useParams5 } from "react-router-dom";
|
|
14006
|
+
import { Lock as Lock4, CheckCircle as CheckCircle7 } from "lucide-react";
|
|
14007
|
+
import { jsx as jsx64, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
14008
|
+
|
|
14009
|
+
// src/pages/auth/RespondInvitationEmail.tsx
|
|
14010
|
+
import { useState as useState47, useEffect as useEffect31 } from "react";
|
|
14011
|
+
import { useNavigate as useNavigate15, useSearchParams as useSearchParams4 } from "react-router-dom";
|
|
14012
|
+
import { Building2 as Building213, User as UserIcon5, Mail as Mail8, CheckCircle as CheckCircle8, XCircle as XCircle3 } from "lucide-react";
|
|
14013
|
+
import { jsx as jsx65, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
14014
|
+
|
|
14015
|
+
// src/pages/parameters/ProfitCostCenterPage.tsx
|
|
14016
|
+
import { useState as useState48, useEffect as useEffect32 } from "react";
|
|
14017
|
+
import { useNavigate as useNavigate16 } from "react-router-dom";
|
|
14018
|
+
import {
|
|
14019
|
+
Plus as Plus16,
|
|
14020
|
+
Edit as Edit5,
|
|
14021
|
+
Trash2 as Trash211
|
|
14022
|
+
} from "lucide-react";
|
|
14023
|
+
import { Fragment as Fragment16, jsx as jsx66, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
14024
|
+
|
|
14025
|
+
// src/pages/parameters/ParametersPage.tsx
|
|
14026
|
+
import { useNavigate as useNavigate17 } from "react-router-dom";
|
|
14027
|
+
import {
|
|
14028
|
+
Settings as Settings4,
|
|
14029
|
+
Building2 as Building215,
|
|
14030
|
+
Users as Users14,
|
|
14031
|
+
DollarSign as DollarSign2,
|
|
14032
|
+
FileText as FileText15,
|
|
14033
|
+
Shield as Shield6,
|
|
14034
|
+
Bell as Bell3,
|
|
14035
|
+
Palette as Palette3,
|
|
14036
|
+
Globe as Globe2,
|
|
14037
|
+
Database,
|
|
14038
|
+
ArrowRight as ArrowRight7,
|
|
14039
|
+
Briefcase as Briefcase3
|
|
14040
|
+
} from "lucide-react";
|
|
14041
|
+
import { jsx as jsx67, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
14042
|
+
|
|
14043
|
+
// src/pages/users/UsersPage.tsx
|
|
14044
|
+
import { useState as useState49, useEffect as useEffect33 } from "react";
|
|
14045
|
+
import {
|
|
14046
|
+
Users as Users15,
|
|
14047
|
+
UserPlus as UserPlus3,
|
|
14048
|
+
Shield as Shield7,
|
|
14049
|
+
Key as Key2,
|
|
14050
|
+
Trash2 as Trash212,
|
|
14051
|
+
CheckCircle as CheckCircle9,
|
|
14052
|
+
XCircle as XCircle4,
|
|
14053
|
+
AlertTriangle as AlertTriangle8,
|
|
14054
|
+
Download as Download5,
|
|
14055
|
+
UserCheck as UserCheck2,
|
|
14056
|
+
UserX,
|
|
14057
|
+
Clock as Clock11,
|
|
14058
|
+
Activity as Activity2,
|
|
14059
|
+
Briefcase as Briefcase4,
|
|
14060
|
+
Plus as Plus17,
|
|
14061
|
+
Edit as Edit6,
|
|
14062
|
+
Loader2 as Loader27
|
|
14063
|
+
} from "lucide-react";
|
|
14064
|
+
import { Fragment as Fragment17, jsx as jsx68, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
14065
|
+
|
|
14066
|
+
// src/pages/onboarding/OnboardingWizard.tsx
|
|
14067
|
+
import { useState as useState53, useEffect as useEffect35 } from "react";
|
|
14068
|
+
import { useNavigate as useNavigate18 } from "react-router-dom";
|
|
14069
|
+
import { X as X16 } from "lucide-react";
|
|
14070
|
+
|
|
14071
|
+
// src/pages/onboarding/components/StepIndicator.tsx
|
|
14072
|
+
import React46 from "react";
|
|
14073
|
+
import { Check as Check6 } from "lucide-react";
|
|
14074
|
+
import { jsx as jsx69, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
14075
|
+
|
|
14076
|
+
// src/pages/onboarding/steps/WelcomeStep.tsx
|
|
14077
|
+
import { Building2 as Building216, Users as Users16, FileCheck as FileCheck2, ArrowRight as ArrowRight8 } from "lucide-react";
|
|
14078
|
+
import { jsx as jsx70, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
14079
|
+
|
|
14080
|
+
// src/pages/onboarding/steps/OrganizationStep.tsx
|
|
14081
|
+
import { useState as useState50 } from "react";
|
|
14082
|
+
import { Building2 as Building217, ArrowLeft as ArrowLeft4, ArrowRight as ArrowRight9, Loader2 as Loader28 } from "lucide-react";
|
|
14083
|
+
import { Fragment as Fragment18, jsx as jsx71, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
14084
|
+
|
|
14085
|
+
// src/pages/onboarding/steps/EntityStep.tsx
|
|
14086
|
+
import { useState as useState51 } from "react";
|
|
14087
|
+
import { Store, ArrowLeft as ArrowLeft5, ArrowRight as ArrowRight10, Loader2 as Loader29, MapPin as MapPin13 } from "lucide-react";
|
|
14088
|
+
import { Fragment as Fragment19, jsx as jsx72, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
14089
|
+
|
|
14090
|
+
// src/pages/onboarding/steps/ConfirmationStep.tsx
|
|
14091
|
+
import { useEffect as useEffect34, useState as useState52 } from "react";
|
|
14092
|
+
import { CheckCircle as CheckCircle10, Building2 as Building218, Store as Store2, ArrowRight as ArrowRight11, Sparkles as Sparkles3 } from "lucide-react";
|
|
14093
|
+
import { jsx as jsx73, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
14094
|
+
|
|
14095
|
+
// src/pages/onboarding/OnboardingWizard.tsx
|
|
14096
|
+
import { jsx as jsx74, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
14097
|
+
|
|
14098
|
+
// src/pages/parameters/CrmParametersPage.tsx
|
|
14099
|
+
import { useState as useState54, useEffect as useEffect36 } from "react";
|
|
14100
|
+
import {
|
|
14101
|
+
Plus as Plus18,
|
|
14102
|
+
Edit as Edit7,
|
|
14103
|
+
Trash2 as Trash213
|
|
14104
|
+
} from "lucide-react";
|
|
14105
|
+
|
|
14106
|
+
// src/services/CrmServices.ts
|
|
14107
|
+
var TARGET_RETAILER_URI = `${API_URL}/crm/target-retailers/`;
|
|
14108
|
+
var DAS_URI = `${API_URL}/crm/das/`;
|
|
14109
|
+
var OTHER_COST_URI = `${API_URL}/crm/other-costs/`;
|
|
14110
|
+
var LEAD_NEED_URI = `${API_URL}/crm/lead-needs/`;
|
|
14111
|
+
|
|
14112
|
+
// src/pages/parameters/CrmParametersPage.tsx
|
|
14113
|
+
import { Fragment as Fragment20, jsx as jsx75, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
14114
|
+
|
|
14115
|
+
// src/pages/organizations/EntitiesPage.tsx
|
|
14116
|
+
import { useState as useState55 } from "react";
|
|
14117
|
+
import {
|
|
14118
|
+
Building2 as Building219,
|
|
14119
|
+
Plus as Plus19,
|
|
14120
|
+
MapPin as MapPin14,
|
|
14121
|
+
CreditCard as CreditCard8,
|
|
14122
|
+
FileText as FileText16,
|
|
14123
|
+
Building
|
|
14124
|
+
} from "lucide-react";
|
|
14125
|
+
import { jsx as jsx76, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
14126
|
+
|
|
14127
|
+
// src/App.tsx
|
|
14128
|
+
import { jsx as jsx77, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
14129
|
+
var WorkSpaceRoutes = ({ module_name = "Rewise", module_description = "" }) => {
|
|
14130
|
+
const { showAuthModal, setShowAuthModal } = useSession();
|
|
14131
|
+
const primaryMenuItems = [
|
|
14132
|
+
{ id: "home", label: "Home", path: "/workspace/", icon: /* @__PURE__ */ jsx77(HomeIcon, { className: "w-4 h-4" }) },
|
|
14133
|
+
{ id: "task-pilot", label: "Task Pilot", path: "/workspace/task-pilot", icon: /* @__PURE__ */ jsx77(Workflow, { className: "w-4 h-4" }) },
|
|
14134
|
+
{ id: "proculink", label: "ProcuLink", path: "/workspace/proculink", icon: /* @__PURE__ */ jsx77(TrendingUp8, { className: "w-4 h-4" }) },
|
|
14135
|
+
{ id: "fixitnow", label: "Fix It Now", path: "/workspace/fix-it-now", icon: /* @__PURE__ */ jsx77(SettingsIcon, { className: "w-4 h-4" }) },
|
|
14136
|
+
{ id: "hr-connect", label: "HR Connect", path: "/workspace/hr-connect", icon: /* @__PURE__ */ jsx77(UserCog2, { className: "w-4 h-4" }) },
|
|
14137
|
+
{ id: "meeting-hub", label: "Meeting Hub", path: "/workspace/meeting-hub", icon: /* @__PURE__ */ jsx77(Calendar10, { className: "w-4 h-4" }) },
|
|
14138
|
+
{ id: "budget", label: "Budget", icon: /* @__PURE__ */ jsx77(CircleDollarSign2, { className: "w-4 h-4" }) },
|
|
14139
|
+
{ id: "chat-equipe", label: "Chat Equipe", path: "/workspace/chat-equipe", icon: /* @__PURE__ */ jsx77(MessageCircle2, { className: "w-4 h-4" }) },
|
|
14140
|
+
{ id: "actifs", label: "Actifs", path: "/workspace/actifs", icon: /* @__PURE__ */ jsx77(Building220, { className: "w-4 h-4" }) },
|
|
14141
|
+
{ id: "planning", label: "Planning", path: "/workspace/planning", icon: /* @__PURE__ */ jsx77(CalendarClock2, { className: "w-4 h-4" }) }
|
|
14142
|
+
];
|
|
14143
|
+
const secondaryMenuItems = {
|
|
14144
|
+
budget: [
|
|
14145
|
+
{ id: "opex", label: "OPEX", path: "budget/opex", icon: /* @__PURE__ */ jsx77(Eye11, { className: "w-4 h-4" }) },
|
|
14146
|
+
{ id: "capex", label: "CAPEX", path: "budget/capex", icon: /* @__PURE__ */ jsx77(Eye11, { className: "w-4 h-4" }) },
|
|
14147
|
+
{ id: "car", label: "CAR", path: "budget/car", icon: /* @__PURE__ */ jsx77(Eye11, { className: "w-4 h-4" }) }
|
|
14148
|
+
]
|
|
14149
|
+
};
|
|
14150
|
+
return /* @__PURE__ */ jsx77(ModernDoubleSidebarLayout_default, { module_name, module_description, primaryMenuItems, secondaryMenuItems, children: /* @__PURE__ */ jsxs72(Routes, { children: [
|
|
14151
|
+
/* @__PURE__ */ jsx77(Route, { path: "workspace", element: /* @__PURE__ */ jsx77(WorkSpace_default, {}) }),
|
|
14152
|
+
/* @__PURE__ */ jsx77(Route, { path: "task-pilot", element: /* @__PURE__ */ jsx77(TaskPilot_default, {}) }),
|
|
14153
|
+
/* @__PURE__ */ jsx77(Route, { path: "proculink", element: /* @__PURE__ */ jsx77(PurchaseRequestsPage, {}) }),
|
|
14154
|
+
/* @__PURE__ */ jsx77(Route, { path: "hr-connect", element: /* @__PURE__ */ jsx77(HRConnectPage_default, {}) }),
|
|
14155
|
+
/* @__PURE__ */ jsx77(Route, { path: "meeting-hub", element: /* @__PURE__ */ jsx77(MeetingHubPage_default, {}) }),
|
|
14156
|
+
/* @__PURE__ */ jsx77(Route, { path: "budget/*", element: /* @__PURE__ */ jsx77(BudgetPage_default, {}) }),
|
|
14157
|
+
/* @__PURE__ */ jsx77(Route, { path: "chat-equipe", element: /* @__PURE__ */ jsx77(ChatEquipePage_default, {}) }),
|
|
14158
|
+
/* @__PURE__ */ jsx77(Route, { path: "actifs", element: /* @__PURE__ */ jsx77(ActifsPage_default, {}) }),
|
|
14159
|
+
/* @__PURE__ */ jsx77(Route, { path: "planning", element: /* @__PURE__ */ jsx77(PlanningPage_default, {}) })
|
|
14160
|
+
] }) });
|
|
14161
|
+
};
|
|
11851
14162
|
export {
|
|
11852
14163
|
ACCOUNT_TYPE_LABELS,
|
|
11853
14164
|
AccountServices,
|
|
11854
14165
|
AccountingWorkspace_default as AccountingWorkspace,
|
|
14166
|
+
ActifsPage_default as ActifsPage,
|
|
11855
14167
|
Alert_default as Alert,
|
|
11856
14168
|
AlertProvider,
|
|
11857
14169
|
ApprovalAnswerModal,
|
|
@@ -11861,9 +14173,11 @@ export {
|
|
|
11861
14173
|
ApprovalWorkflow_default as ApprovalWorkflow,
|
|
11862
14174
|
AuthServices,
|
|
11863
14175
|
BALANCE_TYPE_LABELS,
|
|
14176
|
+
BudgetPage_default as BudgetPage,
|
|
11864
14177
|
Choices_default as CHOICES,
|
|
11865
14178
|
CardBody,
|
|
11866
14179
|
CardHeader,
|
|
14180
|
+
ChatEquipePage_default as ChatEquipePage,
|
|
11867
14181
|
ClientServices,
|
|
11868
14182
|
CountrySelector,
|
|
11869
14183
|
CrmWorkspace_default as CrmWorkspace,
|
|
@@ -11882,10 +14196,12 @@ export {
|
|
|
11882
14196
|
ForeignCurrencySelector,
|
|
11883
14197
|
FormClient,
|
|
11884
14198
|
FormVendor,
|
|
14199
|
+
HRConnectPage_default as HRConnectPage,
|
|
11885
14200
|
InfoBox,
|
|
11886
14201
|
InputField,
|
|
11887
14202
|
InvoiceTypeSelector,
|
|
11888
14203
|
LegalFormSelector,
|
|
14204
|
+
MeetingHubPage_default as MeetingHubPage,
|
|
11889
14205
|
MinimalVendorForm,
|
|
11890
14206
|
Modals_default as Modal,
|
|
11891
14207
|
ModernCard,
|
|
@@ -11893,12 +14209,15 @@ export {
|
|
|
11893
14209
|
PRINT_GREEN,
|
|
11894
14210
|
Pages_default as Pages,
|
|
11895
14211
|
PaymentMethodSelector,
|
|
14212
|
+
PlanningPage_default as PlanningPage,
|
|
11896
14213
|
Buttons_default as PrimaryButton,
|
|
11897
14214
|
PrintPreview,
|
|
11898
14215
|
PrintableDocument,
|
|
14216
|
+
PurchaseRequestsPage,
|
|
11899
14217
|
PurchaseWorkspace_default as PurchaseWorkspace,
|
|
11900
14218
|
ModernDoubleSidebarLayout_default as RewiseLayout,
|
|
11901
14219
|
SYSCOHADA_CLASSES,
|
|
14220
|
+
SearchableSelect,
|
|
11902
14221
|
SecondaryButton,
|
|
11903
14222
|
SelectAccount,
|
|
11904
14223
|
SelectClient,
|
|
@@ -11912,6 +14231,7 @@ export {
|
|
|
11912
14231
|
SignatureSection,
|
|
11913
14232
|
StatCard,
|
|
11914
14233
|
TEMPLATE_FNE_CHOICES,
|
|
14234
|
+
TaskPilot_default as TaskPilot,
|
|
11915
14235
|
TaxSelector,
|
|
11916
14236
|
TemplateFNESelector,
|
|
11917
14237
|
TextInput,
|
|
@@ -11923,6 +14243,7 @@ export {
|
|
|
11923
14243
|
UserServices,
|
|
11924
14244
|
VendorServices,
|
|
11925
14245
|
WorkSpace_default as WorkSpace,
|
|
14246
|
+
WorkSpaceRoutes,
|
|
11926
14247
|
WorkspaceServices,
|
|
11927
14248
|
fileManagerApi,
|
|
11928
14249
|
formatCurrency,
|