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 CHANGED
@@ -32,6 +32,7 @@ __export(index_exports, {
32
32
  ACCOUNT_TYPE_LABELS: () => ACCOUNT_TYPE_LABELS,
33
33
  AccountServices: () => AccountServices,
34
34
  AccountingWorkspace: () => AccountingWorkspace_default,
35
+ ActifsPage: () => ActifsPage_default,
35
36
  Alert: () => Alert_default,
36
37
  AlertProvider: () => AlertProvider,
37
38
  ApprovalAnswerModal: () => ApprovalAnswerModal,
@@ -41,9 +42,11 @@ __export(index_exports, {
41
42
  ApprovalWorkflow: () => ApprovalWorkflow_default,
42
43
  AuthServices: () => AuthServices,
43
44
  BALANCE_TYPE_LABELS: () => BALANCE_TYPE_LABELS,
45
+ BudgetPage: () => BudgetPage_default,
44
46
  CHOICES: () => Choices_default,
45
47
  CardBody: () => CardBody,
46
48
  CardHeader: () => CardHeader,
49
+ ChatEquipePage: () => ChatEquipePage_default,
47
50
  ClientServices: () => ClientServices,
48
51
  CountrySelector: () => CountrySelector,
49
52
  CrmWorkspace: () => CrmWorkspace_default,
@@ -62,10 +65,12 @@ __export(index_exports, {
62
65
  ForeignCurrencySelector: () => ForeignCurrencySelector,
63
66
  FormClient: () => FormClient,
64
67
  FormVendor: () => FormVendor,
68
+ HRConnectPage: () => HRConnectPage_default,
65
69
  InfoBox: () => InfoBox,
66
70
  InputField: () => InputField,
67
71
  InvoiceTypeSelector: () => InvoiceTypeSelector,
68
72
  LegalFormSelector: () => LegalFormSelector,
73
+ MeetingHubPage: () => MeetingHubPage_default,
69
74
  MinimalVendorForm: () => MinimalVendorForm,
70
75
  Modal: () => Modals_default,
71
76
  ModernCard: () => ModernCard,
@@ -73,12 +78,15 @@ __export(index_exports, {
73
78
  PRINT_GREEN: () => PRINT_GREEN,
74
79
  Pages: () => Pages_default,
75
80
  PaymentMethodSelector: () => PaymentMethodSelector,
81
+ PlanningPage: () => PlanningPage_default,
76
82
  PrimaryButton: () => Buttons_default,
77
83
  PrintPreview: () => PrintPreview,
78
84
  PrintableDocument: () => PrintableDocument,
85
+ PurchaseRequestsPage: () => PurchaseRequestsPage,
79
86
  PurchaseWorkspace: () => PurchaseWorkspace_default,
80
87
  RewiseLayout: () => ModernDoubleSidebarLayout_default,
81
88
  SYSCOHADA_CLASSES: () => SYSCOHADA_CLASSES,
89
+ SearchableSelect: () => SearchableSelect,
82
90
  SecondaryButton: () => SecondaryButton,
83
91
  SelectAccount: () => SelectAccount,
84
92
  SelectClient: () => SelectClient,
@@ -92,6 +100,7 @@ __export(index_exports, {
92
100
  SignatureSection: () => SignatureSection,
93
101
  StatCard: () => StatCard,
94
102
  TEMPLATE_FNE_CHOICES: () => TEMPLATE_FNE_CHOICES,
103
+ TaskPilot: () => TaskPilot_default,
95
104
  TaxSelector: () => TaxSelector,
96
105
  TemplateFNESelector: () => TemplateFNESelector,
97
106
  TextInput: () => TextInput,
@@ -103,6 +112,7 @@ __export(index_exports, {
103
112
  UserServices: () => UserServices,
104
113
  VendorServices: () => VendorServices,
105
114
  WorkSpace: () => WorkSpace_default,
115
+ WorkSpaceRoutes: () => WorkSpaceRoutes,
106
116
  WorkspaceServices: () => WorkspaceServices,
107
117
  fileManagerApi: () => fileManagerApi,
108
118
  formatCurrency: () => formatCurrency,
@@ -1080,6 +1090,7 @@ var SessionProvider = ({ children }) => {
1080
1090
  setActiveBusinessEntity(result.data.user.centers_access.find((item) => parseInt(item.id) === parseInt(saved_center_id)) || result.data.user.centers_access[0] || null);
1081
1091
  } else {
1082
1092
  setLoggedUser(null);
1093
+ localStorage.removeItem("token");
1083
1094
  }
1084
1095
  }).catch(() => setLoggedUser(null));
1085
1096
  } else {
@@ -1863,7 +1874,7 @@ var MODULE_CODE_MAP = {
1863
1874
  "PURCHASE": "WiseProcure",
1864
1875
  "HR": "WiseHR"
1865
1876
  };
1866
- var RewiseLayout = ({ children, module_name = "Rewise", module_description = "Description du module", primaryMenuItems, secondaryMenuItems }) => {
1877
+ var RewiseLayout = ({ children, module_name = "Rewise", module_description = "", primaryMenuItems, secondaryMenuItems }) => {
1867
1878
  const location = (0, import_react_router_dom3.useLocation)();
1868
1879
  const navigate = (0, import_react_router_dom3.useNavigate)();
1869
1880
  const { theme, themeType, setTheme } = useTheme();
@@ -2011,7 +2022,7 @@ var RewiseLayout = ({ children, module_name = "Rewise", module_description = "De
2011
2022
  const isModuleActive = (moduleId) => selectedModule === moduleId;
2012
2023
  const getBreadcrumbs = () => {
2013
2024
  const paths = location.pathname.split("/").filter(Boolean);
2014
- const breadcrumbs = [{ label: "Accueil", path: "/" }];
2025
+ const breadcrumbs = [{ label: "Accueil", path: "/workspace/" }];
2015
2026
  paths.forEach((path, index) => {
2016
2027
  const fullPath = "/" + paths.slice(0, index + 1).join("/");
2017
2028
  const module2 = primaryMenuItems.find((m) => m.id === path);
@@ -11861,11 +11872,2151 @@ var WorkSpace = () => {
11861
11872
  ] });
11862
11873
  };
11863
11874
  var WorkSpace_default = WorkSpace;
11875
+
11876
+ // src/pages/workspaces/HRConnectPage.tsx
11877
+ var import_lucide_react26 = require("lucide-react");
11878
+ var import_jsx_runtime38 = require("react/jsx-runtime");
11879
+ var HRConnectPage = () => {
11880
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "h-full flex flex-col", children: [
11881
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "bg-[var(--color-surface)] border-b border-[var(--color-border)] px-6 py-4", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-center gap-3", children: [
11882
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "p-2 bg-purple-100 rounded-lg", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react26.UserCog, { className: "w-6 h-6 text-purple-600" }) }),
11883
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { children: [
11884
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("h1", { className: "text-xl font-semibold text-[var(--color-text-primary)]", children: "HR Connect" }),
11885
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "text-sm text-[var(--color-text-secondary)]", children: "Gestion des ressources humaines" })
11886
+ ] })
11887
+ ] }) }),
11888
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "flex-1 p-6 bg-[var(--color-background)]", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: [
11889
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "bg-[var(--color-surface)] rounded-xl p-6 border border-[var(--color-border-light)] hover:shadow-md transition-shadow", children: [
11890
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-center gap-3 mb-4", children: [
11891
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "p-2 bg-blue-100 rounded-lg", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react26.Users, { className: "w-5 h-5 text-blue-600" }) }),
11892
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("h3", { className: "font-medium text-[var(--color-text-primary)]", children: "Employ\xE9s" })
11893
+ ] }),
11894
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "text-sm text-[var(--color-text-secondary)]", children: "G\xE9rer les profils et informations des employ\xE9s" })
11895
+ ] }),
11896
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "bg-[var(--color-surface)] rounded-xl p-6 border border-[var(--color-border-light)] hover:shadow-md transition-shadow", children: [
11897
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-center gap-3 mb-4", children: [
11898
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "p-2 bg-green-100 rounded-lg", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react26.Calendar, { className: "w-5 h-5 text-green-600" }) }),
11899
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("h3", { className: "font-medium text-[var(--color-text-primary)]", children: "Cong\xE9s" })
11900
+ ] }),
11901
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "text-sm text-[var(--color-text-secondary)]", children: "Suivi des demandes de cong\xE9s et absences" })
11902
+ ] }),
11903
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "bg-[var(--color-surface)] rounded-xl p-6 border border-[var(--color-border-light)] hover:shadow-md transition-shadow", children: [
11904
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-center gap-3 mb-4", children: [
11905
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "p-2 bg-orange-100 rounded-lg", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react26.FileText, { className: "w-5 h-5 text-orange-600" }) }),
11906
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("h3", { className: "font-medium text-[var(--color-text-primary)]", children: "Documents" })
11907
+ ] }),
11908
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "text-sm text-[var(--color-text-secondary)]", children: "Gestion des documents RH et contrats" })
11909
+ ] }),
11910
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "bg-[var(--color-surface)] rounded-xl p-6 border border-[var(--color-border-light)] hover:shadow-md transition-shadow", children: [
11911
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-center gap-3 mb-4", children: [
11912
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "p-2 bg-indigo-100 rounded-lg", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react26.TrendingUp, { className: "w-5 h-5 text-indigo-600" }) }),
11913
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("h3", { className: "font-medium text-[var(--color-text-primary)]", children: "Performance" })
11914
+ ] }),
11915
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "text-sm text-[var(--color-text-secondary)]", children: "\xC9valuations et objectifs des employ\xE9s" })
11916
+ ] }),
11917
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "bg-[var(--color-surface)] rounded-xl p-6 border border-[var(--color-border-light)] hover:shadow-md transition-shadow", children: [
11918
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-center gap-3 mb-4", children: [
11919
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "p-2 bg-pink-100 rounded-lg", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react26.Award, { className: "w-5 h-5 text-pink-600" }) }),
11920
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("h3", { className: "font-medium text-[var(--color-text-primary)]", children: "Formations" })
11921
+ ] }),
11922
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "text-sm text-[var(--color-text-secondary)]", children: "Programmes de formation et d\xE9veloppement" })
11923
+ ] })
11924
+ ] }) })
11925
+ ] });
11926
+ };
11927
+ var HRConnectPage_default = HRConnectPage;
11928
+
11929
+ // src/pages/workspaces/MeetingHubPage.tsx
11930
+ var import_lucide_react27 = require("lucide-react");
11931
+ var import_jsx_runtime39 = require("react/jsx-runtime");
11932
+ var MeetingHubPage = () => {
11933
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "h-full flex flex-col", children: [
11934
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "bg-[var(--color-surface)] border-b border-[var(--color-border)] px-6 py-4", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex items-center justify-between", children: [
11935
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex items-center gap-3", children: [
11936
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "p-2 bg-blue-100 rounded-lg", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react27.Calendar, { className: "w-6 h-6 text-blue-600" }) }),
11937
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { children: [
11938
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("h1", { className: "text-xl font-semibold text-[var(--color-text-primary)]", children: "Meeting Hub" }),
11939
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "text-sm text-[var(--color-text-secondary)]", children: "Planification et gestion des r\xE9unions" })
11940
+ ] })
11941
+ ] }),
11942
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Buttons_default, { children: [
11943
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react27.Plus, { className: "w-4 h-4 mr-2" }),
11944
+ "Nouvelle r\xE9union"
11945
+ ] })
11946
+ ] }) }),
11947
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "flex-1 p-6 bg-[var(--color-background)]", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "grid grid-cols-1 lg:grid-cols-3 gap-6", children: [
11948
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "lg:col-span-2 bg-[var(--color-surface)] rounded-xl border border-[var(--color-border-light)]", children: [
11949
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "p-4 border-b border-[var(--color-border-light)]", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("h2", { className: "font-semibold text-[var(--color-text-primary)]", children: "R\xE9unions du jour" }) }),
11950
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "p-4 space-y-4", children: [
11951
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex items-start gap-4 p-4 bg-[var(--color-background)] rounded-lg", children: [
11952
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "p-2 bg-blue-100 rounded-lg", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react27.Video, { className: "w-5 h-5 text-blue-600" }) }),
11953
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex-1", children: [
11954
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("h3", { className: "font-medium text-[var(--color-text-primary)]", children: "Stand-up quotidien" }),
11955
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex items-center gap-4 mt-2 text-sm text-[var(--color-text-secondary)]", children: [
11956
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { className: "flex items-center gap-1", children: [
11957
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react27.Clock, { className: "w-4 h-4" }),
11958
+ "09:00 - 09:30"
11959
+ ] }),
11960
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { className: "flex items-center gap-1", children: [
11961
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react27.Users, { className: "w-4 h-4" }),
11962
+ "8 participants"
11963
+ ] })
11964
+ ] })
11965
+ ] })
11966
+ ] }),
11967
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex items-start gap-4 p-4 bg-[var(--color-background)] rounded-lg", children: [
11968
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "p-2 bg-green-100 rounded-lg", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react27.MapPin, { className: "w-5 h-5 text-green-600" }) }),
11969
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex-1", children: [
11970
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("h3", { className: "font-medium text-[var(--color-text-primary)]", children: "Revue de sprint" }),
11971
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex items-center gap-4 mt-2 text-sm text-[var(--color-text-secondary)]", children: [
11972
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { className: "flex items-center gap-1", children: [
11973
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react27.Clock, { className: "w-4 h-4" }),
11974
+ "14:00 - 15:30"
11975
+ ] }),
11976
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { className: "flex items-center gap-1", children: [
11977
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react27.Users, { className: "w-4 h-4" }),
11978
+ "12 participants"
11979
+ ] })
11980
+ ] })
11981
+ ] })
11982
+ ] }),
11983
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "text-center text-sm text-[var(--color-text-tertiary)] py-4", children: "Aucune autre r\xE9union pr\xE9vue aujourd'hui" })
11984
+ ] })
11985
+ ] }),
11986
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "space-y-6", children: [
11987
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "bg-[var(--color-surface)] rounded-xl p-6 border border-[var(--color-border-light)]", children: [
11988
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("h3", { className: "font-medium text-[var(--color-text-primary)] mb-4", children: "Cette semaine" }),
11989
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "space-y-3", children: [
11990
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex justify-between", children: [
11991
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "text-sm text-[var(--color-text-secondary)]", children: "R\xE9unions planifi\xE9es" }),
11992
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "font-semibold text-[var(--color-text-primary)]", children: "12" })
11993
+ ] }),
11994
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex justify-between", children: [
11995
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "text-sm text-[var(--color-text-secondary)]", children: "Heures de r\xE9union" }),
11996
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "font-semibold text-[var(--color-text-primary)]", children: "8h" })
11997
+ ] }),
11998
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex justify-between", children: [
11999
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "text-sm text-[var(--color-text-secondary)]", children: "Participants uniques" }),
12000
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "font-semibold text-[var(--color-text-primary)]", children: "24" })
12001
+ ] })
12002
+ ] })
12003
+ ] }),
12004
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "bg-[var(--color-surface)] rounded-xl p-6 border border-[var(--color-border-light)]", children: [
12005
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("h3", { className: "font-medium text-[var(--color-text-primary)] mb-4", children: "Salles disponibles" }),
12006
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "space-y-2", children: [
12007
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex items-center justify-between p-2 bg-green-50 rounded-lg", children: [
12008
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "text-sm text-[var(--color-text-primary)]", children: "Salle A" }),
12009
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "text-xs px-2 py-1 bg-green-100 text-green-700 rounded", children: "Libre" })
12010
+ ] }),
12011
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex items-center justify-between p-2 bg-red-50 rounded-lg", children: [
12012
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "text-sm text-[var(--color-text-primary)]", children: "Salle B" }),
12013
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "text-xs px-2 py-1 bg-red-100 text-red-700 rounded", children: "Occup\xE9e" })
12014
+ ] }),
12015
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex items-center justify-between p-2 bg-green-50 rounded-lg", children: [
12016
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "text-sm text-[var(--color-text-primary)]", children: "Salle C" }),
12017
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "text-xs px-2 py-1 bg-green-100 text-green-700 rounded", children: "Libre" })
12018
+ ] })
12019
+ ] })
12020
+ ] })
12021
+ ] })
12022
+ ] }) })
12023
+ ] });
12024
+ };
12025
+ var MeetingHubPage_default = MeetingHubPage;
12026
+
12027
+ // src/pages/workspaces/BudgetPage.tsx
12028
+ var import_lucide_react28 = require("lucide-react");
12029
+ var import_jsx_runtime40 = require("react/jsx-runtime");
12030
+ var BudgetPage = () => {
12031
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "h-full flex flex-col", children: [
12032
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "bg-[var(--color-surface)] border-b border-[var(--color-border)] px-6 py-4", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex items-center gap-3", children: [
12033
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "p-2 bg-emerald-100 rounded-lg", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react28.CircleDollarSign, { className: "w-6 h-6 text-emerald-600" }) }),
12034
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { children: [
12035
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("h1", { className: "text-xl font-semibold text-[var(--color-text-primary)]", children: "Budget" }),
12036
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { className: "text-sm text-[var(--color-text-secondary)]", children: "Gestion budg\xE9taire et suivi financier" })
12037
+ ] })
12038
+ ] }) }),
12039
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex-1 p-6 bg-[var(--color-background)]", children: [
12040
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-6 mb-6", children: [
12041
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "bg-[var(--color-surface)] rounded-xl p-6 border border-[var(--color-border-light)]", children: [
12042
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex items-center justify-between mb-4", children: [
12043
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "text-sm text-[var(--color-text-secondary)]", children: "Budget Total" }),
12044
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "p-2 bg-blue-100 rounded-lg", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react28.CircleDollarSign, { className: "w-5 h-5 text-blue-600" }) })
12045
+ ] }),
12046
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { className: "text-2xl font-bold text-[var(--color-text-primary)]", children: "1,250,000 \u20AC" }),
12047
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("p", { className: "text-sm text-green-600 mt-2 flex items-center gap-1", children: [
12048
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react28.TrendingUp, { className: "w-4 h-4" }),
12049
+ "+12% vs ann\xE9e pr\xE9c\xE9dente"
12050
+ ] })
12051
+ ] }),
12052
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "bg-[var(--color-surface)] rounded-xl p-6 border border-[var(--color-border-light)]", children: [
12053
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex items-center justify-between mb-4", children: [
12054
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "text-sm text-[var(--color-text-secondary)]", children: "D\xE9penses YTD" }),
12055
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "p-2 bg-orange-100 rounded-lg", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react28.TrendingDown, { className: "w-5 h-5 text-orange-600" }) })
12056
+ ] }),
12057
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { className: "text-2xl font-bold text-[var(--color-text-primary)]", children: "875,000 \u20AC" }),
12058
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { className: "text-sm text-[var(--color-text-secondary)] mt-2", children: "70% du budget utilis\xE9" })
12059
+ ] }),
12060
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "bg-[var(--color-surface)] rounded-xl p-6 border border-[var(--color-border-light)]", children: [
12061
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex items-center justify-between mb-4", children: [
12062
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "text-sm text-[var(--color-text-secondary)]", children: "Disponible" }),
12063
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "p-2 bg-green-100 rounded-lg", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react28.PieChart, { className: "w-5 h-5 text-green-600" }) })
12064
+ ] }),
12065
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { className: "text-2xl font-bold text-green-600", children: "375,000 \u20AC" }),
12066
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { className: "text-sm text-[var(--color-text-secondary)] mt-2", children: "30% restant" })
12067
+ ] })
12068
+ ] }),
12069
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-6", children: [
12070
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "bg-[var(--color-surface)] rounded-xl border border-[var(--color-border-light)]", children: [
12071
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "p-4 border-b border-[var(--color-border-light)] flex items-center gap-2", children: [
12072
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react28.BarChart3, { className: "w-5 h-5 text-[var(--color-text-secondary)]" }),
12073
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("h2", { className: "font-semibold text-[var(--color-text-primary)]", children: "OPEX - D\xE9penses Op\xE9rationnelles" })
12074
+ ] }),
12075
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "p-4 space-y-4", children: [
12076
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { children: [
12077
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex justify-between text-sm mb-1", children: [
12078
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "text-[var(--color-text-secondary)]", children: "Salaires" }),
12079
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "text-[var(--color-text-primary)]", children: "450,000 \u20AC" })
12080
+ ] }),
12081
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "w-full bg-[var(--color-border)] rounded-full h-2", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "bg-blue-600 h-2 rounded-full", style: { width: "75%" } }) })
12082
+ ] }),
12083
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { children: [
12084
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex justify-between text-sm mb-1", children: [
12085
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "text-[var(--color-text-secondary)]", children: "Fournitures" }),
12086
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "text-[var(--color-text-primary)]", children: "125,000 \u20AC" })
12087
+ ] }),
12088
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "w-full bg-[var(--color-border)] rounded-full h-2", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "bg-green-600 h-2 rounded-full", style: { width: "60%" } }) })
12089
+ ] }),
12090
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { children: [
12091
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex justify-between text-sm mb-1", children: [
12092
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "text-[var(--color-text-secondary)]", children: "Services" }),
12093
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "text-[var(--color-text-primary)]", children: "200,000 \u20AC" })
12094
+ ] }),
12095
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "w-full bg-[var(--color-border)] rounded-full h-2", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "bg-purple-600 h-2 rounded-full", style: { width: "80%" } }) })
12096
+ ] })
12097
+ ] })
12098
+ ] }),
12099
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "bg-[var(--color-surface)] rounded-xl border border-[var(--color-border-light)]", children: [
12100
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "p-4 border-b border-[var(--color-border-light)] flex items-center gap-2", children: [
12101
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react28.FileText, { className: "w-5 h-5 text-[var(--color-text-secondary)]" }),
12102
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("h2", { className: "font-semibold text-[var(--color-text-primary)]", children: "CAPEX - Investissements" })
12103
+ ] }),
12104
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "p-4 space-y-4", children: [
12105
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { children: [
12106
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex justify-between text-sm mb-1", children: [
12107
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "text-[var(--color-text-secondary)]", children: "\xC9quipements IT" }),
12108
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "text-[var(--color-text-primary)]", children: "75,000 \u20AC" })
12109
+ ] }),
12110
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "w-full bg-[var(--color-border)] rounded-full h-2", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "bg-indigo-600 h-2 rounded-full", style: { width: "50%" } }) })
12111
+ ] }),
12112
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { children: [
12113
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex justify-between text-sm mb-1", children: [
12114
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "text-[var(--color-text-secondary)]", children: "Mobilier" }),
12115
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "text-[var(--color-text-primary)]", children: "25,000 \u20AC" })
12116
+ ] }),
12117
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "w-full bg-[var(--color-border)] rounded-full h-2", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "bg-pink-600 h-2 rounded-full", style: { width: "30%" } }) })
12118
+ ] }),
12119
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { children: [
12120
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex justify-between text-sm mb-1", children: [
12121
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "text-[var(--color-text-secondary)]", children: "V\xE9hicules" }),
12122
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "text-[var(--color-text-primary)]", children: "0 \u20AC" })
12123
+ ] }),
12124
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "w-full bg-[var(--color-border)] rounded-full h-2", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "bg-orange-600 h-2 rounded-full", style: { width: "0%" } }) })
12125
+ ] })
12126
+ ] })
12127
+ ] })
12128
+ ] })
12129
+ ] })
12130
+ ] });
12131
+ };
12132
+ var BudgetPage_default = BudgetPage;
12133
+
12134
+ // src/pages/workspaces/ChatEquipePage.tsx
12135
+ var import_react30 = require("react");
12136
+ var import_lucide_react29 = require("lucide-react");
12137
+ var import_jsx_runtime41 = require("react/jsx-runtime");
12138
+ var ChatEquipePage = () => {
12139
+ const [message, setMessage] = (0, import_react30.useState)("");
12140
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "h-full flex flex-col", children: [
12141
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "bg-[var(--color-surface)] border-b border-[var(--color-border)] px-6 py-4", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex items-center gap-3", children: [
12142
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "p-2 bg-indigo-100 rounded-lg", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react29.MessageCircle, { className: "w-6 h-6 text-indigo-600" }) }),
12143
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { children: [
12144
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("h1", { className: "text-xl font-semibold text-[var(--color-text-primary)]", children: "Chat \xC9quipe" }),
12145
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "text-sm text-[var(--color-text-secondary)]", children: "Communication interne et messagerie" })
12146
+ ] })
12147
+ ] }) }),
12148
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex-1 flex overflow-hidden bg-[var(--color-background)]", children: [
12149
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "w-80 border-r border-[var(--color-border)] bg-[var(--color-surface)] flex flex-col", children: [
12150
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "p-4 border-b border-[var(--color-border-light)]", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "relative", children: [
12151
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react29.Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-[var(--color-text-tertiary)]" }),
12152
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
12153
+ "input",
12154
+ {
12155
+ type: "text",
12156
+ placeholder: "Rechercher...",
12157
+ 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)]"
12158
+ }
12159
+ )
12160
+ ] }) }),
12161
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex-1 overflow-y-auto", children: [
12162
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "p-2", children: [
12163
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex items-center justify-between px-3 py-2", children: [
12164
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "text-xs font-semibold text-[var(--color-text-tertiary)] uppercase", children: "Canaux" }),
12165
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("button", { className: "p-1 hover:bg-[var(--color-surface-hover)] rounded", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react29.Plus, { className: "w-4 h-4 text-[var(--color-text-tertiary)]" }) })
12166
+ ] }),
12167
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("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: [
12168
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "text-lg", children: "#" }),
12169
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "text-sm font-medium", children: "g\xE9n\xE9ral" }),
12170
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "ml-auto text-xs bg-[var(--color-primary)] text-white px-2 py-0.5 rounded-full", children: "3" })
12171
+ ] }),
12172
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("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: [
12173
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "text-lg", children: "#" }),
12174
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "text-sm", children: "projets" })
12175
+ ] }),
12176
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("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: [
12177
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "text-lg", children: "#" }),
12178
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "text-sm", children: "annonces" })
12179
+ ] })
12180
+ ] }),
12181
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "p-2 mt-2", children: [
12182
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "flex items-center justify-between px-3 py-2", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "text-xs font-semibold text-[var(--color-text-tertiary)] uppercase", children: "Messages Directs" }) }),
12183
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("button", { className: "w-full flex items-center gap-3 px-3 py-2 rounded-lg hover:bg-[var(--color-surface-hover)]", children: [
12184
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "w-8 h-8 bg-blue-100 rounded-full flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "text-xs font-medium text-blue-600", children: "JD" }) }),
12185
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex-1 text-left", children: [
12186
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "text-sm text-[var(--color-text-primary)]", children: "Jean Dupont" }),
12187
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "text-xs text-[var(--color-text-tertiary)] truncate", children: "D'accord, merci!" })
12188
+ ] })
12189
+ ] }),
12190
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("button", { className: "w-full flex items-center gap-3 px-3 py-2 rounded-lg hover:bg-[var(--color-surface-hover)]", children: [
12191
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "w-8 h-8 bg-green-100 rounded-full flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "text-xs font-medium text-green-600", children: "ML" }) }),
12192
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex-1 text-left", children: [
12193
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "text-sm text-[var(--color-text-primary)]", children: "Marie Lambert" }),
12194
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "text-xs text-[var(--color-text-tertiary)] truncate", children: "Le rapport est pr\xEAt" })
12195
+ ] })
12196
+ ] })
12197
+ ] })
12198
+ ] })
12199
+ ] }),
12200
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex-1 flex flex-col", children: [
12201
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "bg-[var(--color-surface)] border-b border-[var(--color-border-light)] px-6 py-3 flex items-center justify-between", children: [
12202
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex items-center gap-3", children: [
12203
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "text-lg font-medium text-[var(--color-text-primary)]", children: "# g\xE9n\xE9ral" }),
12204
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "text-sm text-[var(--color-text-tertiary)]", children: "|" }),
12205
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "text-sm text-[var(--color-text-secondary)]", children: "Canal de discussion g\xE9n\xE9rale" })
12206
+ ] }),
12207
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex items-center gap-2", children: [
12208
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("button", { className: "p-2 hover:bg-[var(--color-surface-hover)] rounded-lg", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react29.Users, { className: "w-5 h-5 text-[var(--color-text-tertiary)]" }) }),
12209
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("button", { className: "p-2 hover:bg-[var(--color-surface-hover)] rounded-lg", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react29.Phone, { className: "w-5 h-5 text-[var(--color-text-tertiary)]" }) }),
12210
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("button", { className: "p-2 hover:bg-[var(--color-surface-hover)] rounded-lg", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react29.Video, { className: "w-5 h-5 text-[var(--color-text-tertiary)]" }) }),
12211
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("button", { className: "p-2 hover:bg-[var(--color-surface-hover)] rounded-lg", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react29.MoreVertical, { className: "w-5 h-5 text-[var(--color-text-tertiary)]" }) })
12212
+ ] })
12213
+ ] }),
12214
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex-1 overflow-y-auto p-6 space-y-4", children: [
12215
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex gap-3", children: [
12216
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "w-10 h-10 bg-blue-100 rounded-full flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "text-sm font-medium text-blue-600", children: "JD" }) }),
12217
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { children: [
12218
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex items-center gap-2", children: [
12219
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "font-medium text-[var(--color-text-primary)]", children: "Jean Dupont" }),
12220
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "text-xs text-[var(--color-text-tertiary)]", children: "10:30" })
12221
+ ] }),
12222
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("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." })
12223
+ ] })
12224
+ ] }),
12225
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex gap-3", children: [
12226
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "w-10 h-10 bg-green-100 rounded-full flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "text-sm font-medium text-green-600", children: "ML" }) }),
12227
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { children: [
12228
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex items-center gap-2", children: [
12229
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "font-medium text-[var(--color-text-primary)]", children: "Marie Lambert" }),
12230
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "text-xs text-[var(--color-text-tertiary)]", children: "10:32" })
12231
+ ] }),
12232
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "text-sm text-[var(--color-text-primary)] mt-1", children: "Bien not\xE9, merci pour l'info !" })
12233
+ ] })
12234
+ ] })
12235
+ ] }),
12236
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "bg-[var(--color-surface)] border-t border-[var(--color-border-light)] p-4", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex items-center gap-3", children: [
12237
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
12238
+ "input",
12239
+ {
12240
+ type: "text",
12241
+ placeholder: "\xC9crire un message...",
12242
+ value: message,
12243
+ onChange: (e) => setMessage(e.target.value),
12244
+ 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)]"
12245
+ }
12246
+ ),
12247
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("button", { className: "p-2 bg-[var(--color-primary)] text-white rounded-lg hover:bg-[var(--color-primary-dark)] transition-colors", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react29.Send, { className: "w-5 h-5" }) })
12248
+ ] }) })
12249
+ ] })
12250
+ ] })
12251
+ ] });
12252
+ };
12253
+ var ChatEquipePage_default = ChatEquipePage;
12254
+
12255
+ // src/pages/workspaces/ActifsPage.tsx
12256
+ var import_lucide_react30 = require("lucide-react");
12257
+ var import_jsx_runtime42 = require("react/jsx-runtime");
12258
+ var ActifsPage = () => {
12259
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "h-full flex flex-col", children: [
12260
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "bg-[var(--color-surface)] border-b border-[var(--color-border)] px-6 py-4", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex items-center justify-between", children: [
12261
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex items-center gap-3", children: [
12262
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "p-2 bg-orange-100 rounded-lg", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react30.Building2, { className: "w-6 h-6 text-orange-600" }) }),
12263
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { children: [
12264
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("h1", { className: "text-xl font-semibold text-[var(--color-text-primary)]", children: "Actifs" }),
12265
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "text-sm text-[var(--color-text-secondary)]", children: "Gestion des immobilisations et \xE9quipements" })
12266
+ ] })
12267
+ ] }),
12268
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex items-center gap-3", children: [
12269
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(SecondaryButton, { variant: "outline", children: [
12270
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react30.Filter, { className: "w-4 h-4 mr-2" }),
12271
+ "Filtrer"
12272
+ ] }),
12273
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Buttons_default, { children: [
12274
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react30.Plus, { className: "w-4 h-4 mr-2" }),
12275
+ "Nouvel actif"
12276
+ ] })
12277
+ ] })
12278
+ ] }) }),
12279
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex-1 p-6 bg-[var(--color-background)]", children: [
12280
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "mb-6", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "relative max-w-md", children: [
12281
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react30.Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-[var(--color-text-tertiary)]" }),
12282
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
12283
+ "input",
12284
+ {
12285
+ type: "text",
12286
+ placeholder: "Rechercher un actif...",
12287
+ 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)]"
12288
+ }
12289
+ )
12290
+ ] }) }),
12291
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-4 gap-4 mb-6", children: [
12292
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "bg-[var(--color-surface)] rounded-xl p-4 border border-[var(--color-border-light)]", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex items-center gap-3", children: [
12293
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "p-2 bg-blue-100 rounded-lg", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react30.Laptop, { className: "w-5 h-5 text-blue-600" }) }),
12294
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { children: [
12295
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "text-2xl font-bold text-[var(--color-text-primary)]", children: "156" }),
12296
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "text-xs text-[var(--color-text-secondary)]", children: "\xC9quipements IT" })
12297
+ ] })
12298
+ ] }) }),
12299
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "bg-[var(--color-surface)] rounded-xl p-4 border border-[var(--color-border-light)]", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex items-center gap-3", children: [
12300
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "p-2 bg-green-100 rounded-lg", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react30.Truck, { className: "w-5 h-5 text-green-600" }) }),
12301
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { children: [
12302
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "text-2xl font-bold text-[var(--color-text-primary)]", children: "24" }),
12303
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "text-xs text-[var(--color-text-secondary)]", children: "V\xE9hicules" })
12304
+ ] })
12305
+ ] }) }),
12306
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "bg-[var(--color-surface)] rounded-xl p-4 border border-[var(--color-border-light)]", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex items-center gap-3", children: [
12307
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "p-2 bg-purple-100 rounded-lg", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react30.Package, { className: "w-5 h-5 text-purple-600" }) }),
12308
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { children: [
12309
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "text-2xl font-bold text-[var(--color-text-primary)]", children: "89" }),
12310
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "text-xs text-[var(--color-text-secondary)]", children: "Mobilier" })
12311
+ ] })
12312
+ ] }) }),
12313
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "bg-[var(--color-surface)] rounded-xl p-4 border border-[var(--color-border-light)]", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex items-center gap-3", children: [
12314
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "p-2 bg-orange-100 rounded-lg", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react30.Wrench, { className: "w-5 h-5 text-orange-600" }) }),
12315
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { children: [
12316
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "text-2xl font-bold text-[var(--color-text-primary)]", children: "12" }),
12317
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "text-xs text-[var(--color-text-secondary)]", children: "En maintenance" })
12318
+ ] })
12319
+ ] }) })
12320
+ ] }),
12321
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "bg-[var(--color-surface)] rounded-xl border border-[var(--color-border-light)] overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("table", { className: "w-full", children: [
12322
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("thead", { className: "bg-[var(--color-background)]", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("tr", { children: [
12323
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("th", { className: "px-6 py-3 text-left text-xs font-semibold text-[var(--color-text-secondary)] uppercase", children: "Code" }),
12324
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("th", { className: "px-6 py-3 text-left text-xs font-semibold text-[var(--color-text-secondary)] uppercase", children: "D\xE9signation" }),
12325
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("th", { className: "px-6 py-3 text-left text-xs font-semibold text-[var(--color-text-secondary)] uppercase", children: "Cat\xE9gorie" }),
12326
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("th", { className: "px-6 py-3 text-left text-xs font-semibold text-[var(--color-text-secondary)] uppercase", children: "Localisation" }),
12327
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("th", { className: "px-6 py-3 text-left text-xs font-semibold text-[var(--color-text-secondary)] uppercase", children: "\xC9tat" }),
12328
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("th", { className: "px-6 py-3 text-left text-xs font-semibold text-[var(--color-text-secondary)] uppercase", children: "Valeur" })
12329
+ ] }) }),
12330
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("tbody", { className: "divide-y divide-[var(--color-border-light)]", children: [
12331
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("tr", { className: "hover:bg-[var(--color-surface-hover)]", children: [
12332
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("td", { className: "px-6 py-4 text-sm font-medium text-[var(--color-primary)]", children: "ACT-001" }),
12333
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("td", { className: "px-6 py-4 text-sm text-[var(--color-text-primary)]", children: 'MacBook Pro 16"' }),
12334
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("td", { className: "px-6 py-4", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("span", { className: "inline-flex items-center gap-1 px-2 py-1 text-xs bg-blue-100 text-blue-700 rounded", children: [
12335
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react30.Laptop, { className: "w-3 h-3" }),
12336
+ "IT"
12337
+ ] }) }),
12338
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("td", { className: "px-6 py-4 text-sm text-[var(--color-text-secondary)]", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("span", { className: "flex items-center gap-1", children: [
12339
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react30.MapPin, { className: "w-3 h-3" }),
12340
+ "Bureau A-201"
12341
+ ] }) }),
12342
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("td", { className: "px-6 py-4", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "px-2 py-1 text-xs bg-green-100 text-green-700 rounded", children: "Actif" }) }),
12343
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("td", { className: "px-6 py-4 text-sm text-[var(--color-text-primary)]", children: "2,499 \u20AC" })
12344
+ ] }),
12345
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("tr", { className: "hover:bg-[var(--color-surface-hover)]", children: [
12346
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("td", { className: "px-6 py-4 text-sm font-medium text-[var(--color-primary)]", children: "ACT-002" }),
12347
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("td", { className: "px-6 py-4 text-sm text-[var(--color-text-primary)]", children: "Bureau ergonomique" }),
12348
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("td", { className: "px-6 py-4", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("span", { className: "inline-flex items-center gap-1 px-2 py-1 text-xs bg-purple-100 text-purple-700 rounded", children: [
12349
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react30.Package, { className: "w-3 h-3" }),
12350
+ "Mobilier"
12351
+ ] }) }),
12352
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("td", { className: "px-6 py-4 text-sm text-[var(--color-text-secondary)]", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("span", { className: "flex items-center gap-1", children: [
12353
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react30.MapPin, { className: "w-3 h-3" }),
12354
+ "Bureau A-201"
12355
+ ] }) }),
12356
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("td", { className: "px-6 py-4", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "px-2 py-1 text-xs bg-green-100 text-green-700 rounded", children: "Actif" }) }),
12357
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("td", { className: "px-6 py-4 text-sm text-[var(--color-text-primary)]", children: "890 \u20AC" })
12358
+ ] }),
12359
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("tr", { className: "hover:bg-[var(--color-surface-hover)]", children: [
12360
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("td", { className: "px-6 py-4 text-sm font-medium text-[var(--color-primary)]", children: "ACT-003" }),
12361
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("td", { className: "px-6 py-4 text-sm text-[var(--color-text-primary)]", children: "Renault Kangoo" }),
12362
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("td", { className: "px-6 py-4", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("span", { className: "inline-flex items-center gap-1 px-2 py-1 text-xs bg-green-100 text-green-700 rounded", children: [
12363
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react30.Truck, { className: "w-3 h-3" }),
12364
+ "V\xE9hicule"
12365
+ ] }) }),
12366
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("td", { className: "px-6 py-4 text-sm text-[var(--color-text-secondary)]", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("span", { className: "flex items-center gap-1", children: [
12367
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react30.MapPin, { className: "w-3 h-3" }),
12368
+ "Parking B"
12369
+ ] }) }),
12370
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("td", { className: "px-6 py-4", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "px-2 py-1 text-xs bg-orange-100 text-orange-700 rounded", children: "Maintenance" }) }),
12371
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("td", { className: "px-6 py-4 text-sm text-[var(--color-text-primary)]", children: "18,500 \u20AC" })
12372
+ ] })
12373
+ ] })
12374
+ ] }) }) })
12375
+ ] })
12376
+ ] });
12377
+ };
12378
+ var ActifsPage_default = ActifsPage;
12379
+
12380
+ // src/pages/workspaces/PlanningPage.tsx
12381
+ var import_react31 = require("react");
12382
+ var import_lucide_react31 = require("lucide-react");
12383
+ var import_jsx_runtime43 = require("react/jsx-runtime");
12384
+ var DAYS = ["Lun", "Mar", "Mer", "Jeu", "Ven", "Sam", "Dim"];
12385
+ var MONTHS = ["Janvier", "F\xE9vrier", "Mars", "Avril", "Mai", "Juin", "Juillet", "Ao\xFBt", "Septembre", "Octobre", "Novembre", "D\xE9cembre"];
12386
+ var PlanningPage = () => {
12387
+ const [currentDate] = (0, import_react31.useState)(/* @__PURE__ */ new Date());
12388
+ const currentMonth = MONTHS[currentDate.getMonth()];
12389
+ const currentYear = currentDate.getFullYear();
12390
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "h-full flex flex-col", children: [
12391
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "bg-[var(--color-surface)] border-b border-[var(--color-border)] px-6 py-4", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex items-center justify-between", children: [
12392
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex items-center gap-3", children: [
12393
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "p-2 bg-teal-100 rounded-lg", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react31.CalendarClock, { className: "w-6 h-6 text-teal-600" }) }),
12394
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { children: [
12395
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("h1", { className: "text-xl font-semibold text-[var(--color-text-primary)]", children: "Planning" }),
12396
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "text-sm text-[var(--color-text-secondary)]", children: "Planification des ressources et emploi du temps" })
12397
+ ] })
12398
+ ] }),
12399
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Buttons_default, { children: [
12400
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react31.Plus, { className: "w-4 h-4 mr-2" }),
12401
+ "Nouveau planning"
12402
+ ] })
12403
+ ] }) }),
12404
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "flex-1 p-6 bg-[var(--color-background)]", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "grid grid-cols-1 lg:grid-cols-4 gap-6", children: [
12405
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "lg:col-span-3 bg-[var(--color-surface)] rounded-xl border border-[var(--color-border-light)]", children: [
12406
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex items-center justify-between p-4 border-b border-[var(--color-border-light)]", children: [
12407
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex items-center gap-4", children: [
12408
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("button", { className: "p-2 hover:bg-[var(--color-surface-hover)] rounded-lg", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react31.ChevronLeft, { className: "w-5 h-5 text-[var(--color-text-secondary)]" }) }),
12409
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("h2", { className: "text-lg font-semibold text-[var(--color-text-primary)]", children: [
12410
+ currentMonth,
12411
+ " ",
12412
+ currentYear
12413
+ ] }),
12414
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("button", { className: "p-2 hover:bg-[var(--color-surface-hover)] rounded-lg", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react31.ChevronRight, { className: "w-5 h-5 text-[var(--color-text-secondary)]" }) })
12415
+ ] }),
12416
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex items-center gap-2", children: [
12417
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("button", { className: "px-3 py-1.5 text-sm bg-[var(--color-primary)] text-white rounded-lg", children: "Aujourd'hui" }),
12418
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("button", { className: "px-3 py-1.5 text-sm border border-[var(--color-border)] rounded-lg hover:bg-[var(--color-surface-hover)]", children: "Semaine" }),
12419
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("button", { className: "px-3 py-1.5 text-sm border border-[var(--color-border)] rounded-lg hover:bg-[var(--color-surface-hover)]", children: "Mois" })
12420
+ ] })
12421
+ ] }),
12422
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "p-4", children: [
12423
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "grid grid-cols-7 gap-2 mb-2", children: DAYS.map((day) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "text-center text-xs font-semibold text-[var(--color-text-tertiary)] py-2", children: day }, day)) }),
12424
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "grid grid-cols-7 gap-2", children: Array.from({ length: 35 }, (_, i) => {
12425
+ const dayNum = i - 3;
12426
+ const isCurrentMonth = dayNum >= 0 && dayNum < 31;
12427
+ const isToday = dayNum + 1 === currentDate.getDate();
12428
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
12429
+ "div",
12430
+ {
12431
+ className: `
12432
+ min-h-[80px] p-2 rounded-lg border transition-colors cursor-pointer
12433
+ ${isCurrentMonth ? "border-[var(--color-border-light)] hover:border-[var(--color-primary)]" : "border-transparent"}
12434
+ ${isToday ? "bg-[var(--color-primary-light)] border-[var(--color-primary)]" : ""}
12435
+ `,
12436
+ children: isCurrentMonth && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
12437
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: `text-sm ${isToday ? "font-bold text-[var(--color-primary)]" : "text-[var(--color-text-primary)]"}`, children: dayNum + 1 }),
12438
+ dayNum === 4 && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "mt-1 px-1.5 py-0.5 bg-blue-100 text-blue-700 text-xs rounded truncate", children: "R\xE9union \xE9quipe" }),
12439
+ dayNum === 10 && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "mt-1 px-1.5 py-0.5 bg-green-100 text-green-700 text-xs rounded truncate", children: "Formation" }),
12440
+ dayNum === 15 && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "mt-1 px-1.5 py-0.5 bg-purple-100 text-purple-700 text-xs rounded truncate", children: "Deadline projet" })
12441
+ ] })
12442
+ },
12443
+ i
12444
+ );
12445
+ }) })
12446
+ ] })
12447
+ ] }),
12448
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "space-y-6", children: [
12449
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "bg-[var(--color-surface)] rounded-xl border border-[var(--color-border-light)]", children: [
12450
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "p-4 border-b border-[var(--color-border-light)]", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("h3", { className: "font-semibold text-[var(--color-text-primary)]", children: "\xC9v\xE9nements \xE0 venir" }) }),
12451
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "p-4 space-y-3", children: [
12452
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex items-start gap-3 p-3 bg-blue-50 rounded-lg", children: [
12453
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "p-1.5 bg-blue-100 rounded", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react31.Clock, { className: "w-4 h-4 text-blue-600" }) }),
12454
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { children: [
12455
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "text-sm font-medium text-[var(--color-text-primary)]", children: "R\xE9union \xE9quipe" }),
12456
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "text-xs text-[var(--color-text-secondary)]", children: "Demain, 09:00" })
12457
+ ] })
12458
+ ] }),
12459
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex items-start gap-3 p-3 bg-green-50 rounded-lg", children: [
12460
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "p-1.5 bg-green-100 rounded", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react31.Users, { className: "w-4 h-4 text-green-600" }) }),
12461
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { children: [
12462
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "text-sm font-medium text-[var(--color-text-primary)]", children: "Formation" }),
12463
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "text-xs text-[var(--color-text-secondary)]", children: "15 D\xE9c, 14:00" })
12464
+ ] })
12465
+ ] }),
12466
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex items-start gap-3 p-3 bg-purple-50 rounded-lg", children: [
12467
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "p-1.5 bg-purple-100 rounded", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react31.CalendarClock, { className: "w-4 h-4 text-purple-600" }) }),
12468
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { children: [
12469
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "text-sm font-medium text-[var(--color-text-primary)]", children: "Deadline projet" }),
12470
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "text-xs text-[var(--color-text-secondary)]", children: "20 D\xE9c, 18:00" })
12471
+ ] })
12472
+ ] })
12473
+ ] })
12474
+ ] }),
12475
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "bg-[var(--color-surface)] rounded-xl p-4 border border-[var(--color-border-light)]", children: [
12476
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("h3", { className: "font-semibold text-[var(--color-text-primary)] mb-4", children: "Cette semaine" }),
12477
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "space-y-3", children: [
12478
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex justify-between items-center", children: [
12479
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "text-sm text-[var(--color-text-secondary)]", children: "R\xE9unions" }),
12480
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "font-semibold text-[var(--color-text-primary)]", children: "8" })
12481
+ ] }),
12482
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex justify-between items-center", children: [
12483
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "text-sm text-[var(--color-text-secondary)]", children: "T\xE2ches planifi\xE9es" }),
12484
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "font-semibold text-[var(--color-text-primary)]", children: "15" })
12485
+ ] }),
12486
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex justify-between items-center", children: [
12487
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "text-sm text-[var(--color-text-secondary)]", children: "Heures occup\xE9es" }),
12488
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "font-semibold text-[var(--color-text-primary)]", children: "32h" })
12489
+ ] })
12490
+ ] })
12491
+ ] })
12492
+ ] })
12493
+ ] }) })
12494
+ ] });
12495
+ };
12496
+ var PlanningPage_default = PlanningPage;
12497
+
12498
+ // src/pages/workspaces/TaskPilot.tsx
12499
+ var import_react33 = require("react");
12500
+ var import_lucide_react33 = require("lucide-react");
12501
+
12502
+ // src/models/Task.ts
12503
+ var TASK_STATUS_OPTIONS = [
12504
+ { value: "new", label: "\xC0 faire" },
12505
+ { value: "in_progress", label: "En cours" },
12506
+ { value: "in_review", label: "En r\xE9vision" },
12507
+ { value: "done", label: "Termin\xE9" }
12508
+ ];
12509
+ var TASK_PRIORITY_OPTIONS = [
12510
+ { value: "high", label: "Haute", color: "bg-red-100 text-red-700" },
12511
+ { value: "medium", label: "Moyenne", color: "bg-yellow-100 text-yellow-700" },
12512
+ { value: "minimum", label: "Basse", color: "bg-green-100 text-green-700" }
12513
+ ];
12514
+
12515
+ // src/services/TaskServices.ts
12516
+ var URI5 = `${API_URL}/workspace/tasks/`;
12517
+ var TaskServices = {
12518
+ create: (data) => FetchApi.post(`${URI5}`, data),
12519
+ get: (id) => FetchApi.get(`${URI5}${id}/`),
12520
+ list: (params) => FetchApi.get(`${URI5}?${new URLSearchParams(params).toString()}`),
12521
+ update: (id, data) => FetchApi.put(`${URI5}${id}/`, data),
12522
+ patch: (id, data) => FetchApi.patch(`${URI5}${id}/`, data),
12523
+ delete: (id) => FetchApi.delete(`${URI5}${id}/`),
12524
+ updateStatus: (id, status) => FetchApi.patch(`${URI5}${id}/`, { status })
12525
+ };
12526
+
12527
+ // src/pages/workspaces/FormTask.tsx
12528
+ var import_react32 = require("react");
12529
+ var import_lucide_react32 = require("lucide-react");
12530
+ var import_jsx_runtime44 = require("react/jsx-runtime");
12531
+ var FormTask = ({ open, onClose, task, defaultStatus = "new", onSuccess }) => {
12532
+ const { addToast } = useToast();
12533
+ const [loading, setLoading] = (0, import_react32.useState)(false);
12534
+ const [formData, setFormData] = (0, import_react32.useState)({
12535
+ title: "",
12536
+ description: "",
12537
+ status: defaultStatus,
12538
+ priority: "medium",
12539
+ start_date: "",
12540
+ end_date: ""
12541
+ });
12542
+ (0, import_react32.useEffect)(() => {
12543
+ if (task) {
12544
+ setFormData({
12545
+ title: task.title || "",
12546
+ description: task.description || "",
12547
+ status: task.status || defaultStatus,
12548
+ priority: task.priority || "medium",
12549
+ start_date: task.start_date ? task.start_date.split("T")[0] : "",
12550
+ end_date: task.end_date ? task.end_date.split("T")[0] : ""
12551
+ });
12552
+ } else {
12553
+ setFormData({
12554
+ title: "",
12555
+ description: "",
12556
+ status: defaultStatus,
12557
+ priority: "medium",
12558
+ start_date: "",
12559
+ end_date: ""
12560
+ });
12561
+ }
12562
+ }, [task, defaultStatus, open]);
12563
+ const handleInputChange = (e) => {
12564
+ const { name, value } = e.target;
12565
+ setFormData((prev) => ({ ...prev, [name]: value }));
12566
+ };
12567
+ const handleSelectChange = (e) => {
12568
+ const { name, value } = e.target;
12569
+ setFormData((prev) => ({ ...prev, [name]: value }));
12570
+ };
12571
+ const handleTextAreaChange = (e) => {
12572
+ const { name, value } = e.target;
12573
+ setFormData((prev) => ({ ...prev, [name]: value }));
12574
+ };
12575
+ const handleSubmit = async (e) => {
12576
+ e.preventDefault();
12577
+ if (!formData.title.trim()) {
12578
+ addToast({ type: "error", message: "Le titre est obligatoire" });
12579
+ return;
12580
+ }
12581
+ setLoading(true);
12582
+ try {
12583
+ const payload = {
12584
+ ...formData,
12585
+ start_date: formData.start_date || null,
12586
+ end_date: formData.end_date || null
12587
+ };
12588
+ if (task?.id) {
12589
+ await TaskServices.update(task.id, payload);
12590
+ addToast({ type: "success", message: "T\xE2che mise \xE0 jour avec succ\xE8s" });
12591
+ } else {
12592
+ await TaskServices.create(payload);
12593
+ addToast({ type: "success", message: "T\xE2che cr\xE9\xE9e avec succ\xE8s" });
12594
+ }
12595
+ onSuccess?.();
12596
+ onClose();
12597
+ } catch (error) {
12598
+ console.error("Error saving task:", error);
12599
+ addToast({ type: "error", message: "Erreur lors de la sauvegarde" });
12600
+ } finally {
12601
+ setLoading(false);
12602
+ }
12603
+ };
12604
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
12605
+ Modals_default,
12606
+ {
12607
+ open,
12608
+ onClose,
12609
+ title: task ? "Modifier la t\xE2che" : "Nouvelle t\xE2che",
12610
+ description: task ? "Modifiez les d\xE9tails de la t\xE2che" : "Cr\xE9ez une nouvelle t\xE2che",
12611
+ width: "max-w-lg",
12612
+ children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("form", { onSubmit: handleSubmit, className: "space-y-5", children: [
12613
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
12614
+ TextInput,
12615
+ {
12616
+ label: "Titre",
12617
+ name: "title",
12618
+ value: formData.title,
12619
+ onChange: handleInputChange,
12620
+ placeholder: "Entrez le titre de la t\xE2che",
12621
+ required: true
12622
+ }
12623
+ ),
12624
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex flex-col gap-1 w-full", children: [
12625
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("label", { className: "block text-[var(--color-text-secondary)] text-sm font-medium mb-2", children: "Description" }),
12626
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
12627
+ "textarea",
12628
+ {
12629
+ name: "description",
12630
+ value: formData.description,
12631
+ onChange: handleTextAreaChange,
12632
+ placeholder: "D\xE9crivez la t\xE2che...",
12633
+ rows: 3,
12634
+ 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)]"
12635
+ }
12636
+ )
12637
+ ] }),
12638
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "grid grid-cols-2 gap-4", children: [
12639
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
12640
+ SelectInput,
12641
+ {
12642
+ label: "Statut",
12643
+ name: "status",
12644
+ value: formData.status,
12645
+ onChange: handleSelectChange,
12646
+ options: TASK_STATUS_OPTIONS.map((opt) => ({ label: opt.label, value: opt.value }))
12647
+ }
12648
+ ),
12649
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
12650
+ SelectInput,
12651
+ {
12652
+ label: "Priorit\xE9",
12653
+ name: "priority",
12654
+ value: formData.priority,
12655
+ onChange: handleSelectChange,
12656
+ options: TASK_PRIORITY_OPTIONS.map((opt) => ({ label: opt.label, value: opt.value }))
12657
+ }
12658
+ )
12659
+ ] }),
12660
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "grid grid-cols-2 gap-4", children: [
12661
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
12662
+ DateInput,
12663
+ {
12664
+ label: "Date de d\xE9but",
12665
+ name: "start_date",
12666
+ value: formData.start_date,
12667
+ onChange: handleInputChange
12668
+ }
12669
+ ),
12670
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
12671
+ DateInput,
12672
+ {
12673
+ label: "Date de fin",
12674
+ name: "end_date",
12675
+ value: formData.end_date,
12676
+ onChange: handleInputChange
12677
+ }
12678
+ )
12679
+ ] }),
12680
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex justify-end gap-3 pt-4 border-t border-[var(--color-border)]", children: [
12681
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
12682
+ SecondaryButton,
12683
+ {
12684
+ type: "button",
12685
+ onClick: onClose,
12686
+ disabled: loading,
12687
+ variant: "outline",
12688
+ children: "Annuler"
12689
+ }
12690
+ ),
12691
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
12692
+ Buttons_default,
12693
+ {
12694
+ type: "submit",
12695
+ disabled: loading,
12696
+ children: [
12697
+ loading && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react32.Loader2, { className: "w-4 h-4 animate-spin mr-2" }),
12698
+ task ? "Mettre \xE0 jour" : "Cr\xE9er"
12699
+ ]
12700
+ }
12701
+ )
12702
+ ] })
12703
+ ] })
12704
+ }
12705
+ );
12706
+ };
12707
+ var FormTask_default = FormTask;
12708
+
12709
+ // src/pages/workspaces/TaskPilot.tsx
12710
+ var import_jsx_runtime45 = require("react/jsx-runtime");
12711
+ var COLUMNS = [
12712
+ { id: "new", title: "\xC0 faire", color: "bg-[var(--color-surface)]" },
12713
+ { id: "in_progress", title: "En cours", color: "bg-[var(--color-info-light)]" },
12714
+ { id: "in_review", title: "En r\xE9vision", color: "bg-[var(--color-warning-light)]" },
12715
+ { id: "done", title: "Termin\xE9", color: "bg-[var(--color-success-light)]" }
12716
+ ];
12717
+ var PriorityBadge = ({ priority }) => {
12718
+ const option = TASK_PRIORITY_OPTIONS.find((p) => p.value === priority);
12719
+ if (!option) return null;
12720
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: `px-2 py-0.5 text-xs font-medium rounded ${option.color}`, children: option.label });
12721
+ };
12722
+ var TaskCard = ({ task, isDragging, onDragStart, onDragEnd, onEdit, onDelete }) => {
12723
+ const [showMenu, setShowMenu] = (0, import_react33.useState)(false);
12724
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
12725
+ "div",
12726
+ {
12727
+ draggable: true,
12728
+ onDragStart: (e) => onDragStart(e, task),
12729
+ onDragEnd,
12730
+ className: `
12731
+ bg-[var(--color-surface)] rounded-lg p-4 shadow-sm border border-[var(--color-border-light)]
12732
+ hover:shadow-md transition-all cursor-grab active:cursor-grabbing
12733
+ ${isDragging ? "opacity-50 scale-105 shadow-lg ring-2 ring-[var(--color-primary)]" : ""}
12734
+ `,
12735
+ children: [
12736
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex items-start justify-between mb-3", children: [
12737
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "flex flex-wrap gap-1.5", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(PriorityBadge, { priority: task.priority }) }),
12738
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex items-center gap-1 relative", children: [
12739
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react33.GripVertical, { className: "w-4 h-4 text-[var(--color-text-tertiary)]" }),
12740
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
12741
+ "button",
12742
+ {
12743
+ onClick: (e) => {
12744
+ e.stopPropagation();
12745
+ setShowMenu(!showMenu);
12746
+ },
12747
+ className: "p-1 hover:bg-[var(--color-surface-hover)] rounded transition-colors",
12748
+ children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react33.MoreVertical, { className: "w-4 h-4 text-[var(--color-text-tertiary)]" })
12749
+ }
12750
+ ),
12751
+ showMenu && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("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: [
12752
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
12753
+ "button",
12754
+ {
12755
+ onClick: (e) => {
12756
+ e.stopPropagation();
12757
+ onEdit(task);
12758
+ setShowMenu(false);
12759
+ },
12760
+ 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",
12761
+ children: [
12762
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react33.Edit3, { className: "w-4 h-4" }),
12763
+ "Modifier"
12764
+ ]
12765
+ }
12766
+ ),
12767
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
12768
+ "button",
12769
+ {
12770
+ onClick: (e) => {
12771
+ e.stopPropagation();
12772
+ onDelete(task);
12773
+ setShowMenu(false);
12774
+ },
12775
+ 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",
12776
+ children: [
12777
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react33.Trash2, { className: "w-4 h-4" }),
12778
+ "Supprimer"
12779
+ ]
12780
+ }
12781
+ )
12782
+ ] })
12783
+ ] })
12784
+ ] }),
12785
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("h3", { className: "font-medium text-[var(--color-text-primary)] text-sm mb-1", children: task.title }),
12786
+ task.description && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "text-xs text-[var(--color-text-secondary)] mb-4 line-clamp-2", children: task.description }),
12787
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex items-center justify-between pt-2 text-xs text-[var(--color-text-tertiary)]", children: [
12788
+ task.end_date && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex items-center gap-1", children: [
12789
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react33.Calendar, { className: "w-3.5 h-3.5" }),
12790
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { children: new Date(task.end_date).toLocaleDateString("fr-FR") })
12791
+ ] }),
12792
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex items-center gap-3", children: [
12793
+ task.comment && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "flex items-center gap-1", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react33.MessageSquare, { className: "w-3.5 h-3.5" }) }),
12794
+ task.file && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "flex items-center gap-1", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react33.Paperclip, { className: "w-3.5 h-3.5" }) })
12795
+ ] })
12796
+ ] })
12797
+ ]
12798
+ }
12799
+ );
12800
+ };
12801
+ var KanbanColumn = ({ column, tasks, onAddTask, draggedTask, onDragStart, onDragEnd, onDragOver, onDrop, isDropTarget, onEditTask, onDeleteTask }) => {
12802
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
12803
+ "div",
12804
+ {
12805
+ onDragOver,
12806
+ onDrop: (e) => onDrop(e, column.id),
12807
+ className: `
12808
+ flex flex-col rounded-xl min-w-[300px] max-w-[300px] transition-all duration-200
12809
+ ${column.color}
12810
+ ${isDropTarget ? "ring-2 ring-[var(--color-primary)] ring-dashed bg-[var(--color-primary-light)]" : ""}
12811
+ `,
12812
+ children: [
12813
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex items-center justify-between p-4 pb-3", children: [
12814
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex items-center gap-2", children: [
12815
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("h2", { className: "font-semibold text-[var(--color-text-primary)] text-sm", children: column.title }),
12816
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("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 })
12817
+ ] }),
12818
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
12819
+ "button",
12820
+ {
12821
+ onClick: () => onAddTask(column.id),
12822
+ className: "p-1 hover:bg-[var(--color-surface-hover)] rounded transition-colors",
12823
+ children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react33.Plus, { className: "w-4 h-4 text-[var(--color-text-secondary)]" })
12824
+ }
12825
+ )
12826
+ ] }),
12827
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex-1 p-2 pt-0 space-y-3 overflow-y-auto max-h-[calc(100vh-250px)]", children: [
12828
+ tasks.map((task) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
12829
+ TaskCard,
12830
+ {
12831
+ task,
12832
+ isDragging: draggedTask?.id === task.id,
12833
+ onDragStart,
12834
+ onDragEnd,
12835
+ onEdit: onEditTask,
12836
+ onDelete: onDeleteTask
12837
+ },
12838
+ task.id
12839
+ )),
12840
+ tasks.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: `
12841
+ border-2 border-dashed rounded-lg p-8 text-center transition-colors
12842
+ ${isDropTarget ? "border-[var(--color-primary)] bg-[var(--color-primary-light)]" : "border-[var(--color-border)]"}
12843
+ `, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "text-sm text-[var(--color-text-tertiary)]", children: "D\xE9posez une t\xE2che ici" }) })
12844
+ ] })
12845
+ ]
12846
+ }
12847
+ );
12848
+ };
12849
+ var TaskPilot = () => {
12850
+ const { success: showSuccess, error: showError, warning: showWarning, info: showInfo, confirm: confirm2 } = useToast();
12851
+ const [tasks, setTasks] = (0, import_react33.useState)([]);
12852
+ const [loading, setLoading] = (0, import_react33.useState)(true);
12853
+ const [searchQuery, setSearchQuery] = (0, import_react33.useState)("");
12854
+ const [draggedTask, setDraggedTask] = (0, import_react33.useState)(null);
12855
+ const [dropTargetColumn, setDropTargetColumn] = (0, import_react33.useState)(null);
12856
+ const [isFormOpen, setIsFormOpen] = (0, import_react33.useState)(false);
12857
+ const [editingTask, setEditingTask] = (0, import_react33.useState)(null);
12858
+ const [defaultStatus, setDefaultStatus] = (0, import_react33.useState)("new");
12859
+ const loadTasks = (0, import_react33.useCallback)(async () => {
12860
+ try {
12861
+ setLoading(true);
12862
+ const response = await TaskServices.list();
12863
+ const data = response;
12864
+ if (Array.isArray(data)) {
12865
+ setTasks(data);
12866
+ } else if (data.results) {
12867
+ setTasks(data.results);
12868
+ } else if (data.data) {
12869
+ setTasks(data.data);
12870
+ }
12871
+ } catch (error) {
12872
+ console.error("Error loading tasks:", error);
12873
+ showError("Erreur lors du chargement des t\xE2ches");
12874
+ } finally {
12875
+ setLoading(false);
12876
+ }
12877
+ }, [showError]);
12878
+ (0, import_react33.useEffect)(() => {
12879
+ loadTasks();
12880
+ }, [loadTasks]);
12881
+ const getTasksByStatus = (status) => {
12882
+ return tasks.filter((task) => task.status === status).filter(
12883
+ (task) => searchQuery === "" || task.title?.toLowerCase().includes(searchQuery.toLowerCase()) || task.description?.toLowerCase().includes(searchQuery.toLowerCase())
12884
+ );
12885
+ };
12886
+ const handleDragStart = (e, task) => {
12887
+ setDraggedTask(task);
12888
+ e.dataTransfer.effectAllowed = "move";
12889
+ e.dataTransfer.setData("text/plain", String(task.id));
12890
+ };
12891
+ const handleDragEnd = () => {
12892
+ setDraggedTask(null);
12893
+ setDropTargetColumn(null);
12894
+ };
12895
+ const handleDragOver = (e) => {
12896
+ e.preventDefault();
12897
+ e.dataTransfer.dropEffect = "move";
12898
+ };
12899
+ const handleDrop = async (e, columnId) => {
12900
+ e.preventDefault();
12901
+ if (draggedTask && draggedTask.status !== columnId) {
12902
+ setTasks(
12903
+ (prevTasks) => prevTasks.map(
12904
+ (task) => task.id === draggedTask.id ? { ...task, status: columnId } : task
12905
+ )
12906
+ );
12907
+ try {
12908
+ await TaskServices.updateStatus(draggedTask.id, columnId);
12909
+ showSuccess("Statut mis \xE0 jour");
12910
+ } catch (error) {
12911
+ console.error("Error updating status:", error);
12912
+ setTasks(
12913
+ (prevTasks) => prevTasks.map(
12914
+ (task) => task.id === draggedTask.id ? { ...task, status: draggedTask.status } : task
12915
+ )
12916
+ );
12917
+ showError("Erreur lors de la mise \xE0 jour");
12918
+ }
12919
+ }
12920
+ setDraggedTask(null);
12921
+ setDropTargetColumn(null);
12922
+ };
12923
+ const handleColumnDragEnter = (columnId) => {
12924
+ if (draggedTask && draggedTask.status !== columnId) {
12925
+ setDropTargetColumn(columnId);
12926
+ }
12927
+ };
12928
+ const handleColumnDragLeave = () => {
12929
+ setDropTargetColumn(null);
12930
+ };
12931
+ const handleAddTask = (status) => {
12932
+ setEditingTask(null);
12933
+ setDefaultStatus(status);
12934
+ setIsFormOpen(true);
12935
+ };
12936
+ const handleEditTask = (task) => {
12937
+ setEditingTask(task);
12938
+ setDefaultStatus(task.status);
12939
+ setIsFormOpen(true);
12940
+ };
12941
+ const handleDeleteTask = async (task) => {
12942
+ const confirmed = await confirm2("\xCAtes-vous s\xFBr de vouloir supprimer cette t\xE2che ?");
12943
+ if (!confirmed) return;
12944
+ try {
12945
+ await TaskServices.delete(task.id);
12946
+ setTasks((prev) => prev.filter((t) => t.id !== task.id));
12947
+ showSuccess("T\xE2che supprim\xE9e");
12948
+ } catch (error) {
12949
+ console.error("Error deleting task:", error);
12950
+ showError("Erreur lors de la suppression");
12951
+ }
12952
+ };
12953
+ const handleFormSuccess = () => {
12954
+ loadTasks();
12955
+ };
12956
+ if (loading) {
12957
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "h-full flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react33.Loader2, { className: "w-8 h-8 animate-spin text-[var(--color-primary)]" }) });
12958
+ }
12959
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "h-full flex flex-col", children: [
12960
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "bg-[var(--color-surface)] border-b border-[var(--color-border)] px-6 py-4", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex items-center justify-between flex-wrap gap-4", children: [
12961
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("h1", { className: "text-xl font-semibold text-[var(--color-text-primary)]", children: "Task Pilot" }),
12962
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex items-center gap-3 flex-wrap", children: [
12963
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "relative", children: [
12964
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react33.Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-[var(--color-text-tertiary)]" }),
12965
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
12966
+ "input",
12967
+ {
12968
+ type: "text",
12969
+ placeholder: "Rechercher...",
12970
+ value: searchQuery,
12971
+ onChange: (e) => setSearchQuery(e.target.value),
12972
+ 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)]"
12973
+ }
12974
+ )
12975
+ ] }),
12976
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(SecondaryButton, { variant: "outline", children: [
12977
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react33.Filter, { className: "w-4 h-4 mr-2" }),
12978
+ "Filtrer"
12979
+ ] }),
12980
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(Buttons_default, { onClick: () => handleAddTask("new"), children: [
12981
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react33.Plus, { className: "w-4 h-4 mr-2" }),
12982
+ "Nouvelle t\xE2che"
12983
+ ] })
12984
+ ] })
12985
+ ] }) }),
12986
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "flex-1 overflow-x-auto p-6 bg-[var(--color-background)]", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "flex gap-4 h-full", children: COLUMNS.map((column) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
12987
+ "div",
12988
+ {
12989
+ onDragEnter: () => handleColumnDragEnter(column.id),
12990
+ onDragLeave: handleColumnDragLeave,
12991
+ children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
12992
+ KanbanColumn,
12993
+ {
12994
+ column,
12995
+ tasks: getTasksByStatus(column.id),
12996
+ onAddTask: handleAddTask,
12997
+ draggedTask,
12998
+ onDragStart: handleDragStart,
12999
+ onDragEnd: handleDragEnd,
13000
+ onDragOver: handleDragOver,
13001
+ onDrop: handleDrop,
13002
+ isDropTarget: dropTargetColumn === column.id,
13003
+ onEditTask: handleEditTask,
13004
+ onDeleteTask: handleDeleteTask
13005
+ }
13006
+ )
13007
+ },
13008
+ column.id
13009
+ )) }) }),
13010
+ draggedTask && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("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: [
13011
+ 'D\xE9placez "',
13012
+ draggedTask.title?.substring(0, 30),
13013
+ '..." vers une colonne'
13014
+ ] }),
13015
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13016
+ FormTask_default,
13017
+ {
13018
+ open: isFormOpen,
13019
+ onClose: () => setIsFormOpen(false),
13020
+ task: editingTask,
13021
+ defaultStatus,
13022
+ onSuccess: handleFormSuccess
13023
+ }
13024
+ )
13025
+ ] });
13026
+ };
13027
+ var TaskPilot_default = TaskPilot;
13028
+
13029
+ // src/pages/workspaces/PurchaseRequestsPage.tsx
13030
+ var import_react35 = require("react");
13031
+ var import_lucide_react35 = require("lucide-react");
13032
+
13033
+ // src/pages/workspaces/FormPurchaseRequest.tsx
13034
+ var import_react34 = require("react");
13035
+ var import_lucide_react34 = require("lucide-react");
13036
+
13037
+ // src/services/PurchaseRequestServices.ts
13038
+ var VENDORS_API_URL2 = `${API_URL}/procurement/purchase-requests/`;
13039
+ var PurchaseRequestServices = {
13040
+ createPurchaseRequest: (data, token) => FetchApi.post(`${VENDORS_API_URL2}`, data, token),
13041
+ getPurchaseRequest: (id, token) => FetchApi.get(`${VENDORS_API_URL2}${id}/`, token),
13042
+ getPurchaseRequests: (token) => FetchApi.get(`${VENDORS_API_URL2}`, token),
13043
+ updatePurchaseRequest: (id, data, token) => FetchApi.put(`${VENDORS_API_URL2}${id}/`, data, token),
13044
+ deletePurchaseRequest: (id, token) => FetchApi.delete(`${VENDORS_API_URL2}${id}/`, token)
13045
+ };
13046
+
13047
+ // src/globals.ts
13048
+ var UNITS = [
13049
+ "Pi\xE8ce",
13050
+ "Unit\xE9",
13051
+ "Lot",
13052
+ "Kg",
13053
+ "Gramme",
13054
+ "Tonne",
13055
+ "Litre",
13056
+ "M\xB2",
13057
+ "M\xB3",
13058
+ "M\xE8tre",
13059
+ "Cm",
13060
+ "Heure",
13061
+ "Jour",
13062
+ "Mois"
13063
+ ];
13064
+
13065
+ // src/pages/workspaces/FormPurchaseRequest.tsx
13066
+ var import_jsx_runtime46 = require("react/jsx-runtime");
13067
+ var FormPurchaseRequest = ({
13068
+ isOpen,
13069
+ onClose,
13070
+ object,
13071
+ refresh = () => {
13072
+ }
13073
+ }) => {
13074
+ const [formData, setFormData] = (0, import_react34.useState)(object || {
13075
+ request_number: "",
13076
+ title: "",
13077
+ description: "",
13078
+ category: "",
13079
+ requester: null,
13080
+ department: null,
13081
+ cost_center: null,
13082
+ estimated_amount: 0,
13083
+ currency: "",
13084
+ budget_available: false,
13085
+ urgency: "low",
13086
+ needed_date: "",
13087
+ delivery_address: "",
13088
+ delivery_contact: "",
13089
+ delivery_phone: "",
13090
+ status: "draft",
13091
+ approval_date: null,
13092
+ approved_by: null,
13093
+ created_at: "",
13094
+ updated_at: "",
13095
+ comments: null,
13096
+ vendor: null,
13097
+ evaluation_score: null,
13098
+ evaluation_notes: null,
13099
+ evaluated_by: null,
13100
+ evaluated_at: null,
13101
+ assigned_buyer: null,
13102
+ budget_approval_requested_at: null,
13103
+ items: [
13104
+ { description: "", specifications: "", quantity: 1, unit: "", unit_price: 0, total_price: 0, comments: "" }
13105
+ ]
13106
+ });
13107
+ const [errors, setErrors] = (0, import_react34.useState)({});
13108
+ const [activeTab, setActiveTab] = (0, import_react34.useState)("general");
13109
+ const [loading, setLoading] = (0, import_react34.useState)(false);
13110
+ const { loggedUser, token } = useSession();
13111
+ const { success, error: showError } = useToast();
13112
+ const [budgetInfo, setBudgetInfo] = (0, import_react34.useState)({ totalBudget: 0, totalActual: 0, available: 0, loading: false });
13113
+ const readonly = false;
13114
+ const fetchDepartmentBudget = async (departmentId) => {
13115
+ if (!departmentId) {
13116
+ setBudgetInfo({ totalBudget: 0, totalActual: 0, available: 0, loading: false });
13117
+ return;
13118
+ }
13119
+ setBudgetInfo((prev) => ({ ...prev, loading: true }));
13120
+ try {
13121
+ const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
13122
+ const response = await fetch(
13123
+ `${API_URL}/core/departments/${departmentId}/budget-and-actual/?year=${currentYear}&category=expenses`,
13124
+ {
13125
+ headers: {
13126
+ "Authorization": `Token ${localStorage.getItem("token")}`
13127
+ }
13128
+ }
13129
+ );
13130
+ if (response.ok) {
13131
+ const data = await response.json();
13132
+ const available = (data.totals?.budget || 0) - (data.totals?.actual || 0);
13133
+ setBudgetInfo({
13134
+ totalBudget: data.totals?.budget || 0,
13135
+ totalActual: data.totals?.actual || 0,
13136
+ available,
13137
+ loading: false
13138
+ });
13139
+ } else {
13140
+ setBudgetInfo({ totalBudget: 0, totalActual: 0, available: 0, loading: false });
13141
+ }
13142
+ } catch (error) {
13143
+ console.error("Erreur lors de la r\xE9cup\xE9ration du budget:", error);
13144
+ setBudgetInfo({ totalBudget: 0, totalActual: 0, available: 0, loading: false });
13145
+ }
13146
+ };
13147
+ (0, import_react34.useEffect)(() => {
13148
+ if (formData.department) {
13149
+ fetchDepartmentBudget(formData.department);
13150
+ }
13151
+ }, [formData.department]);
13152
+ const handleInputChange = (e) => {
13153
+ const { name, value } = e.target;
13154
+ setFormData((prev) => ({ ...prev, [name]: value }));
13155
+ if (errors[name]) {
13156
+ setErrors((prev) => {
13157
+ const next = { ...prev };
13158
+ delete next[name];
13159
+ return next;
13160
+ });
13161
+ }
13162
+ };
13163
+ const selectDept = (option) => {
13164
+ setFormData({ ...formData, department: option.value });
13165
+ };
13166
+ const selectCostCenter = (option) => {
13167
+ setFormData({ ...formData, cost_center: option.value });
13168
+ };
13169
+ const handleSelectChange = (e) => {
13170
+ const { name, value } = e.target;
13171
+ setFormData((prev) => ({ ...prev, [name]: value }));
13172
+ };
13173
+ const handleTextareaChange = (e) => {
13174
+ const { name, value } = e.target;
13175
+ setFormData((prev) => ({ ...prev, [name]: value }));
13176
+ };
13177
+ const validateForm = () => {
13178
+ const newErrors = {};
13179
+ if (!formData.title?.trim()) {
13180
+ newErrors.title = "Le titre est obligatoire";
13181
+ }
13182
+ if (!formData.category?.trim()) {
13183
+ newErrors.category = "La cat\xE9gorie est obligatoire";
13184
+ }
13185
+ if (!formData.estimated_amount || formData.estimated_amount <= 0) {
13186
+ newErrors.estimated_amount = "Le montant estim\xE9 doit \xEAtre sup\xE9rieur \xE0 0";
13187
+ }
13188
+ setErrors(newErrors);
13189
+ return Object.keys(newErrors).length === 0;
13190
+ };
13191
+ const handleSavePurchaseRequest = async (entityData) => {
13192
+ try {
13193
+ if (object && object.id) {
13194
+ await PurchaseRequestServices.updatePurchaseRequest(object.id, entityData, token);
13195
+ success("Entit\xE9 modifi\xE9e avec succ\xE8s !");
13196
+ } else {
13197
+ await PurchaseRequestServices.createPurchaseRequest({ ...entityData, requester: loggedUser?.id }, token);
13198
+ success("Entit\xE9 cr\xE9\xE9e avec succ\xE8s !");
13199
+ }
13200
+ refresh();
13201
+ onClose();
13202
+ } catch (error) {
13203
+ console.error(error);
13204
+ showError("Erreur lors de l'enregistrement de l'entit\xE9");
13205
+ }
13206
+ };
13207
+ const selectVendor = (option) => {
13208
+ setFormData({ ...formData, suggered_vendor: Number(option.value) });
13209
+ };
13210
+ const handleSubmit = async (e) => {
13211
+ e.preventDefault();
13212
+ if (!validateForm()) return;
13213
+ setLoading(true);
13214
+ try {
13215
+ await handleSavePurchaseRequest(formData);
13216
+ } finally {
13217
+ setLoading(false);
13218
+ }
13219
+ };
13220
+ const tabs = [
13221
+ { id: "general", label: "G\xE9n\xE9ral", icon: import_lucide_react34.Building2 },
13222
+ { id: "items", label: "Articles", icon: import_lucide_react34.FileText },
13223
+ { id: "vendors", label: "Fournisseurs et Budgets", icon: import_lucide_react34.CreditCard }
13224
+ // { id: 'delivery', label: 'Livraison', icon: MapPin },
13225
+ ];
13226
+ const ajouterLigneAchat = () => {
13227
+ setFormData({ ...formData, items: [...formData.items ?? [], { description: "", specifications: "", quantity: 1, unit: "", unit_price: 0, total_price: 0, comments: "" }] });
13228
+ };
13229
+ const renderTabContent = () => {
13230
+ switch (activeTab) {
13231
+ case "general":
13232
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "space-y-4", children: [
13233
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
13234
+ TextInput,
13235
+ {
13236
+ label: "Num\xE9ro de demande",
13237
+ name: "request_number",
13238
+ value: formData.request_number || "",
13239
+ placeholder: "Num\xE9ro automatique",
13240
+ onChange: handleInputChange,
13241
+ disabled: true
13242
+ }
13243
+ ),
13244
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
13245
+ TextInput,
13246
+ {
13247
+ label: "Titre",
13248
+ name: "title",
13249
+ value: formData.title || "",
13250
+ placeholder: "Titre de la demande d'achat",
13251
+ required: true,
13252
+ error: errors.title,
13253
+ onChange: handleInputChange
13254
+ }
13255
+ ),
13256
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
13257
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
13258
+ TextInput,
13259
+ {
13260
+ label: "Cat\xE9gorie",
13261
+ name: "category",
13262
+ value: formData.category || "",
13263
+ placeholder: "Cat\xE9gorie de produits/services",
13264
+ required: true,
13265
+ error: errors.category,
13266
+ onChange: handleInputChange
13267
+ }
13268
+ ),
13269
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SelectDepartment, { value: formData.department, onSelect: selectDept }),
13270
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
13271
+ TextInput,
13272
+ {
13273
+ label: "Montant estim\xE9",
13274
+ name: "estimated_amount",
13275
+ value: formData.estimated_amount || "",
13276
+ placeholder: "Montant en devise",
13277
+ error: errors.estimated_amount,
13278
+ onChange: handleInputChange
13279
+ }
13280
+ ),
13281
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { children: [
13282
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "Urgence" }),
13283
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
13284
+ "select",
13285
+ {
13286
+ name: "urgency",
13287
+ value: formData.urgency || "low",
13288
+ onChange: handleSelectChange,
13289
+ 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",
13290
+ children: [
13291
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("option", { value: "low", children: "Faible" }),
13292
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("option", { value: "medium", children: "Moyenne" }),
13293
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("option", { value: "high", children: "\xC9lev\xE9e" }),
13294
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("option", { value: "critical", children: "Critique" })
13295
+ ]
13296
+ }
13297
+ )
13298
+ ] }),
13299
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
13300
+ InputField,
13301
+ {
13302
+ label: "Date de besoin",
13303
+ name: "needed_date",
13304
+ type: "date",
13305
+ min: (/* @__PURE__ */ new Date()).toISOString().split("T")[0],
13306
+ value: formData.needed_date || "",
13307
+ onChange: handleInputChange
13308
+ }
13309
+ )
13310
+ ] }),
13311
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { children: [
13312
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "Description" }),
13313
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
13314
+ "textarea",
13315
+ {
13316
+ name: "description",
13317
+ value: formData.description || "",
13318
+ onChange: handleTextareaChange,
13319
+ rows: 3,
13320
+ 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",
13321
+ placeholder: "Description d\xE9taill\xE9e de la demande"
13322
+ }
13323
+ )
13324
+ ] }),
13325
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { children: [
13326
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "Commentaires" }),
13327
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
13328
+ "textarea",
13329
+ {
13330
+ name: "comments",
13331
+ value: formData.comments || "",
13332
+ onChange: handleTextareaChange,
13333
+ rows: 2,
13334
+ 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",
13335
+ placeholder: "Commentaires additionnels"
13336
+ }
13337
+ )
13338
+ ] })
13339
+ ] });
13340
+ case "delivery":
13341
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "space-y-4", children: [
13342
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { children: [
13343
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "Adresse de livraison" }),
13344
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
13345
+ "textarea",
13346
+ {
13347
+ name: "delivery_address",
13348
+ value: formData.delivery_address || "",
13349
+ onChange: handleTextareaChange,
13350
+ rows: 3,
13351
+ 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",
13352
+ placeholder: "Adresse compl\xE8te de livraison"
13353
+ }
13354
+ )
13355
+ ] }),
13356
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
13357
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
13358
+ TextInput,
13359
+ {
13360
+ label: "Contact de livraison",
13361
+ name: "delivery_contact",
13362
+ value: formData.delivery_contact || "",
13363
+ placeholder: "Nom du contact",
13364
+ onChange: handleInputChange
13365
+ }
13366
+ ),
13367
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
13368
+ InputField,
13369
+ {
13370
+ label: "T\xE9l\xE9phone de livraison",
13371
+ name: "delivery_phone",
13372
+ type: "tel",
13373
+ value: formData.delivery_phone || "",
13374
+ placeholder: "+33 1 23 45 67 89",
13375
+ onChange: handleInputChange
13376
+ }
13377
+ )
13378
+ ] })
13379
+ ] });
13380
+ case "vendors":
13381
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "space-y-4", children: [
13382
+ (formData?.items?.reduce((sum, item) => sum + (Number(item?.total_price) || 0), 0) ?? 0) < 3e5 ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_jsx_runtime46.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SelectVendor, { value: formData.suggered_vendor, onSelect: selectVendor }) }) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_jsx_runtime46.Fragment, {}),
13383
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SelectCostCenter, { value: formData.cost_center, onSelect: selectCostCenter }) }),
13384
+ object && (formData.approval_date || formData.approved_by || formData.evaluation_score) && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "mt-6 p-4 bg-gray-50 rounded-lg", children: [
13385
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("h4", { className: "text-sm font-medium text-gray-700 mb-3", children: "Informations syst\xE8me (lecture seule)" }),
13386
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
13387
+ formData.approval_date && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { children: [
13388
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-xs text-gray-500", children: "Date d'approbation:" }),
13389
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: "text-sm", children: formData.approval_date })
13390
+ ] }),
13391
+ formData.approved_by && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { children: [
13392
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-xs text-gray-500", children: "Approuv\xE9 par:" }),
13393
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: "text-sm", children: formData.approved_by })
13394
+ ] }),
13395
+ formData.evaluation_score && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { children: [
13396
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-xs text-gray-500", children: "Note d'\xE9valuation:" }),
13397
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: "text-sm", children: formData.evaluation_score })
13398
+ ] }),
13399
+ formData.evaluated_at && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { children: [
13400
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-xs text-gray-500", children: "Date d'\xE9valuation:" }),
13401
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: "text-sm", children: formData.evaluated_at })
13402
+ ] })
13403
+ ] }),
13404
+ formData.evaluation_notes && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "mt-3", children: [
13405
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-xs text-gray-500", children: "Notes d'\xE9valuation:" }),
13406
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: "text-sm", children: formData.evaluation_notes })
13407
+ ] })
13408
+ ] })
13409
+ ] });
13410
+ case "items":
13411
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "space-y-4", children: [
13412
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex justify-between items-center", children: [
13413
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("h3", { className: "text-lg font-medium text-gray-900", children: "Articles demand\xE9s" }),
13414
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
13415
+ Buttons_default,
13416
+ {
13417
+ type: "button",
13418
+ onClick: ajouterLigneAchat,
13419
+ children: [
13420
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react34.Plus, { className: "w-4 h-4 mr-2" }),
13421
+ "Ajouter ligne"
13422
+ ]
13423
+ }
13424
+ )
13425
+ ] }),
13426
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "border border-gray-200 rounded-lg p-4", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("table", { className: "w-full", children: [
13427
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("thead", { className: "bg-[#e8eaec]", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("tr", { children: [
13428
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("th", { className: "border border-[#d1d7de] px-2 py-2 text-left text-xs font-semibold text-[#283042] uppercase", children: "D\xE9signation" }),
13429
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("th", { className: "border border-[#d1d7de] px-2 py-2 text-left text-xs font-semibold text-[#283042] uppercase", children: "Unit\xE9" }),
13430
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("th", { className: "border border-[#d1d7de] px-2 py-2 text-right text-xs font-semibold text-[#283042] uppercase", children: "Qt\xE9" }),
13431
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("th", { className: "border border-[#d1d7de] px-2 py-2 text-right text-xs font-semibold text-[#283042] uppercase", children: "Prix U. HT" }),
13432
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("th", { className: "border border-[#d1d7de] px-2 py-2 text-right text-xs font-semibold text-[#283042] uppercase", children: "Mont. HT" }),
13433
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("th", { className: "border border-[#d1d7de] px-2 py-2 text-left text-xs font-semibold text-[#283042] uppercase", children: "Commentaires" }),
13434
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("th", { className: "border border-[#d1d7de] px-2 py-2 text-center text-xs font-semibold text-[#283042] uppercase print:hidden", children: "Actions" })
13435
+ ] }) }),
13436
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("tbody", { className: "divide-y divide-[#E8E8E8]", children: formData?.items?.map((line, index) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("tr", { className: index % 2 === 0 ? "bg-white" : "bg-gray-50", children: [
13437
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("td", { className: "border border-[#d1d7de] px-2 py-2", children: !readonly ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
13438
+ "textarea",
13439
+ {
13440
+ value: line.description,
13441
+ onChange: (e) => {
13442
+ const newLignes = [...formData.items ?? []];
13443
+ newLignes[index].description = e.target.value;
13444
+ setFormData({ ...formData, items: newLignes });
13445
+ },
13446
+ rows: 2,
13447
+ className: `w-full px-1 py-1 border rounded text-xs resize-none ${errors[`line_${index}_designation`] ? "border-red-500" : "border-[#d1d7de]"}`,
13448
+ placeholder: "Description d\xE9taill\xE9e *"
13449
+ }
13450
+ ) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "text-xs", children: line.description }) }),
13451
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("td", { className: "border border-[#d1d7de] px-2 py-2", children: !readonly ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
13452
+ "select",
13453
+ {
13454
+ value: line.unit,
13455
+ onChange: (e) => {
13456
+ const newLignes = [...formData.items ?? []];
13457
+ newLignes[index].unit = e.target.value;
13458
+ setFormData({ ...formData, items: newLignes });
13459
+ },
13460
+ className: "w-full px-1 py-1 border border-[#d1d7de] rounded text-xs",
13461
+ children: UNITS.map((unit) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("option", { value: unit, children: unit }, unit))
13462
+ }
13463
+ ) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "text-xs", children: line.unit }) }),
13464
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("td", { className: "border border-[#d1d7de] px-2 py-2 text-right", children: !readonly ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
13465
+ "input",
13466
+ {
13467
+ type: "number",
13468
+ min: "0",
13469
+ value: line.quantity,
13470
+ onChange: (e) => {
13471
+ const newLignes = [...formData.items ?? []];
13472
+ const quantity = parseFloat(e.target.value) || 0;
13473
+ newLignes[index].quantity = quantity;
13474
+ newLignes[index].total_price = quantity * (newLignes[index].unit_price || 0);
13475
+ setFormData({ ...formData, items: newLignes });
13476
+ },
13477
+ className: `w-full px-1 py-1 border rounded text-xs text-right ${errors[`line_${index}_quantity`] ? "border-red-500" : "border-[#d1d7de]"}`
13478
+ }
13479
+ ) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "text-xs font-medium", children: line.quantity.toLocaleString("fr-FR") }) }),
13480
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("td", { className: "border border-[#d1d7de] px-2 py-2 text-right", children: !readonly ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
13481
+ "input",
13482
+ {
13483
+ type: "number",
13484
+ min: "0",
13485
+ value: line.unit_price,
13486
+ onChange: (e) => {
13487
+ const newLignes = [...formData.items ?? []];
13488
+ const unitPrice = parseFloat(e.target.value) || 0;
13489
+ newLignes[index].unit_price = unitPrice;
13490
+ newLignes[index].total_price = (newLignes[index].quantity || 0) * unitPrice;
13491
+ setFormData({ ...formData, items: newLignes });
13492
+ },
13493
+ className: `w-full px-1 py-1 border rounded text-xs text-right ${errors[`line_${index}_price`] ? "border-red-500" : "border-[#d1d7de]"}`
13494
+ }
13495
+ ) : /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "text-xs", children: [
13496
+ line.unit_price?.toFixed(2),
13497
+ " FCFA"
13498
+ ] }) }),
13499
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("td", { className: "border border-[#d1d7de] px-2 py-2 text-right font-medium", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "text-xs", children: [
13500
+ ((line.quantity || 0) * (line.unit_price || 0)).toFixed(2),
13501
+ " FCFA"
13502
+ ] }) }),
13503
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("td", { className: "border border-[#d1d7de] px-2 py-2", children: !readonly ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
13504
+ "textarea",
13505
+ {
13506
+ value: line.comments || "",
13507
+ onChange: (e) => {
13508
+ const newLignes = [...formData.items ?? []];
13509
+ newLignes[index].comments = e.target.value;
13510
+ setFormData({ ...formData, items: newLignes });
13511
+ },
13512
+ rows: 1,
13513
+ className: "w-full px-1 py-1 border border-[#d1d7de] rounded text-xs resize-none",
13514
+ placeholder: "Commentaires"
13515
+ }
13516
+ ) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "text-xs", children: line.comments || "-" }) }),
13517
+ !readonly && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("td", { className: "border border-[#d1d7de] px-2 py-2 text-center print:hidden", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
13518
+ Buttons_default,
13519
+ {
13520
+ onClick: () => {
13521
+ const newItems = (formData.items ?? []).filter((_, i) => i !== index);
13522
+ setFormData({ ...formData, items: newItems });
13523
+ },
13524
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react34.Trash2, { className: "w-3 h-3" })
13525
+ }
13526
+ ) })
13527
+ ] }, line.id)) })
13528
+ ] }) })
13529
+ ] });
13530
+ default:
13531
+ return null;
13532
+ }
13533
+ };
13534
+ if (!isOpen) return null;
13535
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
13536
+ Modals_default,
13537
+ {
13538
+ title: "Demande d'achat",
13539
+ width: "max-w-4xl",
13540
+ minContentHeight: "450px",
13541
+ description: ``,
13542
+ open: isOpen,
13543
+ onClose,
13544
+ children: [
13545
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "border-b border-gray-200", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("nav", { className: "flex space-x-8 px-6", children: tabs.map((tab) => {
13546
+ const Icon = tab.icon;
13547
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
13548
+ "button",
13549
+ {
13550
+ type: "button",
13551
+ onClick: () => setActiveTab(tab.id),
13552
+ className: `
13553
+ flex items-center space-x-2 py-4 px-2 text-sm font-medium border-b-2 transition-colors
13554
+ ${activeTab === tab.id ? "border-[#6A8A82] text-[#6A8A82]" : "border-transparent text-[#767676] hover:text-[#6A8A82] hover:border-[#6A8A82]/30"}
13555
+ `,
13556
+ children: [
13557
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Icon, { className: "w-4 h-4 inline mr-2" }),
13558
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { children: tab.label })
13559
+ ]
13560
+ },
13561
+ tab.id
13562
+ );
13563
+ }) }) }),
13564
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("form", { onSubmit: handleSubmit, className: "p-6", children: [
13565
+ renderTabContent(),
13566
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex justify-between pt-6 border-t border-gray-200 mt-8", children: [
13567
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
13568
+ "button",
13569
+ {
13570
+ type: "button",
13571
+ onClick: onClose,
13572
+ className: "px-6 py-2 border border-gray-300 text-gray-700 rounded-lg hover:bg-gray-50 transition-colors",
13573
+ children: "Annuler"
13574
+ }
13575
+ ),
13576
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
13577
+ Buttons_default,
13578
+ {
13579
+ type: "submit",
13580
+ disabled: loading,
13581
+ children: loading ? "chargement..." : "Enregistrer l'entit\xE9"
13582
+ }
13583
+ )
13584
+ ] })
13585
+ ] })
13586
+ ]
13587
+ }
13588
+ );
13589
+ };
13590
+
13591
+ // src/pages/workspaces/PurchaseRequestsPage.tsx
13592
+ var import_jsx_runtime47 = require("react/jsx-runtime");
13593
+ var PurchaseRequestsPage = () => {
13594
+ const [purchaseRequests, setPurchaseRequests] = (0, import_react35.useState)([]);
13595
+ const [loading, setLoading] = (0, import_react35.useState)(true);
13596
+ const [refreshToggle, setRefreshToggle] = (0, import_react35.useState)(false);
13597
+ const [showModal, setShowModal] = (0, import_react35.useState)(false);
13598
+ const [showModalRFQ, setShowModalRFQ] = (0, import_react35.useState)(false);
13599
+ const [showModalSourcing, setShowModalSourcing] = (0, import_react35.useState)(false);
13600
+ const [selectedPurchaseRequest, setSelectedPurchaseRequest] = (0, import_react35.useState)(null);
13601
+ const { token } = useSession();
13602
+ (0, import_react35.useEffect)(() => {
13603
+ }, []);
13604
+ const loadPurchaseRequests = async () => {
13605
+ setRefreshToggle((prev) => !prev);
13606
+ };
13607
+ const tabs = [
13608
+ { id: "purchase_requests", label: "Demande d'achat", icon: import_lucide_react35.ClipboardCheck },
13609
+ { id: "my_gr_se", label: "My GR-SE", icon: import_lucide_react35.ClipboardCheck }
13610
+ ];
13611
+ const [activeTab, setActiveTab] = (0, import_react35.useState)("purchase_requests");
13612
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
13613
+ Pages_default,
13614
+ {
13615
+ title: "Proculink",
13616
+ description: "G\xE9rez vos demandes d'achat",
13617
+ sideAction: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Buttons_default, { onClick: () => {
13618
+ setShowModal(true);
13619
+ setSelectedPurchaseRequest(null);
13620
+ }, children: [
13621
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react35.Plus, { className: "h-4 w-4 mr-2" }),
13622
+ " Nouvelle demande"
13623
+ ] }),
13624
+ tabs: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("nav", { className: "flex space-x-1 mt-4 overflow-x-auto", children: tabs.map((tab) => {
13625
+ const Icon = tab.icon;
13626
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
13627
+ "button",
13628
+ {
13629
+ onClick: () => setActiveTab(tab.id),
13630
+ 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"}`,
13631
+ children: [
13632
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Icon, { className: "w-4 h-4 inline mr-2" }),
13633
+ tab.label
13634
+ ]
13635
+ },
13636
+ tab.id
13637
+ );
13638
+ }) }),
13639
+ children: [
13640
+ activeTab === "purchase_requests" && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
13641
+ FDrawer,
13642
+ {
13643
+ apiEndpoint: `/procurement/purchase-requests/myself/`,
13644
+ toggle: refreshToggle,
13645
+ columns: [
13646
+ { key: "request_number", label: "N\xB0 DA", type: "text", filterable: true, sortable: true, search_name: "request_number" },
13647
+ { key: "requested_by_user", label: "Demandeur", type: "text", filterable: true, sortable: false, search_name: "requester__last_name" },
13648
+ { key: "title", label: "Titre", type: "text", filterable: true, sortable: true, search_name: "title" },
13649
+ { key: "amount", label: "Montant", type: "number", filterable: true, sortable: true, search_name: "amount" },
13650
+ { key: "vendor", label: "Fournisseur", type: "text", filterable: true, sortable: true, search_name: "vendor", formule: (item) => item.vendor_info?.legal_name ?? "" },
13651
+ { key: "created_at", label: "Date de cr\xE9ation", type: "date", filterable: true, sortable: true, search_name: "created_at" },
13652
+ { key: "status", label: "Statut", type: "text", filterable: true, sortable: true, search_name: "status" },
13653
+ {
13654
+ key: "sourcing_id",
13655
+ label: "Sourcing",
13656
+ type: "text",
13657
+ filterable: true,
13658
+ sortable: false,
13659
+ search_name: "sourcing_id",
13660
+ formule: (item) => {
13661
+ if (item.sourcing_id) {
13662
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "bg-secondary text-[13px] text-primary px-4 py-1 rounded-[4px]", onClick: () => {
13663
+ }, children: "SSJ" });
13664
+ }
13665
+ if (item.rfq) {
13666
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
13667
+ "span",
13668
+ {
13669
+ className: "bg-secondary text-[13px] text-primary px-4 py-1 rounded-[4px]",
13670
+ onClick: () => {
13671
+ setSelectedPurchaseRequest(item);
13672
+ setShowModalRFQ(true);
13673
+ },
13674
+ children: "appel d'offre"
13675
+ }
13676
+ );
13677
+ }
13678
+ return "N/A";
13679
+ }
13680
+ },
13681
+ {
13682
+ key: "approval_status",
13683
+ label: "",
13684
+ type: "custom",
13685
+ filterable: true,
13686
+ sortable: false,
13687
+ search_name: "approval_status",
13688
+ formule: (item) => {
13689
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
13690
+ ApprovalWorkflow_default,
13691
+ {
13692
+ title: `Approbation de la demande d'achat ${item.request_number} ${item.title}`,
13693
+ process: "PCR-PR",
13694
+ object_id: item.id,
13695
+ CustomBtn: (props) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Buttons_default, { className: "rounded-[6px] bg-gray-500 p-1 text-white", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react35.ClipboardCheck, {}) }),
13696
+ readOnly: false
13697
+ }
13698
+ );
13699
+ }
13700
+ }
13701
+ ],
13702
+ actions: [
13703
+ {
13704
+ label: "Modifier",
13705
+ permission: "edit_user",
13706
+ onclick: (item) => {
13707
+ setSelectedPurchaseRequest(item);
13708
+ setShowModal(true);
13709
+ }
13710
+ },
13711
+ { label: "Supprimer", permission: "delete_user", onclick: (item) => {
13712
+ } }
13713
+ ],
13714
+ ordering: "title"
13715
+ }
13716
+ ),
13717
+ activeTab === "my_gr_se" && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
13718
+ FDrawer,
13719
+ {
13720
+ apiEndpoint: `/procurement/receipts/search/`,
13721
+ columns: [
13722
+ { key: "created_at", label: "Date de cr\xE9ation", type: "date", filterable: true, sortable: true, search_name: "created_at" },
13723
+ { key: "receipt_number", label: "N\xB0 R\xE9ception", type: "text", filterable: true, sortable: false, search_name: "receipt_number" },
13724
+ { key: "type_of_receipt", label: "Type", type: "text", filterable: true, sortable: false, search_name: "type_of_receipt" },
13725
+ {
13726
+ key: "purchase_order",
13727
+ label: "N\xB0 Commande",
13728
+ type: "text",
13729
+ filterable: true,
13730
+ sortable: false,
13731
+ search_name: "purchase_order__quote_number",
13732
+ formule: (item) => item.purchase_order_info?.quote_number ?? "-"
13733
+ },
13734
+ {
13735
+ key: "vendor",
13736
+ label: "Fournisseur",
13737
+ type: "text",
13738
+ filterable: true,
13739
+ sortable: false,
13740
+ search_name: "purchase_order__vendor__legal_name",
13741
+ formule: (item) => item.purchase_order_info?.vendor_info?.legal_name ?? "-"
13742
+ },
13743
+ { key: "received_at", label: "Date de r\xE9ception", type: "date", filterable: true, sortable: true, search_name: "received_at" },
13744
+ { key: "receipt_address", label: "Lieu", type: "text", filterable: true, sortable: false, search_name: "receipt_address" },
13745
+ {
13746
+ key: "approval_status",
13747
+ label: "",
13748
+ type: "custom",
13749
+ filterable: true,
13750
+ sortable: false,
13751
+ search_name: "approval_status",
13752
+ formule: (item) => {
13753
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
13754
+ ApprovalWorkflow_default,
13755
+ {
13756
+ title: `Approbation de la reception ${item.receipt_number} ${item.purchase_order_info.quote_number}`,
13757
+ process: "PCR-RCPT",
13758
+ object_id: item.id,
13759
+ CustomBtn: (props) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Buttons_default, { className: "rounded-[6px] bg-gray-500 p-1 text-white", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react35.ClipboardCheck, {}) }),
13760
+ readOnly: false
13761
+ }
13762
+ );
13763
+ }
13764
+ },
13765
+ { key: "status", label: "Statut", type: "text", filterable: true, sortable: false, search_name: "status" }
13766
+ ],
13767
+ actions: [],
13768
+ ordering: "received_at"
13769
+ }
13770
+ ),
13771
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
13772
+ FormPurchaseRequest,
13773
+ {
13774
+ isOpen: showModal,
13775
+ onClose: () => setShowModal(false),
13776
+ refresh: loadPurchaseRequests,
13777
+ object: selectedPurchaseRequest
13778
+ },
13779
+ `PRFORM-${selectedPurchaseRequest?.id}`
13780
+ )
13781
+ ]
13782
+ }
13783
+ );
13784
+ };
13785
+
13786
+ // src/App.tsx
13787
+ var import_react_router_dom21 = require("react-router-dom");
13788
+
13789
+ // src/pages/Home.tsx
13790
+ var import_react36 = require("react");
13791
+ var import_react_router_dom5 = require("react-router-dom");
13792
+ var import_lucide_react36 = require("lucide-react");
13793
+ var import_jsx_runtime48 = require("react/jsx-runtime");
13794
+
13795
+ // src/pages/auth/Login.tsx
13796
+ var import_react37 = require("react");
13797
+ var import_lucide_react37 = require("lucide-react");
13798
+ var import_react_router_dom6 = require("react-router-dom");
13799
+ var import_jsx_runtime49 = require("react/jsx-runtime");
13800
+
13801
+ // src/pages/auth/Register.tsx
13802
+ var import_react38 = require("react");
13803
+ var import_lucide_react38 = require("lucide-react");
13804
+ var import_react_router_dom7 = require("react-router-dom");
13805
+ var import_jsx_runtime50 = require("react/jsx-runtime");
13806
+
13807
+ // src/pages/Dashboard.tsx
13808
+ var import_react39 = require("react");
13809
+ var import_react_router_dom8 = require("react-router-dom");
13810
+ var import_lucide_react39 = require("lucide-react");
13811
+ var import_jsx_runtime51 = require("react/jsx-runtime");
13812
+
13813
+ // src/pages/Analytics.tsx
13814
+ var import_lucide_react40 = require("lucide-react");
13815
+ var import_jsx_runtime52 = require("react/jsx-runtime");
13816
+
13817
+ // src/pages/Team.tsx
13818
+ var import_react40 = require("react");
13819
+ var import_lucide_react41 = require("lucide-react");
13820
+ var import_jsx_runtime53 = require("react/jsx-runtime");
13821
+
13822
+ // src/pages/Profile.tsx
13823
+ var import_react41 = require("react");
13824
+ var import_lucide_react42 = require("lucide-react");
13825
+ var import_jsx_runtime54 = require("react/jsx-runtime");
13826
+
13827
+ // src/pages/Settings.tsx
13828
+ var import_react42 = require("react");
13829
+ var import_lucide_react43 = require("lucide-react");
13830
+ var import_jsx_runtime55 = require("react/jsx-runtime");
13831
+
13832
+ // src/pages/CreateOrganization.tsx
13833
+ var import_react43 = require("react");
13834
+ var import_react_router_dom9 = require("react-router-dom");
13835
+ var import_lucide_react44 = require("lucide-react");
13836
+
13837
+ // src/services/OrganizationServices.ts
13838
+ var ORGANIZATIONS_API_URL = `${API_URL}/core/organizations/`;
13839
+ var ENTITIES_API_URL = `${API_URL}/core/entities/`;
13840
+
13841
+ // src/pages/CreateOrganization.tsx
13842
+ var import_jsx_runtime56 = require("react/jsx-runtime");
13843
+
13844
+ // src/pages/organizations/ListOrganizations.tsx
13845
+ var import_react44 = require("react");
13846
+ var import_react_router_dom10 = require("react-router-dom");
13847
+ var import_lucide_react45 = require("lucide-react");
13848
+ var import_jsx_runtime57 = require("react/jsx-runtime");
13849
+
13850
+ // src/pages/organizations/DetailOrganizations.tsx
13851
+ var import_react46 = require("react");
13852
+ var import_react_router_dom12 = require("react-router-dom");
13853
+ var import_lucide_react47 = require("lucide-react");
13854
+
13855
+ // src/pages/pricings/ListPricing.tsx
13856
+ var import_react45 = require("react");
13857
+ var import_react_router_dom11 = require("react-router-dom");
13858
+ var import_lucide_react46 = require("lucide-react");
13859
+ var import_jsx_runtime58 = require("react/jsx-runtime");
13860
+
13861
+ // src/services/PlanSubscriptionServices.tsx
13862
+ var MODULES_API_URL = `${API_URL}/core/modules/`;
13863
+ var PLANS_API_URL = `${API_URL}/core/plans/`;
13864
+
13865
+ // src/pages/organizations/DetailOrganizations.tsx
13866
+ var import_jsx_runtime59 = require("react/jsx-runtime");
13867
+
13868
+ // src/pages/organizations/DetailEntity.tsx
13869
+ var import_react48 = require("react");
13870
+ var import_react_router_dom13 = require("react-router-dom");
13871
+ var import_lucide_react49 = require("lucide-react");
13872
+
13873
+ // src/forms/UserForm.tsx
13874
+ var import_react47 = require("react");
13875
+
13876
+ // src/services/AuthorizationService.ts
13877
+ var API_BASE_URL3 = `${API_URL}/core/permissions`;
13878
+
13879
+ // src/forms/UserForm.tsx
13880
+ var import_lucide_react48 = require("lucide-react");
13881
+ var import_jsx_runtime60 = require("react/jsx-runtime");
13882
+
13883
+ // src/pages/organizations/DetailEntity.tsx
13884
+ var import_jsx_runtime61 = require("react/jsx-runtime");
13885
+
13886
+ // src/pages/pricings/CartPlan.tsx
13887
+ var import_react49 = require("react");
13888
+ var import_react_router_dom14 = require("react-router-dom");
13889
+ var import_lucide_react50 = require("lucide-react");
13890
+ var import_jsx_runtime62 = require("react/jsx-runtime");
13891
+
13892
+ // src/App.tsx
13893
+ var import_lucide_react65 = require("lucide-react");
13894
+
13895
+ // src/pages/auth/ForgotPassword.tsx
13896
+ var import_react50 = require("react");
13897
+ var import_react_router_dom15 = require("react-router-dom");
13898
+ var import_lucide_react51 = require("lucide-react");
13899
+ var import_jsx_runtime63 = require("react/jsx-runtime");
13900
+
13901
+ // src/pages/auth/ResetPassword.tsx
13902
+ var import_react51 = require("react");
13903
+ var import_react_router_dom16 = require("react-router-dom");
13904
+ var import_lucide_react52 = require("lucide-react");
13905
+ var import_jsx_runtime64 = require("react/jsx-runtime");
13906
+
13907
+ // src/pages/auth/RespondInvitationEmail.tsx
13908
+ var import_react52 = require("react");
13909
+ var import_react_router_dom17 = require("react-router-dom");
13910
+ var import_lucide_react53 = require("lucide-react");
13911
+ var import_jsx_runtime65 = require("react/jsx-runtime");
13912
+
13913
+ // src/pages/parameters/ProfitCostCenterPage.tsx
13914
+ var import_react53 = require("react");
13915
+ var import_react_router_dom18 = require("react-router-dom");
13916
+ var import_lucide_react54 = require("lucide-react");
13917
+ var import_jsx_runtime66 = require("react/jsx-runtime");
13918
+
13919
+ // src/pages/parameters/ParametersPage.tsx
13920
+ var import_react_router_dom19 = require("react-router-dom");
13921
+ var import_lucide_react55 = require("lucide-react");
13922
+ var import_jsx_runtime67 = require("react/jsx-runtime");
13923
+
13924
+ // src/pages/users/UsersPage.tsx
13925
+ var import_react54 = require("react");
13926
+ var import_lucide_react56 = require("lucide-react");
13927
+ var import_jsx_runtime68 = require("react/jsx-runtime");
13928
+
13929
+ // src/pages/onboarding/OnboardingWizard.tsx
13930
+ var import_react59 = require("react");
13931
+ var import_react_router_dom20 = require("react-router-dom");
13932
+ var import_lucide_react62 = require("lucide-react");
13933
+
13934
+ // src/pages/onboarding/components/StepIndicator.tsx
13935
+ var import_react55 = __toESM(require("react"), 1);
13936
+ var import_lucide_react57 = require("lucide-react");
13937
+ var import_jsx_runtime69 = require("react/jsx-runtime");
13938
+
13939
+ // src/pages/onboarding/steps/WelcomeStep.tsx
13940
+ var import_lucide_react58 = require("lucide-react");
13941
+ var import_jsx_runtime70 = require("react/jsx-runtime");
13942
+
13943
+ // src/pages/onboarding/steps/OrganizationStep.tsx
13944
+ var import_react56 = require("react");
13945
+ var import_lucide_react59 = require("lucide-react");
13946
+ var import_jsx_runtime71 = require("react/jsx-runtime");
13947
+
13948
+ // src/pages/onboarding/steps/EntityStep.tsx
13949
+ var import_react57 = require("react");
13950
+ var import_lucide_react60 = require("lucide-react");
13951
+ var import_jsx_runtime72 = require("react/jsx-runtime");
13952
+
13953
+ // src/pages/onboarding/steps/ConfirmationStep.tsx
13954
+ var import_react58 = require("react");
13955
+ var import_lucide_react61 = require("lucide-react");
13956
+ var import_jsx_runtime73 = require("react/jsx-runtime");
13957
+
13958
+ // src/pages/onboarding/OnboardingWizard.tsx
13959
+ var import_jsx_runtime74 = require("react/jsx-runtime");
13960
+
13961
+ // src/pages/parameters/CrmParametersPage.tsx
13962
+ var import_react60 = require("react");
13963
+ var import_lucide_react63 = require("lucide-react");
13964
+
13965
+ // src/services/CrmServices.ts
13966
+ var TARGET_RETAILER_URI = `${API_URL}/crm/target-retailers/`;
13967
+ var DAS_URI = `${API_URL}/crm/das/`;
13968
+ var OTHER_COST_URI = `${API_URL}/crm/other-costs/`;
13969
+ var LEAD_NEED_URI = `${API_URL}/crm/lead-needs/`;
13970
+
13971
+ // src/pages/parameters/CrmParametersPage.tsx
13972
+ var import_jsx_runtime75 = require("react/jsx-runtime");
13973
+
13974
+ // src/pages/organizations/EntitiesPage.tsx
13975
+ var import_react61 = require("react");
13976
+ var import_lucide_react64 = require("lucide-react");
13977
+ var import_jsx_runtime76 = require("react/jsx-runtime");
13978
+
13979
+ // src/App.tsx
13980
+ var import_jsx_runtime77 = require("react/jsx-runtime");
13981
+ var WorkSpaceRoutes = ({ module_name = "Rewise", module_description = "" }) => {
13982
+ const { showAuthModal, setShowAuthModal } = useSession();
13983
+ const primaryMenuItems = [
13984
+ { id: "home", label: "Home", path: "/workspace/", icon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_lucide_react65.HomeIcon, { className: "w-4 h-4" }) },
13985
+ { id: "task-pilot", label: "Task Pilot", path: "/workspace/task-pilot", icon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_lucide_react65.Workflow, { className: "w-4 h-4" }) },
13986
+ { id: "proculink", label: "ProcuLink", path: "/workspace/proculink", icon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_lucide_react65.TrendingUp, { className: "w-4 h-4" }) },
13987
+ { id: "fixitnow", label: "Fix It Now", path: "/workspace/fix-it-now", icon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_lucide_react65.SettingsIcon, { className: "w-4 h-4" }) },
13988
+ { id: "hr-connect", label: "HR Connect", path: "/workspace/hr-connect", icon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_lucide_react65.UserCog, { className: "w-4 h-4" }) },
13989
+ { id: "meeting-hub", label: "Meeting Hub", path: "/workspace/meeting-hub", icon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_lucide_react65.Calendar, { className: "w-4 h-4" }) },
13990
+ { id: "budget", label: "Budget", icon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_lucide_react65.CircleDollarSign, { className: "w-4 h-4" }) },
13991
+ { id: "chat-equipe", label: "Chat Equipe", path: "/workspace/chat-equipe", icon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_lucide_react65.MessageCircle, { className: "w-4 h-4" }) },
13992
+ { id: "actifs", label: "Actifs", path: "/workspace/actifs", icon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_lucide_react65.Building2, { className: "w-4 h-4" }) },
13993
+ { id: "planning", label: "Planning", path: "/workspace/planning", icon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_lucide_react65.CalendarClock, { className: "w-4 h-4" }) }
13994
+ ];
13995
+ const secondaryMenuItems = {
13996
+ budget: [
13997
+ { id: "opex", label: "OPEX", path: "budget/opex", icon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_lucide_react65.Eye, { className: "w-4 h-4" }) },
13998
+ { id: "capex", label: "CAPEX", path: "budget/capex", icon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_lucide_react65.Eye, { className: "w-4 h-4" }) },
13999
+ { id: "car", label: "CAR", path: "budget/car", icon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_lucide_react65.Eye, { className: "w-4 h-4" }) }
14000
+ ]
14001
+ };
14002
+ return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(ModernDoubleSidebarLayout_default, { module_name, module_description, primaryMenuItems, secondaryMenuItems, children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_react_router_dom21.Routes, { children: [
14003
+ /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react_router_dom21.Route, { path: "workspace", element: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(WorkSpace_default, {}) }),
14004
+ /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react_router_dom21.Route, { path: "task-pilot", element: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(TaskPilot_default, {}) }),
14005
+ /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react_router_dom21.Route, { path: "proculink", element: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(PurchaseRequestsPage, {}) }),
14006
+ /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react_router_dom21.Route, { path: "hr-connect", element: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(HRConnectPage_default, {}) }),
14007
+ /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react_router_dom21.Route, { path: "meeting-hub", element: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(MeetingHubPage_default, {}) }),
14008
+ /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react_router_dom21.Route, { path: "budget/*", element: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(BudgetPage_default, {}) }),
14009
+ /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react_router_dom21.Route, { path: "chat-equipe", element: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(ChatEquipePage_default, {}) }),
14010
+ /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react_router_dom21.Route, { path: "actifs", element: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(ActifsPage_default, {}) }),
14011
+ /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react_router_dom21.Route, { path: "planning", element: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(PlanningPage_default, {}) })
14012
+ ] }) });
14013
+ };
11864
14014
  // Annotate the CommonJS export names for ESM import in node:
11865
14015
  0 && (module.exports = {
11866
14016
  ACCOUNT_TYPE_LABELS,
11867
14017
  AccountServices,
11868
14018
  AccountingWorkspace,
14019
+ ActifsPage,
11869
14020
  Alert,
11870
14021
  AlertProvider,
11871
14022
  ApprovalAnswerModal,
@@ -11875,9 +14026,11 @@ var WorkSpace_default = WorkSpace;
11875
14026
  ApprovalWorkflow,
11876
14027
  AuthServices,
11877
14028
  BALANCE_TYPE_LABELS,
14029
+ BudgetPage,
11878
14030
  CHOICES,
11879
14031
  CardBody,
11880
14032
  CardHeader,
14033
+ ChatEquipePage,
11881
14034
  ClientServices,
11882
14035
  CountrySelector,
11883
14036
  CrmWorkspace,
@@ -11896,10 +14049,12 @@ var WorkSpace_default = WorkSpace;
11896
14049
  ForeignCurrencySelector,
11897
14050
  FormClient,
11898
14051
  FormVendor,
14052
+ HRConnectPage,
11899
14053
  InfoBox,
11900
14054
  InputField,
11901
14055
  InvoiceTypeSelector,
11902
14056
  LegalFormSelector,
14057
+ MeetingHubPage,
11903
14058
  MinimalVendorForm,
11904
14059
  Modal,
11905
14060
  ModernCard,
@@ -11907,12 +14062,15 @@ var WorkSpace_default = WorkSpace;
11907
14062
  PRINT_GREEN,
11908
14063
  Pages,
11909
14064
  PaymentMethodSelector,
14065
+ PlanningPage,
11910
14066
  PrimaryButton,
11911
14067
  PrintPreview,
11912
14068
  PrintableDocument,
14069
+ PurchaseRequestsPage,
11913
14070
  PurchaseWorkspace,
11914
14071
  RewiseLayout,
11915
14072
  SYSCOHADA_CLASSES,
14073
+ SearchableSelect,
11916
14074
  SecondaryButton,
11917
14075
  SelectAccount,
11918
14076
  SelectClient,
@@ -11926,6 +14084,7 @@ var WorkSpace_default = WorkSpace;
11926
14084
  SignatureSection,
11927
14085
  StatCard,
11928
14086
  TEMPLATE_FNE_CHOICES,
14087
+ TaskPilot,
11929
14088
  TaxSelector,
11930
14089
  TemplateFNESelector,
11931
14090
  TextInput,
@@ -11937,6 +14096,7 @@ var WorkSpace_default = WorkSpace;
11937
14096
  UserServices,
11938
14097
  VendorServices,
11939
14098
  WorkSpace,
14099
+ WorkSpaceRoutes,
11940
14100
  WorkspaceServices,
11941
14101
  fileManagerApi,
11942
14102
  formatCurrency,