ptechcore_ui 1.0.17 → 1.0.19

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
@@ -34,7 +34,9 @@ __export(index_exports, {
34
34
  ApprovalAnswerModal: () => ApprovalAnswerModal,
35
35
  ApprovalAnswerPage: () => ApprovalAnswerPage,
36
36
  ApprovalPreviewAnswer: () => ApprovalPreviewAnswer_default,
37
+ ApprovalServices: () => ApprovalServices,
37
38
  ApprovalWorkflow: () => ApprovalWorkflow_default,
39
+ AuthServices: () => AuthServices,
38
40
  CHOICES: () => Choices_default,
39
41
  CountrySelector: () => CountrySelector,
40
42
  DateInput: () => DateInput,
@@ -3755,7 +3757,7 @@ var useAlert = () => {
3755
3757
  };
3756
3758
 
3757
3759
  // src/components/common/CommonSelect.tsx
3758
- var import_react50 = require("react");
3760
+ var import_react76 = require("react");
3759
3761
 
3760
3762
  // src/services/VendorServices.ts
3761
3763
  var VENDORS_API_URL = `${API_URL}/accounting/vendors/`;
@@ -3905,10 +3907,100 @@ var import_jsx_runtime64 = require("react/jsx-runtime");
3905
3907
  var import_react47 = require("react");
3906
3908
  var import_jsx_runtime65 = require("react/jsx-runtime");
3907
3909
  var import_jsx_runtime66 = require("react/jsx-runtime");
3908
- var import_react48 = require("react");
3910
+ var import_react_router_dom17 = require("react-router-dom");
3909
3911
  var import_jsx_runtime67 = require("react/jsx-runtime");
3912
+ var import_react48 = __toESM(require("react"), 1);
3913
+ var import_react_router_dom18 = require("react-router-dom");
3914
+ var import_lucide_react29 = require("lucide-react");
3915
+ var import_clsx5 = require("clsx");
3916
+ var import_tailwind_merge5 = require("tailwind-merge");
3917
+ var import_react49 = require("react");
3910
3918
  var import_jsx_runtime68 = require("react/jsx-runtime");
3919
+ var import_react50 = require("react");
3911
3920
  var import_jsx_runtime69 = require("react/jsx-runtime");
3921
+ var import_react51 = require("react");
3922
+ var import_jsx_runtime70 = require("react/jsx-runtime");
3923
+ var import_react52 = require("react");
3924
+ var import_jsx_runtime71 = require("react/jsx-runtime");
3925
+ var import_lucide_react30 = require("lucide-react");
3926
+ var import_react_router_dom19 = require("react-router-dom");
3927
+ var import_jsx_runtime72 = require("react/jsx-runtime");
3928
+ var import_jsx_runtime73 = require("react/jsx-runtime");
3929
+ var import_react53 = require("react");
3930
+ var import_lucide_react31 = require("lucide-react");
3931
+ var import_jsx_runtime74 = require("react/jsx-runtime");
3932
+ var import_lucide_react32 = require("lucide-react");
3933
+ var import_react54 = require("react");
3934
+ var import_jsx_runtime75 = require("react/jsx-runtime");
3935
+ var import_react55 = require("react");
3936
+ var import_react_router_dom20 = require("react-router-dom");
3937
+ var import_lucide_react33 = require("lucide-react");
3938
+ var import_jsx_runtime76 = require("react/jsx-runtime");
3939
+ var import_react56 = require("react");
3940
+ var import_react57 = require("react");
3941
+ var import_lucide_react34 = require("lucide-react");
3942
+ var import_jsx_runtime77 = require("react/jsx-runtime");
3943
+ var import_lucide_react35 = require("lucide-react");
3944
+ var import_jsx_runtime78 = require("react/jsx-runtime");
3945
+ var import_react58 = require("react");
3946
+ var import_jsx_runtime79 = require("react/jsx-runtime");
3947
+ var import_jsx_runtime80 = require("react/jsx-runtime");
3948
+ var import_react59 = require("react");
3949
+ var import_jsx_runtime81 = require("react/jsx-runtime");
3950
+ var import_jsx_runtime82 = require("react/jsx-runtime");
3951
+ var import_react_router_dom21 = require("react-router-dom");
3952
+ var import_jsx_runtime83 = require("react/jsx-runtime");
3953
+ var import_react60 = __toESM(require("react"), 1);
3954
+ var import_react_router_dom22 = require("react-router-dom");
3955
+ var import_lucide_react36 = require("lucide-react");
3956
+ var import_clsx6 = require("clsx");
3957
+ var import_tailwind_merge6 = require("tailwind-merge");
3958
+ var import_react61 = require("react");
3959
+ var import_jsx_runtime84 = require("react/jsx-runtime");
3960
+ var import_react62 = require("react");
3961
+ var import_jsx_runtime85 = require("react/jsx-runtime");
3962
+ var import_react63 = require("react");
3963
+ var import_jsx_runtime86 = require("react/jsx-runtime");
3964
+ var import_react64 = require("react");
3965
+ var import_jsx_runtime87 = require("react/jsx-runtime");
3966
+ var import_lucide_react37 = require("lucide-react");
3967
+ var import_react_router_dom23 = require("react-router-dom");
3968
+ var import_jsx_runtime88 = require("react/jsx-runtime");
3969
+ var import_jsx_runtime89 = require("react/jsx-runtime");
3970
+ var import_react65 = require("react");
3971
+ var import_lucide_react38 = require("lucide-react");
3972
+ var import_jsx_runtime90 = require("react/jsx-runtime");
3973
+ var import_lucide_react39 = require("lucide-react");
3974
+ var import_react66 = require("react");
3975
+ var import_jsx_runtime91 = require("react/jsx-runtime");
3976
+ var import_react67 = require("react");
3977
+ var import_react_router_dom24 = require("react-router-dom");
3978
+ var import_lucide_react40 = require("lucide-react");
3979
+ var import_jsx_runtime92 = require("react/jsx-runtime");
3980
+ var import_react68 = require("react");
3981
+ var import_react69 = require("react");
3982
+ var import_lucide_react41 = require("lucide-react");
3983
+ var import_jsx_runtime93 = require("react/jsx-runtime");
3984
+ var import_lucide_react42 = require("lucide-react");
3985
+ var import_jsx_runtime94 = require("react/jsx-runtime");
3986
+ var import_react70 = require("react");
3987
+ var import_jsx_runtime95 = require("react/jsx-runtime");
3988
+ var import_jsx_runtime96 = require("react/jsx-runtime");
3989
+ var import_react71 = require("react");
3990
+ var import_jsx_runtime97 = require("react/jsx-runtime");
3991
+ var import_jsx_runtime98 = require("react/jsx-runtime");
3992
+ var import_react72 = require("react");
3993
+ var import_jsx_runtime99 = require("react/jsx-runtime");
3994
+ var import_jsx_runtime100 = require("react/jsx-runtime");
3995
+ var import_jsx_runtime101 = require("react/jsx-runtime");
3996
+ var import_react73 = require("react");
3997
+ var import_jsx_runtime102 = require("react/jsx-runtime");
3998
+ var import_jsx_runtime103 = require("react/jsx-runtime");
3999
+ var import_jsx_runtime104 = require("react/jsx-runtime");
4000
+ var import_react74 = require("react");
4001
+ var import_jsx_runtime105 = require("react/jsx-runtime");
4002
+ var import_jsx_runtime106 = require("react/jsx-runtime");
4003
+ var import_jsx_runtime107 = require("react/jsx-runtime");
3912
4004
  var PrimaryButton2 = ({
3913
4005
  loading = false,
3914
4006
  children,
@@ -3991,8 +4083,9 @@ var TextInput2 = (props) => {
3991
4083
  return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(InputField2, { ...props, type: "text" });
3992
4084
  };
3993
4085
  var ThemeContext2 = (0, import_react13.createContext)(void 0);
3994
- var ADDRESS_IP2 = "localhost:8000";
3995
- var ADDRESS_IP_URL2 = `http://${ADDRESS_IP2}/`;
4086
+ var chooseEnv2 = localStorage.getItem("env") ?? "prod";
4087
+ var ADDRESS_IP2 = chooseEnv2 === "prod" ? "back.rewise.praeduim-tech.com" : "localhost:8000";
4088
+ var ADDRESS_IP_URL2 = chooseEnv2 === "prod" ? `https://${ADDRESS_IP2}/` : `http://${ADDRESS_IP2}/`;
3996
4089
  var API_URL2 = `${ADDRESS_IP_URL2}api`;
3997
4090
  var API_BASE_URL3 = `${API_URL2}/core/auth/`;
3998
4091
  var SessionContext2 = (0, import_react14.createContext)(void 0);
@@ -4003,8 +4096,9 @@ var APPROVAL_API_URL2 = `${API_URL2}/approvals/cases/`;
4003
4096
  var AlertContext2 = (0, import_react22.createContext)(void 0);
4004
4097
  var VENDORS_API_URL2 = `${API_URL2}/accounting/vendors/`;
4005
4098
  var ThemeContext22 = (0, import_react25.createContext)(void 0);
4006
- var ADDRESS_IP22 = "localhost:8000";
4007
- var ADDRESS_IP_URL22 = `http://${ADDRESS_IP22}/`;
4099
+ var chooseEnv22 = localStorage.getItem("env") ?? "prod";
4100
+ var ADDRESS_IP22 = chooseEnv22 === "prod" ? "back.rewise.praeduim-tech.com" : "localhost:8000";
4101
+ var ADDRESS_IP_URL22 = chooseEnv22 === "prod" ? `https://${ADDRESS_IP22}/` : `http://${ADDRESS_IP22}/`;
4008
4102
  var API_URL22 = `${ADDRESS_IP_URL22}api`;
4009
4103
  var API_BASE_URL32 = `${API_URL22}/core/auth/`;
4010
4104
  var SessionContext22 = (0, import_react26.createContext)(void 0);
@@ -4025,18 +4119,50 @@ var USERS_API_URL222 = `${API_URL222}/core/users/`;
4025
4119
  var ToastContext222 = (0, import_react39.createContext)(void 0);
4026
4120
  var APPROVAL_API_URL222 = `${API_URL222}/approvals/cases/`;
4027
4121
  var AlertContext222 = (0, import_react46.createContext)(void 0);
4028
- var URI = `${API_URL22}/core/departments/`;
4029
- var URI2 = `${API_URL22}/accounting/profit-or-cost-center/`;
4030
- var COST_URI = `${API_URL22}/accounting/cost-center/`;
4031
- var PROFIT_URI = `${API_URL22}/accounting/profit-center/`;
4032
- var URI3 = `${API_URL2}/core/departments/`;
4033
- var URI4 = `${API_URL2}/accounting/profit-or-cost-center/`;
4034
- var COST_URI2 = `${API_URL2}/accounting/cost-center/`;
4035
- var PROFIT_URI2 = `${API_URL2}/accounting/profit-center/`;
4122
+ var VENDORS_API_URL222 = `${API_URL222}/accounting/vendors/`;
4123
+ var ThemeContext2222 = (0, import_react49.createContext)(void 0);
4124
+ var ADDRESS_IP2222 = "localhost:8000";
4125
+ var ADDRESS_IP_URL2222 = `http://${ADDRESS_IP2222}/`;
4126
+ var API_URL2222 = `${ADDRESS_IP_URL2222}api`;
4127
+ var API_BASE_URL3222 = `${API_URL2222}/core/auth/`;
4128
+ var SessionContext2222 = (0, import_react50.createContext)(void 0);
4129
+ var API_BASE_URL22222 = `${API_URL2222}/core/auth/`;
4130
+ var USERS_API_URL2222 = `${API_URL2222}/core/users/`;
4131
+ var ToastContext2222 = (0, import_react51.createContext)(void 0);
4132
+ var APPROVAL_API_URL2222 = `${API_URL2222}/approvals/cases/`;
4133
+ var AlertContext2222 = (0, import_react58.createContext)(void 0);
4134
+ var VENDORS_API_URL2222 = `${API_URL2222}/accounting/vendors/`;
4135
+ var ThemeContext22222 = (0, import_react61.createContext)(void 0);
4136
+ var ADDRESS_IP22222 = "localhost:8000";
4137
+ var ADDRESS_IP_URL22222 = `http://${ADDRESS_IP22222}/`;
4138
+ var API_URL22222 = `${ADDRESS_IP_URL22222}api`;
4139
+ var API_BASE_URL32222 = `${API_URL22222}/core/auth/`;
4140
+ var SessionContext22222 = (0, import_react62.createContext)(void 0);
4141
+ var API_BASE_URL222222 = `${API_URL22222}/core/auth/`;
4142
+ var USERS_API_URL22222 = `${API_URL22222}/core/users/`;
4143
+ var ToastContext22222 = (0, import_react63.createContext)(void 0);
4144
+ var APPROVAL_API_URL22222 = `${API_URL22222}/approvals/cases/`;
4145
+ var AlertContext22222 = (0, import_react70.createContext)(void 0);
4146
+ var URI = `${API_URL2222}/core/departments/`;
4147
+ var URI2 = `${API_URL2222}/accounting/profit-or-cost-center/`;
4148
+ var COST_URI = `${API_URL2222}/accounting/cost-center/`;
4149
+ var PROFIT_URI = `${API_URL2222}/accounting/profit-center/`;
4150
+ var URI3 = `${API_URL222}/core/departments/`;
4151
+ var URI4 = `${API_URL222}/accounting/profit-or-cost-center/`;
4152
+ var COST_URI2 = `${API_URL222}/accounting/cost-center/`;
4153
+ var PROFIT_URI2 = `${API_URL222}/accounting/profit-center/`;
4154
+ var URI5 = `${API_URL22}/core/departments/`;
4155
+ var URI6 = `${API_URL22}/accounting/profit-or-cost-center/`;
4156
+ var COST_URI3 = `${API_URL22}/accounting/cost-center/`;
4157
+ var PROFIT_URI3 = `${API_URL22}/accounting/profit-center/`;
4158
+ var URI7 = `${API_URL2}/core/departments/`;
4159
+ var URI8 = `${API_URL2}/accounting/profit-or-cost-center/`;
4160
+ var COST_URI4 = `${API_URL2}/accounting/cost-center/`;
4161
+ var PROFIT_URI4 = `${API_URL2}/accounting/profit-center/`;
4036
4162
 
4037
4163
  // src/components/common/FormVendor.tsx
4038
- var import_react49 = require("react");
4039
- var import_jsx_runtime70 = require("react/jsx-runtime");
4164
+ var import_react75 = require("react");
4165
+ var import_jsx_runtime108 = require("react/jsx-runtime");
4040
4166
  var MinimalVendorForm = ({
4041
4167
  isOpen,
4042
4168
  onClose,
@@ -4045,13 +4171,13 @@ var MinimalVendorForm = ({
4045
4171
  refresh = () => {
4046
4172
  }
4047
4173
  }) => {
4048
- const [formData, setFormData] = (0, import_react49.useState)(object || {
4174
+ const [formData, setFormData] = (0, import_react75.useState)(object || {
4049
4175
  from_module: from ?? null,
4050
4176
  legal_name: "",
4051
4177
  trading_name: ""
4052
4178
  });
4053
- const [errors, setErrors] = (0, import_react49.useState)({});
4054
- const [loading, setLoading] = (0, import_react49.useState)(false);
4179
+ const [errors, setErrors] = (0, import_react75.useState)({});
4180
+ const [loading, setLoading] = (0, import_react75.useState)(false);
4055
4181
  const { token } = useSession();
4056
4182
  const { success, error: showError } = useToast();
4057
4183
  const handleInputChange = (e) => {
@@ -4110,7 +4236,7 @@ var MinimalVendorForm = ({
4110
4236
  }
4111
4237
  };
4112
4238
  if (!isOpen) return null;
4113
- return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
4239
+ return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
4114
4240
  Modals_default2,
4115
4241
  {
4116
4242
  title: "Ajouter un fournisseur",
@@ -4118,9 +4244,9 @@ var MinimalVendorForm = ({
4118
4244
  description: ``,
4119
4245
  open: isOpen,
4120
4246
  onClose,
4121
- children: /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("form", { onSubmit: handleSubmit, className: "p-", children: [
4122
- /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
4123
- /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
4247
+ children: /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("form", { onSubmit: handleSubmit, className: "p-", children: [
4248
+ /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("div", { className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
4249
+ /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
4124
4250
  TextInput2,
4125
4251
  {
4126
4252
  label: "Raison sociale",
@@ -4132,7 +4258,7 @@ var MinimalVendorForm = ({
4132
4258
  onChange: handleInputChange
4133
4259
  }
4134
4260
  ),
4135
- /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
4261
+ /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
4136
4262
  TextInput2,
4137
4263
  {
4138
4264
  label: "Nom commercial",
@@ -4143,8 +4269,8 @@ var MinimalVendorForm = ({
4143
4269
  }
4144
4270
  )
4145
4271
  ] }) }),
4146
- /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "flex justify-between pt-6 mt-8", children: [
4147
- /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
4272
+ /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { className: "flex justify-between pt-6 mt-8", children: [
4273
+ /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
4148
4274
  "button",
4149
4275
  {
4150
4276
  type: "button",
@@ -4153,7 +4279,7 @@ var MinimalVendorForm = ({
4153
4279
  children: "Annuler"
4154
4280
  }
4155
4281
  ),
4156
- /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
4282
+ /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
4157
4283
  Buttons_default2,
4158
4284
  {
4159
4285
  type: "button",
@@ -4169,43 +4295,43 @@ var MinimalVendorForm = ({
4169
4295
  };
4170
4296
 
4171
4297
  // src/services/DepartmentServices.ts
4172
- var URI5 = `${API_URL}/core/departments/`;
4298
+ var URI9 = `${API_URL}/core/departments/`;
4173
4299
  var DepartmentServices = {
4174
- create: (data) => FetchApi.post(`${URI5}`, data),
4175
- get: (id) => FetchApi.get(`${URI5}${id}/`),
4176
- list: (params) => FetchApi.get(`${URI5}?${new URLSearchParams(params).toString()}`),
4177
- update: (id, data) => FetchApi.put(`${URI5}${id}/`, data),
4178
- delete: (id) => FetchApi.delete(`${URI5}${id}/`)
4300
+ create: (data) => FetchApi.post(`${URI9}`, data),
4301
+ get: (id) => FetchApi.get(`${URI9}${id}/`),
4302
+ list: (params) => FetchApi.get(`${URI9}?${new URLSearchParams(params).toString()}`),
4303
+ update: (id, data) => FetchApi.put(`${URI9}${id}/`, data),
4304
+ delete: (id) => FetchApi.delete(`${URI9}${id}/`)
4179
4305
  };
4180
4306
 
4181
4307
  // src/services/ProfitCostsServices.ts
4182
- var URI6 = `${API_URL}/accounting/profit-or-cost-center/`;
4183
- var COST_URI3 = `${API_URL}/accounting/cost-center/`;
4308
+ var URI10 = `${API_URL}/accounting/profit-or-cost-center/`;
4309
+ var COST_URI5 = `${API_URL}/accounting/cost-center/`;
4184
4310
  var CostServices = {
4185
- create: (data) => FetchApi.post(`${COST_URI3}`, data),
4186
- get: (id) => FetchApi.get(`${COST_URI3}${id}/`),
4187
- list: (params) => FetchApi.get(`${COST_URI3}?${new URLSearchParams(params).toString()}`),
4188
- update: (id, data) => FetchApi.put(`${COST_URI3}${id}/`, data),
4189
- delete: (id) => FetchApi.delete(`${COST_URI3}${id}/`)
4311
+ create: (data) => FetchApi.post(`${COST_URI5}`, data),
4312
+ get: (id) => FetchApi.get(`${COST_URI5}${id}/`),
4313
+ list: (params) => FetchApi.get(`${COST_URI5}?${new URLSearchParams(params).toString()}`),
4314
+ update: (id, data) => FetchApi.put(`${COST_URI5}${id}/`, data),
4315
+ delete: (id) => FetchApi.delete(`${COST_URI5}${id}/`)
4190
4316
  };
4191
- var PROFIT_URI3 = `${API_URL}/accounting/profit-center/`;
4317
+ var PROFIT_URI5 = `${API_URL}/accounting/profit-center/`;
4192
4318
 
4193
4319
  // src/components/common/CommonSelect.tsx
4194
- var import_jsx_runtime71 = require("react/jsx-runtime");
4320
+ var import_jsx_runtime109 = require("react/jsx-runtime");
4195
4321
  var SelectVendor = ({
4196
4322
  value,
4197
4323
  onSelect
4198
4324
  }) => {
4199
- const [showModal, setShowModal] = (0, import_react50.useState)(false);
4200
- const [selectedVendor, setSelectedVendor] = (0, import_react50.useState)(null);
4325
+ const [showModal, setShowModal] = (0, import_react76.useState)(false);
4326
+ const [selectedVendor, setSelectedVendor] = (0, import_react76.useState)(null);
4201
4327
  const { token, activeBusinessEntity } = useSession();
4202
- const [vendors, setVendors] = (0, import_react50.useState)(() => {
4328
+ const [vendors, setVendors] = (0, import_react76.useState)(() => {
4203
4329
  const cacheKey = `vendors_cache_${activeBusinessEntity?.id || "default"}`;
4204
4330
  const cached = sessionStorage.getItem(cacheKey);
4205
4331
  return cached ? JSON.parse(cached) : [];
4206
4332
  });
4207
- const [loadingVendors, setLoadingVendors] = (0, import_react50.useState)(false);
4208
- (0, import_react50.useEffect)(() => {
4333
+ const [loadingVendors, setLoadingVendors] = (0, import_react76.useState)(false);
4334
+ (0, import_react76.useEffect)(() => {
4209
4335
  const cacheKey = `vendors_cache_${activeBusinessEntity?.id || "default"}`;
4210
4336
  const cached = sessionStorage.getItem(cacheKey);
4211
4337
  if (!cached) {
@@ -4243,9 +4369,9 @@ var SelectVendor = ({
4243
4369
  sessionStorage.removeItem(cacheKey);
4244
4370
  loadVendors();
4245
4371
  };
4246
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { children: [
4247
- /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "flex justify-between ", children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "Ajouter un fournisseur" }) }),
4248
- /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
4372
+ return /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { children: [
4373
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { className: "flex justify-between ", children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "Ajouter un fournisseur" }) }),
4374
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
4249
4375
  SearchableSelect,
4250
4376
  {
4251
4377
  value,
@@ -4261,8 +4387,8 @@ var SelectVendor = ({
4261
4387
  },
4262
4388
  "fourni" + value
4263
4389
  ),
4264
- loadingVendors && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("p", { className: "text-sm text-gray-500 mt-2", children: "Chargement des fournisseurs..." }),
4265
- showModal && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
4390
+ loadingVendors && /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("p", { className: "text-sm text-gray-500 mt-2", children: "Chargement des fournisseurs..." }),
4391
+ showModal && /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
4266
4392
  MinimalVendorForm,
4267
4393
  {
4268
4394
  object: selectedVendor,
@@ -4279,13 +4405,13 @@ var SelectUser = ({
4279
4405
  onSelect
4280
4406
  }) => {
4281
4407
  const { token, activeBusinessEntity } = useSession();
4282
- const [users, setUsers] = (0, import_react50.useState)(() => {
4408
+ const [users, setUsers] = (0, import_react76.useState)(() => {
4283
4409
  const cacheKey = `users_cache_${activeBusinessEntity?.id || "default"}`;
4284
4410
  const cached = sessionStorage.getItem(cacheKey);
4285
4411
  return cached ? JSON.parse(cached) : [];
4286
4412
  });
4287
- const [loading, setLoading] = (0, import_react50.useState)(false);
4288
- (0, import_react50.useEffect)(() => {
4413
+ const [loading, setLoading] = (0, import_react76.useState)(false);
4414
+ (0, import_react76.useEffect)(() => {
4289
4415
  const cacheKey = `users_cache_${activeBusinessEntity?.id || "default"}`;
4290
4416
  const cached = sessionStorage.getItem(cacheKey);
4291
4417
  if (!cached) {
@@ -4321,19 +4447,19 @@ var SelectUser = ({
4321
4447
  return users.map((user) => ({
4322
4448
  value: user.id,
4323
4449
  label: `${user.first_name} ${user.last_name}`,
4324
- content: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "flex items-center space-x-3", children: /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "flex-1", children: [
4325
- /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "font-medium text-gray-900", children: [
4450
+ content: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { className: "flex items-center space-x-3", children: /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { className: "flex-1", children: [
4451
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { className: "font-medium text-gray-900", children: [
4326
4452
  user.first_name,
4327
4453
  " ",
4328
4454
  user.last_name
4329
4455
  ] }),
4330
- /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "text-sm text-gray-500", children: user.email })
4456
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { className: "text-sm text-gray-500", children: user.email })
4331
4457
  ] }) })
4332
4458
  }));
4333
4459
  };
4334
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { children: [
4335
- /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "flex justify-between ", children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "S\xE9lectionner un utilisateur" }) }),
4336
- /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
4460
+ return /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { children: [
4461
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { className: "flex justify-between ", children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "S\xE9lectionner un utilisateur" }) }),
4462
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
4337
4463
  SearchableSelect,
4338
4464
  {
4339
4465
  value,
@@ -4346,7 +4472,7 @@ var SelectUser = ({
4346
4472
  },
4347
4473
  "user" + value
4348
4474
  ),
4349
- loading && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("p", { className: "text-sm text-gray-500 mt-2", children: "Chargement des utilisateurs..." })
4475
+ loading && /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("p", { className: "text-sm text-gray-500 mt-2", children: "Chargement des utilisateurs..." })
4350
4476
  ] });
4351
4477
  };
4352
4478
  var SelectDepartment = ({
@@ -4354,13 +4480,13 @@ var SelectDepartment = ({
4354
4480
  onSelect
4355
4481
  }) => {
4356
4482
  const { token, activeBusinessEntity } = useSession();
4357
- const [departments, setDepartments] = (0, import_react50.useState)(() => {
4483
+ const [departments, setDepartments] = (0, import_react76.useState)(() => {
4358
4484
  const cacheKey = `departments_cache_${activeBusinessEntity?.id || "default"}`;
4359
4485
  const cached = sessionStorage.getItem(cacheKey);
4360
4486
  return cached ? JSON.parse(cached) : [];
4361
4487
  });
4362
- const [loading, setLoading] = (0, import_react50.useState)(false);
4363
- (0, import_react50.useEffect)(() => {
4488
+ const [loading, setLoading] = (0, import_react76.useState)(false);
4489
+ (0, import_react76.useEffect)(() => {
4364
4490
  const cacheKey = `departments_cache_${activeBusinessEntity?.id || "default"}`;
4365
4491
  const cached = sessionStorage.getItem(cacheKey);
4366
4492
  if (!cached) {
@@ -4396,9 +4522,9 @@ var SelectDepartment = ({
4396
4522
  label: dept.name
4397
4523
  }));
4398
4524
  };
4399
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { children: [
4400
- /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "flex justify-between ", children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "S\xE9lectionner un d\xE9partement" }) }),
4401
- /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
4525
+ return /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { children: [
4526
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { className: "flex justify-between ", children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "S\xE9lectionner un d\xE9partement" }) }),
4527
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
4402
4528
  SearchableSelect,
4403
4529
  {
4404
4530
  value,
@@ -4411,7 +4537,7 @@ var SelectDepartment = ({
4411
4537
  },
4412
4538
  "dept" + value
4413
4539
  ),
4414
- loading && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("p", { className: "text-sm text-gray-500 mt-2", children: "Chargement des d\xE9partements..." })
4540
+ loading && /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("p", { className: "text-sm text-gray-500 mt-2", children: "Chargement des d\xE9partements..." })
4415
4541
  ] });
4416
4542
  };
4417
4543
  var SelectCostCenter = ({
@@ -4419,13 +4545,13 @@ var SelectCostCenter = ({
4419
4545
  onSelect
4420
4546
  }) => {
4421
4547
  const { token, activeBusinessEntity } = useSession();
4422
- const [costCenters, setCostCenters] = (0, import_react50.useState)(() => {
4548
+ const [costCenters, setCostCenters] = (0, import_react76.useState)(() => {
4423
4549
  const cacheKey = `cost_centers_cache_${activeBusinessEntity?.id || "default"}`;
4424
4550
  const cached = sessionStorage.getItem(cacheKey);
4425
4551
  return cached ? JSON.parse(cached) : [];
4426
4552
  });
4427
- const [loading, setLoading] = (0, import_react50.useState)(false);
4428
- (0, import_react50.useEffect)(() => {
4553
+ const [loading, setLoading] = (0, import_react76.useState)(false);
4554
+ (0, import_react76.useEffect)(() => {
4429
4555
  const cacheKey = `cost_centers_cache_${activeBusinessEntity?.id || "default"}`;
4430
4556
  const cached = sessionStorage.getItem(cacheKey);
4431
4557
  if (!cached) {
@@ -4459,18 +4585,18 @@ var SelectCostCenter = ({
4459
4585
  return costCenters.map((center) => ({
4460
4586
  value: center.id,
4461
4587
  label: `${center.code ? `[${center.code}] ` : ""}${center.name}`,
4462
- content: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "flex items-center space-x-3", children: /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "flex-1", children: [
4463
- /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "font-medium text-gray-900", children: center.name }),
4464
- center.code && /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "text-sm text-gray-500", children: [
4588
+ content: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { className: "flex items-center space-x-3", children: /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { className: "flex-1", children: [
4589
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { className: "font-medium text-gray-900", children: center.name }),
4590
+ center.code && /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { className: "text-sm text-gray-500", children: [
4465
4591
  "Code: ",
4466
4592
  center.code
4467
4593
  ] })
4468
4594
  ] }) })
4469
4595
  }));
4470
4596
  };
4471
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { children: [
4472
- /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "flex justify-between ", children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "S\xE9lectionner un centre de co\xFBt" }) }),
4473
- /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
4597
+ return /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { children: [
4598
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { className: "flex justify-between ", children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "S\xE9lectionner un centre de co\xFBt" }) }),
4599
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
4474
4600
  SearchableSelect,
4475
4601
  {
4476
4602
  value,
@@ -4483,12 +4609,12 @@ var SelectCostCenter = ({
4483
4609
  },
4484
4610
  "cost" + value
4485
4611
  ),
4486
- loading && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("p", { className: "text-sm text-gray-500 mt-2", children: "Chargement des centres de co\xFBt..." })
4612
+ loading && /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("p", { className: "text-sm text-gray-500 mt-2", children: "Chargement des centres de co\xFBt..." })
4487
4613
  ] });
4488
4614
  };
4489
4615
 
4490
4616
  // src/components/common/Choices.tsx
4491
- var import_jsx_runtime72 = require("react/jsx-runtime");
4617
+ var import_jsx_runtime110 = require("react/jsx-runtime");
4492
4618
  var CHOICES = {
4493
4619
  INVOICE_TYPES: [
4494
4620
  { value: "sale", label: { fr: "Vente", en: "Sale", default: "Sale" } },
@@ -4746,7 +4872,7 @@ var InvoiceTypeSelector = ({
4746
4872
  value: item.value,
4747
4873
  label: item.label[language]
4748
4874
  }));
4749
- return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
4875
+ return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
4750
4876
  SearchableSelect,
4751
4877
  {
4752
4878
  value,
@@ -4769,7 +4895,7 @@ var PaymentMethodSelector = ({
4769
4895
  value: item.value,
4770
4896
  label: item.label[language]
4771
4897
  }));
4772
- return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
4898
+ return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
4773
4899
  SearchableSelect,
4774
4900
  {
4775
4901
  value,
@@ -4792,7 +4918,7 @@ var TemplateFNESelector = ({
4792
4918
  value: item.value,
4793
4919
  label: item.label[language]
4794
4920
  }));
4795
- return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
4921
+ return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
4796
4922
  SearchableSelect,
4797
4923
  {
4798
4924
  value,
@@ -4815,7 +4941,7 @@ var ForeignCurrencySelector = ({
4815
4941
  value: item.value,
4816
4942
  label: item.label[language]
4817
4943
  }));
4818
- return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
4944
+ return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
4819
4945
  SearchableSelect,
4820
4946
  {
4821
4947
  value,
@@ -4839,7 +4965,7 @@ var TaxSelector = ({
4839
4965
  value: item.value,
4840
4966
  label: item.label[language]
4841
4967
  }));
4842
- return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
4968
+ return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
4843
4969
  SearchableSelect,
4844
4970
  {
4845
4971
  value,
@@ -4867,7 +4993,7 @@ var LegalFormSelector = ({
4867
4993
  value: item.value,
4868
4994
  label: item.label[language] ?? item.label.default
4869
4995
  }));
4870
- return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
4996
+ return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
4871
4997
  SearchableSelect,
4872
4998
  {
4873
4999
  value,
@@ -4890,7 +5016,7 @@ var CountrySelector = ({
4890
5016
  value: item.value,
4891
5017
  label: item.label[language]
4892
5018
  }));
4893
- return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
5019
+ return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
4894
5020
  SearchableSelect,
4895
5021
  {
4896
5022
  value,
@@ -4910,7 +5036,9 @@ var CountrySelector = ({
4910
5036
  ApprovalAnswerModal,
4911
5037
  ApprovalAnswerPage,
4912
5038
  ApprovalPreviewAnswer,
5039
+ ApprovalServices,
4913
5040
  ApprovalWorkflow,
5041
+ AuthServices,
4914
5042
  CHOICES,
4915
5043
  CountrySelector,
4916
5044
  DateInput,