ptechcore_ui 1.0.15 → 1.0.17
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 +727 -164
- package/dist/index.d.cts +88 -6
- package/dist/index.d.ts +88 -6
- package/dist/index.js +749 -166
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -35,14 +35,20 @@ __export(index_exports, {
|
|
|
35
35
|
ApprovalAnswerPage: () => ApprovalAnswerPage,
|
|
36
36
|
ApprovalPreviewAnswer: () => ApprovalPreviewAnswer_default,
|
|
37
37
|
ApprovalWorkflow: () => ApprovalWorkflow_default,
|
|
38
|
+
CHOICES: () => Choices_default,
|
|
39
|
+
CountrySelector: () => CountrySelector,
|
|
38
40
|
DateInput: () => DateInput,
|
|
39
41
|
FDrawer: () => FDrawer,
|
|
40
42
|
FetchApi: () => FetchApi,
|
|
41
43
|
FileInput: () => FileInput,
|
|
44
|
+
ForeignCurrencySelector: () => ForeignCurrencySelector,
|
|
42
45
|
InputField: () => InputField,
|
|
46
|
+
InvoiceTypeSelector: () => InvoiceTypeSelector,
|
|
47
|
+
LegalFormSelector: () => LegalFormSelector,
|
|
43
48
|
Modal: () => Modals_default,
|
|
44
49
|
NumberInput: () => NumberInput,
|
|
45
50
|
Pages: () => Pages_default,
|
|
51
|
+
PaymentMethodSelector: () => PaymentMethodSelector,
|
|
46
52
|
PrimaryButton: () => Buttons_default,
|
|
47
53
|
RewiseLayout: () => ModernDoubleSidebarLayout_default,
|
|
48
54
|
SecondaryButton: () => SecondaryButton,
|
|
@@ -52,6 +58,8 @@ __export(index_exports, {
|
|
|
52
58
|
SelectUser: () => SelectUser,
|
|
53
59
|
SelectVendor: () => SelectVendor,
|
|
54
60
|
SessionProvider: () => SessionProvider,
|
|
61
|
+
TaxSelector: () => TaxSelector,
|
|
62
|
+
TemplateFNESelector: () => TemplateFNESelector,
|
|
55
63
|
TextInput: () => TextInput,
|
|
56
64
|
ThemeProvider: () => ThemeContext_default,
|
|
57
65
|
ToastContainer: () => Toast_default,
|
|
@@ -662,8 +670,9 @@ var ThemeContext_default = ThemeProvider;
|
|
|
662
670
|
var import_react2 = require("react");
|
|
663
671
|
|
|
664
672
|
// src/services/api.ts
|
|
665
|
-
var
|
|
666
|
-
var
|
|
673
|
+
var chooseEnv = localStorage.getItem("env") ?? "prod";
|
|
674
|
+
var ADDRESS_IP = chooseEnv === "prod" ? "back.rewise.praeduim-tech.com" : "localhost:8000";
|
|
675
|
+
var ADDRESS_IP_URL = chooseEnv === "prod" ? `https://${ADDRESS_IP}/` : `http://${ADDRESS_IP}/`;
|
|
667
676
|
var API_URL = `${ADDRESS_IP_URL}api`;
|
|
668
677
|
var FetchApi = class {
|
|
669
678
|
static async post(url, payload, token) {
|
|
@@ -756,6 +765,8 @@ var SessionProvider = ({ children }) => {
|
|
|
756
765
|
const [loggedUser, setLoggedUser] = (0, import_react2.useState)(null);
|
|
757
766
|
const [activeBusinessEntity, setActiveBusinessEntity] = (0, import_react2.useState)(null);
|
|
758
767
|
const saved_center_id = localStorage.getItem("active_center_id") || "";
|
|
768
|
+
const [isLoading, setIsLoading] = (0, import_react2.useState)(true);
|
|
769
|
+
const [showAuthModal, setShowAuthModal] = (0, import_react2.useState)(false);
|
|
759
770
|
(0, import_react2.useEffect)(() => {
|
|
760
771
|
const storedToken = localStorage.getItem("token");
|
|
761
772
|
if (storedToken) {
|
|
@@ -797,7 +808,9 @@ var SessionProvider = ({ children }) => {
|
|
|
797
808
|
setActiveBusinessEntity,
|
|
798
809
|
token,
|
|
799
810
|
login,
|
|
800
|
-
logout
|
|
811
|
+
logout,
|
|
812
|
+
showAuthModal,
|
|
813
|
+
setShowAuthModal
|
|
801
814
|
}, children });
|
|
802
815
|
};
|
|
803
816
|
|
|
@@ -1666,99 +1679,101 @@ var RewiseLayout = ({ children, module_name = "Rewise", module_description = "De
|
|
|
1666
1679
|
}
|
|
1667
1680
|
)
|
|
1668
1681
|
] }),
|
|
1669
|
-
mobileMenuOpen && /* @__PURE__ */ (0, import_jsx_runtime9.
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
{
|
|
1694
|
-
onClick: () => setMobileMenuOpen(false),
|
|
1695
|
-
className: "text-[var(--color-sidebar-text-secondary)]",
|
|
1696
|
-
"aria-label": "Fermer le menu",
|
|
1697
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react2.X, { className: "w-6 h-6" })
|
|
1698
|
-
}
|
|
1699
|
-
)
|
|
1682
|
+
mobileMenuOpen && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
|
|
1683
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1684
|
+
"div",
|
|
1685
|
+
{
|
|
1686
|
+
className: "fixed inset-0 bg-white z-40 lg:hidden",
|
|
1687
|
+
onClick: () => setMobileMenuOpen(false),
|
|
1688
|
+
"aria-hidden": "true"
|
|
1689
|
+
}
|
|
1690
|
+
),
|
|
1691
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
1692
|
+
"aside",
|
|
1693
|
+
{
|
|
1694
|
+
className: "fixed left-0 top-0 w-80 h-full bg-[var(--color-sidebar-bg)] z-50 lg:hidden transform transition-transform duration-300 ease-in-out shadow-2xl",
|
|
1695
|
+
onClick: (e) => e.stopPropagation(),
|
|
1696
|
+
role: "navigation",
|
|
1697
|
+
"aria-label": "Navigation mobile",
|
|
1698
|
+
children: [
|
|
1699
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "h-16 flex items-center justify-between px-4 border-b border-[var(--color-sidebar-border)]", children: [
|
|
1700
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
1701
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "w-10 h-10 bg-[var(--color-primary)] rounded-lg flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text-[var(--color-background)] font-bold text-xl", children: "W" }) }),
|
|
1702
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { children: [
|
|
1703
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h1", { className: "text-white font-bold text-lg", children: "WiseBook" }),
|
|
1704
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-gray-400 text-xs", children: "ERP Next-Gen" })
|
|
1705
|
+
] })
|
|
1700
1706
|
] }),
|
|
1701
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
"transition-colors",
|
|
1723
|
-
isModuleActive(item.id) ? "text-[var(--color-primary)]" : "text-[var(--color-sidebar-text-secondary)]"
|
|
1724
|
-
), children: item.icon }),
|
|
1725
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: cn(
|
|
1726
|
-
"flex-1 text-left text-sm font-medium",
|
|
1727
|
-
isModuleActive(item.id) ? "text-[var(--color-sidebar-text)]" : "text-[var(--color-sidebar-text-secondary)]"
|
|
1728
|
-
), children: item.label }),
|
|
1729
|
-
item.badge && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "px-2 py-0.5 text-xs bg-[var(--color-primary)] text-[var(--color-background)] rounded-full", children: item.badge })
|
|
1730
|
-
]
|
|
1731
|
-
}
|
|
1732
|
-
),
|
|
1733
|
-
isModuleActive(item.id) && secondaryMenuItems[item.id] && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "bg-[var(--color-sidebar-submenu-bg)] py-2", children: secondaryMenuItems[item.id].map((subItem) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
1734
|
-
"button",
|
|
1735
|
-
{
|
|
1736
|
-
onClick: () => {
|
|
1737
|
-
if (subItem.path) {
|
|
1738
|
-
navigate(subItem.path);
|
|
1739
|
-
setMobileMenuOpen(false);
|
|
1740
|
-
}
|
|
1741
|
-
},
|
|
1742
|
-
className: cn(
|
|
1743
|
-
"w-full flex items-center gap-3 pl-12 pr-4 py-2 text-sm",
|
|
1744
|
-
"hover:bg-[var(--color-sidebar-hover)]",
|
|
1745
|
-
isActive(subItem.path || "") && "bg-[var(--color-sidebar-active)] text-[var(--color-primary)]"
|
|
1746
|
-
),
|
|
1747
|
-
children: [
|
|
1748
|
-
subItem.icon,
|
|
1749
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: cn(
|
|
1750
|
-
isActive(subItem.path || "") ? "text-[var(--color-primary)]" : "text-[var(--color-sidebar-text-secondary)]"
|
|
1751
|
-
), children: subItem.label })
|
|
1752
|
-
]
|
|
1707
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1708
|
+
"button",
|
|
1709
|
+
{
|
|
1710
|
+
onClick: () => setMobileMenuOpen(false),
|
|
1711
|
+
className: "text-[var(--color-sidebar-text-secondary)]",
|
|
1712
|
+
"aria-label": "Fermer le menu",
|
|
1713
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react2.X, { className: "w-6 h-6" })
|
|
1714
|
+
}
|
|
1715
|
+
)
|
|
1716
|
+
] }),
|
|
1717
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("nav", { className: "py-4", role: "menubar", children: primaryMenuItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { children: [
|
|
1718
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
1719
|
+
"button",
|
|
1720
|
+
{
|
|
1721
|
+
onClick: () => {
|
|
1722
|
+
if (item.path) {
|
|
1723
|
+
navigate(item.path);
|
|
1724
|
+
setMobileMenuOpen(false);
|
|
1725
|
+
} else {
|
|
1726
|
+
setSelectedModule(item.id);
|
|
1727
|
+
}
|
|
1753
1728
|
},
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1729
|
+
className: cn(
|
|
1730
|
+
"w-full flex items-center gap-3 px-4 py-3 transition-all duration-200",
|
|
1731
|
+
"hover:bg-[var(--color-sidebar-hover)]",
|
|
1732
|
+
isModuleActive(item.id) && "bg-[var(--color-sidebar-active)] border-l-4 border-[var(--color-primary)]"
|
|
1733
|
+
),
|
|
1734
|
+
role: "menuitem",
|
|
1735
|
+
"aria-current": isModuleActive(item.id) ? "page" : void 0,
|
|
1736
|
+
children: [
|
|
1737
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: cn(
|
|
1738
|
+
"transition-colors",
|
|
1739
|
+
isModuleActive(item.id) ? "text-[var(--color-primary)]" : "text-[var(--color-sidebar-text-secondary)]"
|
|
1740
|
+
), children: item.icon }),
|
|
1741
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: cn(
|
|
1742
|
+
"flex-1 text-left text-sm font-medium",
|
|
1743
|
+
isModuleActive(item.id) ? "text-[var(--color-sidebar-text)]" : "text-[var(--color-sidebar-text-secondary)]"
|
|
1744
|
+
), children: item.label }),
|
|
1745
|
+
item.badge && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "px-2 py-0.5 text-xs bg-[var(--color-primary)] text-[var(--color-background)] rounded-full", children: item.badge })
|
|
1746
|
+
]
|
|
1747
|
+
}
|
|
1748
|
+
),
|
|
1749
|
+
isModuleActive(item.id) && secondaryMenuItems[item.id] && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "bg-[var(--color-sidebar-submenu-bg)] py-2", children: secondaryMenuItems[item.id].map((subItem) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
1750
|
+
"button",
|
|
1751
|
+
{
|
|
1752
|
+
onClick: () => {
|
|
1753
|
+
if (subItem.path) {
|
|
1754
|
+
navigate(subItem.path);
|
|
1755
|
+
setMobileMenuOpen(false);
|
|
1756
|
+
}
|
|
1757
|
+
},
|
|
1758
|
+
className: cn(
|
|
1759
|
+
"w-full flex items-center gap-3 pl-12 pr-4 py-2 text-sm",
|
|
1760
|
+
"hover:bg-[var(--color-sidebar-hover)]",
|
|
1761
|
+
isActive(subItem.path || "") && "bg-[var(--color-sidebar-active)] text-[var(--color-primary)]"
|
|
1762
|
+
),
|
|
1763
|
+
children: [
|
|
1764
|
+
subItem.icon,
|
|
1765
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: cn(
|
|
1766
|
+
isActive(subItem.path || "") ? "text-[var(--color-primary)]" : "text-[var(--color-sidebar-text-secondary)]"
|
|
1767
|
+
), children: subItem.label })
|
|
1768
|
+
]
|
|
1769
|
+
},
|
|
1770
|
+
subItem.id
|
|
1771
|
+
)) })
|
|
1772
|
+
] }, item.id)) })
|
|
1773
|
+
]
|
|
1774
|
+
}
|
|
1775
|
+
)
|
|
1776
|
+
] }),
|
|
1762
1777
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex-1 flex flex-col overflow-hidden", children: [
|
|
1763
1778
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
1764
1779
|
"header",
|
|
@@ -3740,7 +3755,7 @@ var useAlert = () => {
|
|
|
3740
3755
|
};
|
|
3741
3756
|
|
|
3742
3757
|
// src/components/common/CommonSelect.tsx
|
|
3743
|
-
var
|
|
3758
|
+
var import_react50 = require("react");
|
|
3744
3759
|
|
|
3745
3760
|
// src/services/VendorServices.ts
|
|
3746
3761
|
var VENDORS_API_URL = `${API_URL}/accounting/vendors/`;
|
|
@@ -3805,17 +3820,107 @@ var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
|
3805
3820
|
var import_react22 = require("react");
|
|
3806
3821
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
3807
3822
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
3823
|
+
var import_react23 = require("react");
|
|
3824
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
3825
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
3826
|
+
var import_react_router_dom9 = require("react-router-dom");
|
|
3827
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
3828
|
+
var import_react24 = __toESM(require("react"), 1);
|
|
3829
|
+
var import_react_router_dom10 = require("react-router-dom");
|
|
3830
|
+
var import_lucide_react15 = require("lucide-react");
|
|
3831
|
+
var import_clsx3 = require("clsx");
|
|
3832
|
+
var import_tailwind_merge3 = require("tailwind-merge");
|
|
3833
|
+
var import_react25 = require("react");
|
|
3834
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
3835
|
+
var import_react26 = require("react");
|
|
3836
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3837
|
+
var import_react27 = require("react");
|
|
3838
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3839
|
+
var import_react28 = require("react");
|
|
3840
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3841
|
+
var import_lucide_react16 = require("lucide-react");
|
|
3842
|
+
var import_react_router_dom11 = require("react-router-dom");
|
|
3843
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
3844
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3845
|
+
var import_react29 = require("react");
|
|
3846
|
+
var import_lucide_react17 = require("lucide-react");
|
|
3847
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3848
|
+
var import_lucide_react18 = require("lucide-react");
|
|
3849
|
+
var import_react30 = require("react");
|
|
3850
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
3851
|
+
var import_react31 = require("react");
|
|
3852
|
+
var import_react_router_dom12 = require("react-router-dom");
|
|
3853
|
+
var import_lucide_react19 = require("lucide-react");
|
|
3854
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
3855
|
+
var import_react32 = require("react");
|
|
3856
|
+
var import_react33 = require("react");
|
|
3857
|
+
var import_lucide_react20 = require("lucide-react");
|
|
3858
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
3859
|
+
var import_lucide_react21 = require("lucide-react");
|
|
3860
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
3861
|
+
var import_react34 = require("react");
|
|
3862
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
3863
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
3864
|
+
var import_react35 = require("react");
|
|
3865
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
3866
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
3867
|
+
var import_react_router_dom13 = require("react-router-dom");
|
|
3868
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
3869
|
+
var import_react36 = __toESM(require("react"), 1);
|
|
3870
|
+
var import_react_router_dom14 = require("react-router-dom");
|
|
3871
|
+
var import_lucide_react22 = require("lucide-react");
|
|
3872
|
+
var import_clsx4 = require("clsx");
|
|
3873
|
+
var import_tailwind_merge4 = require("tailwind-merge");
|
|
3874
|
+
var import_react37 = require("react");
|
|
3875
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
3876
|
+
var import_react38 = require("react");
|
|
3877
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
3878
|
+
var import_react39 = require("react");
|
|
3879
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
3880
|
+
var import_react40 = require("react");
|
|
3881
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
3882
|
+
var import_lucide_react23 = require("lucide-react");
|
|
3883
|
+
var import_react_router_dom15 = require("react-router-dom");
|
|
3884
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
3885
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
3886
|
+
var import_react41 = require("react");
|
|
3887
|
+
var import_lucide_react24 = require("lucide-react");
|
|
3888
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
3889
|
+
var import_lucide_react25 = require("lucide-react");
|
|
3890
|
+
var import_react42 = require("react");
|
|
3891
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
3892
|
+
var import_react43 = require("react");
|
|
3893
|
+
var import_react_router_dom16 = require("react-router-dom");
|
|
3894
|
+
var import_lucide_react26 = require("lucide-react");
|
|
3895
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
3896
|
+
var import_react44 = require("react");
|
|
3897
|
+
var import_react45 = require("react");
|
|
3898
|
+
var import_lucide_react27 = require("lucide-react");
|
|
3899
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
3900
|
+
var import_lucide_react28 = require("lucide-react");
|
|
3901
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
3902
|
+
var import_react46 = require("react");
|
|
3903
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
3904
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
3905
|
+
var import_react47 = require("react");
|
|
3906
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
3907
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
3908
|
+
var import_react48 = require("react");
|
|
3909
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
3910
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
3911
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
3808
3912
|
var PrimaryButton2 = ({
|
|
3809
3913
|
loading = false,
|
|
3810
3914
|
children,
|
|
3811
3915
|
classname = "",
|
|
3916
|
+
variant = "full",
|
|
3812
3917
|
...props
|
|
3813
3918
|
}) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
3814
3919
|
"button",
|
|
3815
3920
|
{
|
|
3816
3921
|
type: "submit",
|
|
3817
3922
|
disabled: loading || props.disabled,
|
|
3818
|
-
className: `px-4 py-2 text-sm
|
|
3923
|
+
className: `px-4 py-2 text-sm rounded-lg hover:bg-opacity-80 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex justify-center items-center ${classname} ${variant === "full" ? "bg-[#6A8A82] text-white" : variant === "outline" ? "border border-[#6A8A82] text-[#6A8A82] bg-transparent" : "bg-transparent text-[#6A8A82]"}`,
|
|
3819
3924
|
...props,
|
|
3820
3925
|
children: loading ? "Connexion en cours..." : children
|
|
3821
3926
|
}
|
|
@@ -3823,7 +3928,7 @@ var PrimaryButton2 = ({
|
|
|
3823
3928
|
var Buttons_default2 = PrimaryButton2;
|
|
3824
3929
|
var Modal2 = ({ title, description, width, open, onClose, children }) => {
|
|
3825
3930
|
if (!open) return null;
|
|
3826
|
-
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: `bg-white rounded-lg
|
|
3931
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: `bg-white rounded-lg pt-4 px-6 mx-4 `, children: [
|
|
3827
3932
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex justify-between items-start mb-6", children: [
|
|
3828
3933
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { children: [
|
|
3829
3934
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h3", { className: "text-xl font-semibold text-tuatara flex items-center space-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: title }) }),
|
|
@@ -3839,7 +3944,7 @@ var Modal2 = ({ title, description, width, open, onClose, children }) => {
|
|
|
3839
3944
|
}
|
|
3840
3945
|
)
|
|
3841
3946
|
] }),
|
|
3842
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "w-full max-h-[80vh] overflow-y-auto mb-
|
|
3947
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "w-full max-h-[80vh] overflow-y-auto mb-1", children })
|
|
3843
3948
|
] }) });
|
|
3844
3949
|
};
|
|
3845
3950
|
var Modals_default2 = Modal2;
|
|
@@ -3896,10 +4001,42 @@ var USERS_API_URL2 = `${API_URL2}/core/users/`;
|
|
|
3896
4001
|
var ToastContext2 = (0, import_react15.createContext)(void 0);
|
|
3897
4002
|
var APPROVAL_API_URL2 = `${API_URL2}/approvals/cases/`;
|
|
3898
4003
|
var AlertContext2 = (0, import_react22.createContext)(void 0);
|
|
4004
|
+
var VENDORS_API_URL2 = `${API_URL2}/accounting/vendors/`;
|
|
4005
|
+
var ThemeContext22 = (0, import_react25.createContext)(void 0);
|
|
4006
|
+
var ADDRESS_IP22 = "localhost:8000";
|
|
4007
|
+
var ADDRESS_IP_URL22 = `http://${ADDRESS_IP22}/`;
|
|
4008
|
+
var API_URL22 = `${ADDRESS_IP_URL22}api`;
|
|
4009
|
+
var API_BASE_URL32 = `${API_URL22}/core/auth/`;
|
|
4010
|
+
var SessionContext22 = (0, import_react26.createContext)(void 0);
|
|
4011
|
+
var API_BASE_URL222 = `${API_URL22}/core/auth/`;
|
|
4012
|
+
var USERS_API_URL22 = `${API_URL22}/core/users/`;
|
|
4013
|
+
var ToastContext22 = (0, import_react27.createContext)(void 0);
|
|
4014
|
+
var APPROVAL_API_URL22 = `${API_URL22}/approvals/cases/`;
|
|
4015
|
+
var AlertContext22 = (0, import_react34.createContext)(void 0);
|
|
4016
|
+
var VENDORS_API_URL22 = `${API_URL22}/accounting/vendors/`;
|
|
4017
|
+
var ThemeContext222 = (0, import_react37.createContext)(void 0);
|
|
4018
|
+
var ADDRESS_IP222 = "localhost:8000";
|
|
4019
|
+
var ADDRESS_IP_URL222 = `http://${ADDRESS_IP222}/`;
|
|
4020
|
+
var API_URL222 = `${ADDRESS_IP_URL222}api`;
|
|
4021
|
+
var API_BASE_URL322 = `${API_URL222}/core/auth/`;
|
|
4022
|
+
var SessionContext222 = (0, import_react38.createContext)(void 0);
|
|
4023
|
+
var API_BASE_URL2222 = `${API_URL222}/core/auth/`;
|
|
4024
|
+
var USERS_API_URL222 = `${API_URL222}/core/users/`;
|
|
4025
|
+
var ToastContext222 = (0, import_react39.createContext)(void 0);
|
|
4026
|
+
var APPROVAL_API_URL222 = `${API_URL222}/approvals/cases/`;
|
|
4027
|
+
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/`;
|
|
3899
4036
|
|
|
3900
4037
|
// src/components/common/FormVendor.tsx
|
|
3901
|
-
var
|
|
3902
|
-
var
|
|
4038
|
+
var import_react49 = require("react");
|
|
4039
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
3903
4040
|
var MinimalVendorForm = ({
|
|
3904
4041
|
isOpen,
|
|
3905
4042
|
onClose,
|
|
@@ -3908,13 +4045,13 @@ var MinimalVendorForm = ({
|
|
|
3908
4045
|
refresh = () => {
|
|
3909
4046
|
}
|
|
3910
4047
|
}) => {
|
|
3911
|
-
const [formData, setFormData] = (0,
|
|
4048
|
+
const [formData, setFormData] = (0, import_react49.useState)(object || {
|
|
3912
4049
|
from_module: from ?? null,
|
|
3913
4050
|
legal_name: "",
|
|
3914
4051
|
trading_name: ""
|
|
3915
4052
|
});
|
|
3916
|
-
const [errors, setErrors] = (0,
|
|
3917
|
-
const [loading, setLoading] = (0,
|
|
4053
|
+
const [errors, setErrors] = (0, import_react49.useState)({});
|
|
4054
|
+
const [loading, setLoading] = (0, import_react49.useState)(false);
|
|
3918
4055
|
const { token } = useSession();
|
|
3919
4056
|
const { success, error: showError } = useToast();
|
|
3920
4057
|
const handleInputChange = (e) => {
|
|
@@ -3973,7 +4110,7 @@ var MinimalVendorForm = ({
|
|
|
3973
4110
|
}
|
|
3974
4111
|
};
|
|
3975
4112
|
if (!isOpen) return null;
|
|
3976
|
-
return /* @__PURE__ */ (0,
|
|
4113
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
3977
4114
|
Modals_default2,
|
|
3978
4115
|
{
|
|
3979
4116
|
title: "Ajouter un fournisseur",
|
|
@@ -3981,9 +4118,9 @@ var MinimalVendorForm = ({
|
|
|
3981
4118
|
description: ``,
|
|
3982
4119
|
open: isOpen,
|
|
3983
4120
|
onClose,
|
|
3984
|
-
children: /* @__PURE__ */ (0,
|
|
3985
|
-
/* @__PURE__ */ (0,
|
|
3986
|
-
/* @__PURE__ */ (0,
|
|
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)(
|
|
3987
4124
|
TextInput2,
|
|
3988
4125
|
{
|
|
3989
4126
|
label: "Raison sociale",
|
|
@@ -3995,7 +4132,7 @@ var MinimalVendorForm = ({
|
|
|
3995
4132
|
onChange: handleInputChange
|
|
3996
4133
|
}
|
|
3997
4134
|
),
|
|
3998
|
-
/* @__PURE__ */ (0,
|
|
4135
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
3999
4136
|
TextInput2,
|
|
4000
4137
|
{
|
|
4001
4138
|
label: "Nom commercial",
|
|
@@ -4006,8 +4143,8 @@ var MinimalVendorForm = ({
|
|
|
4006
4143
|
}
|
|
4007
4144
|
)
|
|
4008
4145
|
] }) }),
|
|
4009
|
-
/* @__PURE__ */ (0,
|
|
4010
|
-
/* @__PURE__ */ (0,
|
|
4146
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "flex justify-between pt-6 mt-8", children: [
|
|
4147
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
4011
4148
|
"button",
|
|
4012
4149
|
{
|
|
4013
4150
|
type: "button",
|
|
@@ -4016,7 +4153,7 @@ var MinimalVendorForm = ({
|
|
|
4016
4153
|
children: "Annuler"
|
|
4017
4154
|
}
|
|
4018
4155
|
),
|
|
4019
|
-
/* @__PURE__ */ (0,
|
|
4156
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
4020
4157
|
Buttons_default2,
|
|
4021
4158
|
{
|
|
4022
4159
|
type: "button",
|
|
@@ -4032,43 +4169,43 @@ var MinimalVendorForm = ({
|
|
|
4032
4169
|
};
|
|
4033
4170
|
|
|
4034
4171
|
// src/services/DepartmentServices.ts
|
|
4035
|
-
var
|
|
4172
|
+
var URI5 = `${API_URL}/core/departments/`;
|
|
4036
4173
|
var DepartmentServices = {
|
|
4037
|
-
create: (data) => FetchApi.post(`${
|
|
4038
|
-
get: (id) => FetchApi.get(`${
|
|
4039
|
-
list: (params) => FetchApi.get(`${
|
|
4040
|
-
update: (id, data) => FetchApi.put(`${
|
|
4041
|
-
delete: (id) => FetchApi.delete(`${
|
|
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}/`)
|
|
4042
4179
|
};
|
|
4043
4180
|
|
|
4044
4181
|
// src/services/ProfitCostsServices.ts
|
|
4045
|
-
var
|
|
4046
|
-
var
|
|
4182
|
+
var URI6 = `${API_URL}/accounting/profit-or-cost-center/`;
|
|
4183
|
+
var COST_URI3 = `${API_URL}/accounting/cost-center/`;
|
|
4047
4184
|
var CostServices = {
|
|
4048
|
-
create: (data) => FetchApi.post(`${
|
|
4049
|
-
get: (id) => FetchApi.get(`${
|
|
4050
|
-
list: (params) => FetchApi.get(`${
|
|
4051
|
-
update: (id, data) => FetchApi.put(`${
|
|
4052
|
-
delete: (id) => FetchApi.delete(`${
|
|
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}/`)
|
|
4053
4190
|
};
|
|
4054
|
-
var
|
|
4191
|
+
var PROFIT_URI3 = `${API_URL}/accounting/profit-center/`;
|
|
4055
4192
|
|
|
4056
4193
|
// src/components/common/CommonSelect.tsx
|
|
4057
|
-
var
|
|
4194
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
4058
4195
|
var SelectVendor = ({
|
|
4059
4196
|
value,
|
|
4060
4197
|
onSelect
|
|
4061
4198
|
}) => {
|
|
4062
|
-
const [showModal, setShowModal] = (0,
|
|
4063
|
-
const [selectedVendor, setSelectedVendor] = (0,
|
|
4199
|
+
const [showModal, setShowModal] = (0, import_react50.useState)(false);
|
|
4200
|
+
const [selectedVendor, setSelectedVendor] = (0, import_react50.useState)(null);
|
|
4064
4201
|
const { token, activeBusinessEntity } = useSession();
|
|
4065
|
-
const [vendors, setVendors] = (0,
|
|
4202
|
+
const [vendors, setVendors] = (0, import_react50.useState)(() => {
|
|
4066
4203
|
const cacheKey = `vendors_cache_${activeBusinessEntity?.id || "default"}`;
|
|
4067
4204
|
const cached = sessionStorage.getItem(cacheKey);
|
|
4068
4205
|
return cached ? JSON.parse(cached) : [];
|
|
4069
4206
|
});
|
|
4070
|
-
const [loadingVendors, setLoadingVendors] = (0,
|
|
4071
|
-
(0,
|
|
4207
|
+
const [loadingVendors, setLoadingVendors] = (0, import_react50.useState)(false);
|
|
4208
|
+
(0, import_react50.useEffect)(() => {
|
|
4072
4209
|
const cacheKey = `vendors_cache_${activeBusinessEntity?.id || "default"}`;
|
|
4073
4210
|
const cached = sessionStorage.getItem(cacheKey);
|
|
4074
4211
|
if (!cached) {
|
|
@@ -4080,7 +4217,8 @@ var SelectVendor = ({
|
|
|
4080
4217
|
const getVendorOptions = () => {
|
|
4081
4218
|
return vendors.filter((vendor) => vendor.id !== void 0).map((vendor) => ({
|
|
4082
4219
|
value: vendor.id,
|
|
4083
|
-
label: `${vendor.legal_name} [${vendor.trading_name}]
|
|
4220
|
+
label: `${vendor.legal_name} [${vendor.trading_name}]`,
|
|
4221
|
+
object: vendor
|
|
4084
4222
|
}));
|
|
4085
4223
|
};
|
|
4086
4224
|
const loadVendors = async () => {
|
|
@@ -4105,9 +4243,9 @@ var SelectVendor = ({
|
|
|
4105
4243
|
sessionStorage.removeItem(cacheKey);
|
|
4106
4244
|
loadVendors();
|
|
4107
4245
|
};
|
|
4108
|
-
return /* @__PURE__ */ (0,
|
|
4109
|
-
/* @__PURE__ */ (0,
|
|
4110
|
-
/* @__PURE__ */ (0,
|
|
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)(
|
|
4111
4249
|
SearchableSelect,
|
|
4112
4250
|
{
|
|
4113
4251
|
value,
|
|
@@ -4123,8 +4261,8 @@ var SelectVendor = ({
|
|
|
4123
4261
|
},
|
|
4124
4262
|
"fourni" + value
|
|
4125
4263
|
),
|
|
4126
|
-
loadingVendors && /* @__PURE__ */ (0,
|
|
4127
|
-
showModal && /* @__PURE__ */ (0,
|
|
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)(
|
|
4128
4266
|
MinimalVendorForm,
|
|
4129
4267
|
{
|
|
4130
4268
|
object: selectedVendor,
|
|
@@ -4141,13 +4279,13 @@ var SelectUser = ({
|
|
|
4141
4279
|
onSelect
|
|
4142
4280
|
}) => {
|
|
4143
4281
|
const { token, activeBusinessEntity } = useSession();
|
|
4144
|
-
const [users, setUsers] = (0,
|
|
4282
|
+
const [users, setUsers] = (0, import_react50.useState)(() => {
|
|
4145
4283
|
const cacheKey = `users_cache_${activeBusinessEntity?.id || "default"}`;
|
|
4146
4284
|
const cached = sessionStorage.getItem(cacheKey);
|
|
4147
4285
|
return cached ? JSON.parse(cached) : [];
|
|
4148
4286
|
});
|
|
4149
|
-
const [loading, setLoading] = (0,
|
|
4150
|
-
(0,
|
|
4287
|
+
const [loading, setLoading] = (0, import_react50.useState)(false);
|
|
4288
|
+
(0, import_react50.useEffect)(() => {
|
|
4151
4289
|
const cacheKey = `users_cache_${activeBusinessEntity?.id || "default"}`;
|
|
4152
4290
|
const cached = sessionStorage.getItem(cacheKey);
|
|
4153
4291
|
if (!cached) {
|
|
@@ -4183,19 +4321,19 @@ var SelectUser = ({
|
|
|
4183
4321
|
return users.map((user) => ({
|
|
4184
4322
|
value: user.id,
|
|
4185
4323
|
label: `${user.first_name} ${user.last_name}`,
|
|
4186
|
-
content: /* @__PURE__ */ (0,
|
|
4187
|
-
/* @__PURE__ */ (0,
|
|
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: [
|
|
4188
4326
|
user.first_name,
|
|
4189
4327
|
" ",
|
|
4190
4328
|
user.last_name
|
|
4191
4329
|
] }),
|
|
4192
|
-
/* @__PURE__ */ (0,
|
|
4330
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "text-sm text-gray-500", children: user.email })
|
|
4193
4331
|
] }) })
|
|
4194
4332
|
}));
|
|
4195
4333
|
};
|
|
4196
|
-
return /* @__PURE__ */ (0,
|
|
4197
|
-
/* @__PURE__ */ (0,
|
|
4198
|
-
/* @__PURE__ */ (0,
|
|
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)(
|
|
4199
4337
|
SearchableSelect,
|
|
4200
4338
|
{
|
|
4201
4339
|
value,
|
|
@@ -4208,7 +4346,7 @@ var SelectUser = ({
|
|
|
4208
4346
|
},
|
|
4209
4347
|
"user" + value
|
|
4210
4348
|
),
|
|
4211
|
-
loading && /* @__PURE__ */ (0,
|
|
4349
|
+
loading && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("p", { className: "text-sm text-gray-500 mt-2", children: "Chargement des utilisateurs..." })
|
|
4212
4350
|
] });
|
|
4213
4351
|
};
|
|
4214
4352
|
var SelectDepartment = ({
|
|
@@ -4216,13 +4354,13 @@ var SelectDepartment = ({
|
|
|
4216
4354
|
onSelect
|
|
4217
4355
|
}) => {
|
|
4218
4356
|
const { token, activeBusinessEntity } = useSession();
|
|
4219
|
-
const [departments, setDepartments] = (0,
|
|
4357
|
+
const [departments, setDepartments] = (0, import_react50.useState)(() => {
|
|
4220
4358
|
const cacheKey = `departments_cache_${activeBusinessEntity?.id || "default"}`;
|
|
4221
4359
|
const cached = sessionStorage.getItem(cacheKey);
|
|
4222
4360
|
return cached ? JSON.parse(cached) : [];
|
|
4223
4361
|
});
|
|
4224
|
-
const [loading, setLoading] = (0,
|
|
4225
|
-
(0,
|
|
4362
|
+
const [loading, setLoading] = (0, import_react50.useState)(false);
|
|
4363
|
+
(0, import_react50.useEffect)(() => {
|
|
4226
4364
|
const cacheKey = `departments_cache_${activeBusinessEntity?.id || "default"}`;
|
|
4227
4365
|
const cached = sessionStorage.getItem(cacheKey);
|
|
4228
4366
|
if (!cached) {
|
|
@@ -4258,9 +4396,9 @@ var SelectDepartment = ({
|
|
|
4258
4396
|
label: dept.name
|
|
4259
4397
|
}));
|
|
4260
4398
|
};
|
|
4261
|
-
return /* @__PURE__ */ (0,
|
|
4262
|
-
/* @__PURE__ */ (0,
|
|
4263
|
-
/* @__PURE__ */ (0,
|
|
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)(
|
|
4264
4402
|
SearchableSelect,
|
|
4265
4403
|
{
|
|
4266
4404
|
value,
|
|
@@ -4273,7 +4411,7 @@ var SelectDepartment = ({
|
|
|
4273
4411
|
},
|
|
4274
4412
|
"dept" + value
|
|
4275
4413
|
),
|
|
4276
|
-
loading && /* @__PURE__ */ (0,
|
|
4414
|
+
loading && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("p", { className: "text-sm text-gray-500 mt-2", children: "Chargement des d\xE9partements..." })
|
|
4277
4415
|
] });
|
|
4278
4416
|
};
|
|
4279
4417
|
var SelectCostCenter = ({
|
|
@@ -4281,13 +4419,13 @@ var SelectCostCenter = ({
|
|
|
4281
4419
|
onSelect
|
|
4282
4420
|
}) => {
|
|
4283
4421
|
const { token, activeBusinessEntity } = useSession();
|
|
4284
|
-
const [costCenters, setCostCenters] = (0,
|
|
4422
|
+
const [costCenters, setCostCenters] = (0, import_react50.useState)(() => {
|
|
4285
4423
|
const cacheKey = `cost_centers_cache_${activeBusinessEntity?.id || "default"}`;
|
|
4286
4424
|
const cached = sessionStorage.getItem(cacheKey);
|
|
4287
4425
|
return cached ? JSON.parse(cached) : [];
|
|
4288
4426
|
});
|
|
4289
|
-
const [loading, setLoading] = (0,
|
|
4290
|
-
(0,
|
|
4427
|
+
const [loading, setLoading] = (0, import_react50.useState)(false);
|
|
4428
|
+
(0, import_react50.useEffect)(() => {
|
|
4291
4429
|
const cacheKey = `cost_centers_cache_${activeBusinessEntity?.id || "default"}`;
|
|
4292
4430
|
const cached = sessionStorage.getItem(cacheKey);
|
|
4293
4431
|
if (!cached) {
|
|
@@ -4321,18 +4459,18 @@ var SelectCostCenter = ({
|
|
|
4321
4459
|
return costCenters.map((center) => ({
|
|
4322
4460
|
value: center.id,
|
|
4323
4461
|
label: `${center.code ? `[${center.code}] ` : ""}${center.name}`,
|
|
4324
|
-
content: /* @__PURE__ */ (0,
|
|
4325
|
-
/* @__PURE__ */ (0,
|
|
4326
|
-
center.code && /* @__PURE__ */ (0,
|
|
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: [
|
|
4327
4465
|
"Code: ",
|
|
4328
4466
|
center.code
|
|
4329
4467
|
] })
|
|
4330
4468
|
] }) })
|
|
4331
4469
|
}));
|
|
4332
4470
|
};
|
|
4333
|
-
return /* @__PURE__ */ (0,
|
|
4334
|
-
/* @__PURE__ */ (0,
|
|
4335
|
-
/* @__PURE__ */ (0,
|
|
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)(
|
|
4336
4474
|
SearchableSelect,
|
|
4337
4475
|
{
|
|
4338
4476
|
value,
|
|
@@ -4345,9 +4483,426 @@ var SelectCostCenter = ({
|
|
|
4345
4483
|
},
|
|
4346
4484
|
"cost" + value
|
|
4347
4485
|
),
|
|
4348
|
-
loading && /* @__PURE__ */ (0,
|
|
4486
|
+
loading && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("p", { className: "text-sm text-gray-500 mt-2", children: "Chargement des centres de co\xFBt..." })
|
|
4349
4487
|
] });
|
|
4350
4488
|
};
|
|
4489
|
+
|
|
4490
|
+
// src/components/common/Choices.tsx
|
|
4491
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
4492
|
+
var CHOICES = {
|
|
4493
|
+
INVOICE_TYPES: [
|
|
4494
|
+
{ value: "sale", label: { fr: "Vente", en: "Sale", default: "Sale" } },
|
|
4495
|
+
{ value: "purchase", label: { fr: "Bordereau d'achat", en: "Purchase slip", default: "Purchase" } }
|
|
4496
|
+
],
|
|
4497
|
+
PAYMENT_METHODS: [
|
|
4498
|
+
{ value: "cash", label: { fr: "Esp\xE8ce", en: "Cash", default: "Cash" } },
|
|
4499
|
+
{ value: "card", label: { fr: "Carte bancaire", en: "Card", default: "Card" } },
|
|
4500
|
+
{ value: "check", label: { fr: "Ch\xE8que", en: "Check", default: "Check" } },
|
|
4501
|
+
{ value: "mobile-money", label: { fr: "Mobile money", en: "Mobile money", default: "Mobile money" } },
|
|
4502
|
+
{ value: "transfer", label: { fr: "Virement bancaire", en: "Bank transfer", default: "Transfer" } },
|
|
4503
|
+
{ value: "deferred", label: { fr: "\xC0 terme", en: "Deferred", default: "Deferred" } }
|
|
4504
|
+
],
|
|
4505
|
+
TEMPLATES: [
|
|
4506
|
+
{ value: "B2B", label: { fr: "Client entreprise (B2B)", en: "Business client (B2B)", default: "B2B" } },
|
|
4507
|
+
{ value: "B2F", label: { fr: "Client international (B2F)", en: "International client (B2F)", default: "B2F" } },
|
|
4508
|
+
{ value: "B2G", label: { fr: "Institution gouvernementale (B2G)", en: "Government institution (B2G)", default: "B2G" } },
|
|
4509
|
+
{ value: "B2C", label: { fr: "Particulier (B2C)", en: "Individual (B2C)", default: "B2C" } }
|
|
4510
|
+
],
|
|
4511
|
+
FOREIGN_CURRENCIES: [
|
|
4512
|
+
{ value: "XOF", label: { fr: "Franc CFA", en: "CFA Franc", default: "XOF" } },
|
|
4513
|
+
{ value: "USD", label: { fr: "Dollar am\xE9ricain", en: "US Dollar", default: "USD" } },
|
|
4514
|
+
{ value: "EUR", label: { fr: "Euro", en: "Euro", default: "EUR" } },
|
|
4515
|
+
{ value: "JPY", label: { fr: "Yen japonais", en: "Japanese Yen", default: "JPY" } },
|
|
4516
|
+
{ value: "CAD", label: { fr: "Dollar canadien", en: "Canadian Dollar", default: "CAD" } },
|
|
4517
|
+
{ value: "GBP", label: { fr: "Livre sterling", en: "British Pound", default: "GBP" } },
|
|
4518
|
+
{ value: "AUD", label: { fr: "Dollar australien", en: "Australian Dollar", default: "AUD" } },
|
|
4519
|
+
{ value: "CNH", label: { fr: "Yuan chinois", en: "Chinese Yuan", default: "CNH" } },
|
|
4520
|
+
{ value: "CHF", label: { fr: "Franc suisse", en: "Swiss Franc", default: "CHF" } },
|
|
4521
|
+
{ value: "HKD", label: { fr: "Dollar de Hong Kong", en: "Hong Kong Dollar", default: "HKD" } },
|
|
4522
|
+
{ value: "NZD", label: { fr: "Dollar n\xE9o-z\xE9landais", en: "New Zealand Dollar", default: "NZD" } }
|
|
4523
|
+
],
|
|
4524
|
+
TAXES: [
|
|
4525
|
+
{ value: "TVA", label: { fr: "TVA 18 %", en: "VAT 18%", default: "VAT 18%" } },
|
|
4526
|
+
{ value: "TVAB", label: { fr: "TVA r\xE9duite 9 %", en: "Reduced VAT 9%", default: "VAT 9%" } },
|
|
4527
|
+
{ value: "TVAC", label: { fr: "TVA exon\xE9r\xE9e 0 %", en: "Exempt VAT 0%", default: "VAT 0%" } },
|
|
4528
|
+
{ value: "TVAD", label: { fr: "TVA exon\xE9r\xE9e TEE/RME 0 %", en: "Exempt VAT TEE/RME 0%", default: "VAT 0%" } }
|
|
4529
|
+
],
|
|
4530
|
+
LEGAL_FORMS: [
|
|
4531
|
+
{ value: "EI", label: { fr: "Entreprise Individuelle (EI)", en: "Sole Proprietorship (EI)", default: "Sole Proprietorship (EI)" } },
|
|
4532
|
+
{ value: "SARL", label: { fr: "Soci\xE9t\xE9 \xE0 Responsabilit\xE9 Limit\xE9e (SARL)", en: "Limited Liability Company (LLC)", default: "LLC (SARL)" } },
|
|
4533
|
+
{ value: "SUARL", label: { fr: "Soci\xE9t\xE9 Unipersonnelle \xE0 Responsabilit\xE9 Limit\xE9e (SUARL)", en: "Single-Member LLC (SUARL)", default: "Single-Member LLC (SUARL)" } },
|
|
4534
|
+
{ value: "SA", label: { fr: "Soci\xE9t\xE9 Anonyme (SA)", en: "Corporation (SA)", default: "Corporation (SA)" } },
|
|
4535
|
+
{ value: "SNC", label: { fr: "Soci\xE9t\xE9 en Nom Collectif (SNC)", en: "General Partnership (SNC)", default: "General Partnership (SNC)" } },
|
|
4536
|
+
{ value: "SCS", label: { fr: "Soci\xE9t\xE9 en Commandite Simple (SCS)", en: "Limited Partnership (SCS)", default: "Limited Partnership (SCS)" } },
|
|
4537
|
+
{ value: "GIE", label: { fr: "Groupement d'Int\xE9r\xEAt \xC9conomique (GIE)", en: "Economic Interest Grouping (GIE)", default: "Economic Interest Grouping (GIE)" } },
|
|
4538
|
+
{ value: "COOP", label: { fr: "Soci\xE9t\xE9 Coop\xE9rative", en: "Cooperative Society", default: "Cooperative Society" } },
|
|
4539
|
+
{ value: "SC", label: { fr: "Soci\xE9t\xE9 Civile (SC)", en: "Civil Company (SC)", default: "Civil Company (SC)" } }
|
|
4540
|
+
],
|
|
4541
|
+
COUNTRIES: [
|
|
4542
|
+
{ value: "AFG", label: { fr: "Afghanistan", en: "Afghanistan", default: "Afghanistan" } },
|
|
4543
|
+
{ value: "ALB", label: { fr: "Albanie", en: "Albania", default: "Albania" } },
|
|
4544
|
+
{ value: "DZA", label: { fr: "Alg\xE9rie", en: "Algeria", default: "Algeria" } },
|
|
4545
|
+
{ value: "AND", label: { fr: "Andorre", en: "Andorra", default: "Andorra" } },
|
|
4546
|
+
{ value: "AGO", label: { fr: "Angola", en: "Angola", default: "Angola" } },
|
|
4547
|
+
{ value: "ATG", label: { fr: "Antigua-et-Barbuda", en: "Antigua and Barbuda", default: "Antigua and Barbuda" } },
|
|
4548
|
+
{ value: "ARG", label: { fr: "Argentine", en: "Argentina", default: "Argentina" } },
|
|
4549
|
+
{ value: "ARM", label: { fr: "Arm\xE9nie", en: "Armenia", default: "Armenia" } },
|
|
4550
|
+
{ value: "AUS", label: { fr: "Australie", en: "Australia", default: "Australia" } },
|
|
4551
|
+
{ value: "AUT", label: { fr: "Autriche", en: "Austria", default: "Austria" } },
|
|
4552
|
+
{ value: "AZE", label: { fr: "Azerba\xEFdjan", en: "Azerbaijan", default: "Azerbaijan" } },
|
|
4553
|
+
{ value: "BHS", label: { fr: "Bahamas", en: "Bahamas", default: "Bahamas" } },
|
|
4554
|
+
{ value: "BHR", label: { fr: "Bahre\xEFn", en: "Bahrain", default: "Bahrain" } },
|
|
4555
|
+
{ value: "BGD", label: { fr: "Bangladesh", en: "Bangladesh", default: "Bangladesh" } },
|
|
4556
|
+
{ value: "BRB", label: { fr: "Barbade", en: "Barbados", default: "Barbados" } },
|
|
4557
|
+
{ value: "BLR", label: { fr: "Bi\xE9lorussie", en: "Belarus", default: "Belarus" } },
|
|
4558
|
+
{ value: "BEL", label: { fr: "Belgique", en: "Belgium", default: "Belgium" } },
|
|
4559
|
+
{ value: "BLZ", label: { fr: "Belize", en: "Belize", default: "Belize" } },
|
|
4560
|
+
{ value: "BEN", label: { fr: "B\xE9nin", en: "Benin", default: "Benin" } },
|
|
4561
|
+
{ value: "BTN", label: { fr: "Bhoutan", en: "Bhutan", default: "Bhutan" } },
|
|
4562
|
+
{ value: "BOL", label: { fr: "Bolivie", en: "Bolivia", default: "Bolivia" } },
|
|
4563
|
+
{ value: "BIH", label: { fr: "Bosnie-Herz\xE9govine", en: "Bosnia and Herzegovina", default: "Bosnia and Herzegovina" } },
|
|
4564
|
+
{ value: "BWA", label: { fr: "Botswana", en: "Botswana", default: "Botswana" } },
|
|
4565
|
+
{ value: "BRA", label: { fr: "Br\xE9sil", en: "Brazil", default: "Brazil" } },
|
|
4566
|
+
{ value: "BRN", label: { fr: "Brunei", en: "Brunei", default: "Brunei" } },
|
|
4567
|
+
{ value: "BGR", label: { fr: "Bulgarie", en: "Bulgaria", default: "Bulgaria" } },
|
|
4568
|
+
{ value: "BFA", label: { fr: "Burkina Faso", en: "Burkina Faso", default: "Burkina Faso" } },
|
|
4569
|
+
{ value: "BDI", label: { fr: "Burundi", en: "Burundi", default: "Burundi" } },
|
|
4570
|
+
{ value: "CPV", label: { fr: "Cap-Vert", en: "Cabo Verde", default: "Cabo Verde" } },
|
|
4571
|
+
{ value: "KHM", label: { fr: "Cambodge", en: "Cambodia", default: "Cambodia" } },
|
|
4572
|
+
{ value: "CMR", label: { fr: "Cameroun", en: "Cameroon", default: "Cameroon" } },
|
|
4573
|
+
{ value: "CAN", label: { fr: "Canada", en: "Canada", default: "Canada" } },
|
|
4574
|
+
{ value: "CAF", label: { fr: "R\xE9publique centrafricaine", en: "Central African Republic", default: "Central African Republic" } },
|
|
4575
|
+
{ value: "TCD", label: { fr: "Tchad", en: "Chad", default: "Chad" } },
|
|
4576
|
+
{ value: "CHL", label: { fr: "Chili", en: "Chile", default: "Chile" } },
|
|
4577
|
+
{ value: "CHN", label: { fr: "Chine", en: "China", default: "China" } },
|
|
4578
|
+
{ value: "COL", label: { fr: "Colombie", en: "Colombia", default: "Colombia" } },
|
|
4579
|
+
{ value: "COM", label: { fr: "Comores", en: "Comoros", default: "Comoros" } },
|
|
4580
|
+
{ value: "COG", label: { fr: "Congo", en: "Congo", default: "Congo" } },
|
|
4581
|
+
{ value: "CRI", label: { fr: "Costa Rica", en: "Costa Rica", default: "Costa Rica" } },
|
|
4582
|
+
{ value: "CIV", label: { fr: "C\xF4te d'Ivoire", en: "Ivory Coast", default: "Ivory Coast" } },
|
|
4583
|
+
{ value: "HRV", label: { fr: "Croatie", en: "Croatia", default: "Croatia" } },
|
|
4584
|
+
{ value: "CUB", label: { fr: "Cuba", en: "Cuba", default: "Cuba" } },
|
|
4585
|
+
{ value: "CYP", label: { fr: "Chypre", en: "Cyprus", default: "Cyprus" } },
|
|
4586
|
+
{ value: "CZE", label: { fr: "Tch\xE9quie", en: "Czechia", default: "Czechia" } },
|
|
4587
|
+
{ value: "DNK", label: { fr: "Danemark", en: "Denmark", default: "Denmark" } },
|
|
4588
|
+
{ value: "DJI", label: { fr: "Djibouti", en: "Djibouti", default: "Djibouti" } },
|
|
4589
|
+
{ value: "DMA", label: { fr: "Dominique", en: "Dominica", default: "Dominica" } },
|
|
4590
|
+
{ value: "DOM", label: { fr: "R\xE9publique dominicaine", en: "Dominican Republic", default: "Dominican Republic" } },
|
|
4591
|
+
{ value: "ECU", label: { fr: "\xC9quateur", en: "Ecuador", default: "Ecuador" } },
|
|
4592
|
+
{ value: "EGY", label: { fr: "\xC9gypte", en: "Egypt", default: "Egypt" } },
|
|
4593
|
+
{ value: "SLV", label: { fr: "Salvador", en: "El Salvador", default: "El Salvador" } },
|
|
4594
|
+
{ value: "GNQ", label: { fr: "Guin\xE9e \xE9quatoriale", en: "Equatorial Guinea", default: "Equatorial Guinea" } },
|
|
4595
|
+
{ value: "ERI", label: { fr: "\xC9rythr\xE9e", en: "Eritrea", default: "Eritrea" } },
|
|
4596
|
+
{ value: "EST", label: { fr: "Estonie", en: "Estonia", default: "Estonia" } },
|
|
4597
|
+
{ value: "SWZ", label: { fr: "Eswatini", en: "Eswatini", default: "Eswatini" } },
|
|
4598
|
+
{ value: "ETH", label: { fr: "\xC9thiopie", en: "Ethiopia", default: "Ethiopia" } },
|
|
4599
|
+
{ value: "FJI", label: { fr: "Fidji", en: "Fiji", default: "Fiji" } },
|
|
4600
|
+
{ value: "FIN", label: { fr: "Finlande", en: "Finland", default: "Finland" } },
|
|
4601
|
+
{ value: "FRA", label: { fr: "France", en: "France", default: "France" } },
|
|
4602
|
+
{ value: "GAB", label: { fr: "Gabon", en: "Gabon", default: "Gabon" } },
|
|
4603
|
+
{ value: "GMB", label: { fr: "Gambie", en: "Gambia", default: "Gambia" } },
|
|
4604
|
+
{ value: "GEO", label: { fr: "G\xE9orgie", en: "Georgia", default: "Georgia" } },
|
|
4605
|
+
{ value: "DEU", label: { fr: "Allemagne", en: "Germany", default: "Germany" } },
|
|
4606
|
+
{ value: "GHA", label: { fr: "Ghana", en: "Ghana", default: "Ghana" } },
|
|
4607
|
+
{ value: "GRC", label: { fr: "Gr\xE8ce", en: "Greece", default: "Greece" } },
|
|
4608
|
+
{ value: "GRD", label: { fr: "Grenade", en: "Grenada", default: "Grenada" } },
|
|
4609
|
+
{ value: "GTM", label: { fr: "Guatemala", en: "Guatemala", default: "Guatemala" } },
|
|
4610
|
+
{ value: "GIN", label: { fr: "Guin\xE9e", en: "Guinea", default: "Guinea" } },
|
|
4611
|
+
{ value: "GNB", label: { fr: "Guin\xE9e-Bissau", en: "Guinea-Bissau", default: "Guinea-Bissau" } },
|
|
4612
|
+
{ value: "GUY", label: { fr: "Guyana", en: "Guyana", default: "Guyana" } },
|
|
4613
|
+
{ value: "HTI", label: { fr: "Ha\xEFti", en: "Haiti", default: "Haiti" } },
|
|
4614
|
+
{ value: "HND", label: { fr: "Honduras", en: "Honduras", default: "Honduras" } },
|
|
4615
|
+
{ value: "HUN", label: { fr: "Hongrie", en: "Hungary", default: "Hungary" } },
|
|
4616
|
+
{ value: "ISL", label: { fr: "Islande", en: "Iceland", default: "Iceland" } },
|
|
4617
|
+
{ value: "IND", label: { fr: "Inde", en: "India", default: "India" } },
|
|
4618
|
+
{ value: "IDN", label: { fr: "Indon\xE9sie", en: "Indonesia", default: "Indonesia" } },
|
|
4619
|
+
{ value: "IRN", label: { fr: "Iran", en: "Iran", default: "Iran" } },
|
|
4620
|
+
{ value: "IRQ", label: { fr: "Irak", en: "Iraq", default: "Iraq" } },
|
|
4621
|
+
{ value: "IRL", label: { fr: "Irlande", en: "Ireland", default: "Ireland" } },
|
|
4622
|
+
{ value: "ISR", label: { fr: "Isra\xEBl", en: "Israel", default: "Israel" } },
|
|
4623
|
+
{ value: "ITA", label: { fr: "Italie", en: "Italy", default: "Italy" } },
|
|
4624
|
+
{ value: "JAM", label: { fr: "Jama\xEFque", en: "Jamaica", default: "Jamaica" } },
|
|
4625
|
+
{ value: "JPN", label: { fr: "Japon", en: "Japan", default: "Japan" } },
|
|
4626
|
+
{ value: "JOR", label: { fr: "Jordanie", en: "Jordan", default: "Jordan" } },
|
|
4627
|
+
{ value: "KAZ", label: { fr: "Kazakhstan", en: "Kazakhstan", default: "Kazakhstan" } },
|
|
4628
|
+
{ value: "KEN", label: { fr: "Kenya", en: "Kenya", default: "Kenya" } },
|
|
4629
|
+
{ value: "KIR", label: { fr: "Kiribati", en: "Kiribati", default: "Kiribati" } },
|
|
4630
|
+
{ value: "PRK", label: { fr: "Cor\xE9e du Nord", en: "North Korea", default: "North Korea" } },
|
|
4631
|
+
{ value: "KOR", label: { fr: "Cor\xE9e du Sud", en: "South Korea", default: "South Korea" } },
|
|
4632
|
+
{ value: "KWT", label: { fr: "Kowe\xEFt", en: "Kuwait", default: "Kuwait" } },
|
|
4633
|
+
{ value: "KGZ", label: { fr: "Kirghizistan", en: "Kyrgyzstan", default: "Kyrgyzstan" } },
|
|
4634
|
+
{ value: "LAO", label: { fr: "Laos", en: "Laos", default: "Laos" } },
|
|
4635
|
+
{ value: "LVA", label: { fr: "Lettonie", en: "Latvia", default: "Latvia" } },
|
|
4636
|
+
{ value: "LBN", label: { fr: "Liban", en: "Lebanon", default: "Lebanon" } },
|
|
4637
|
+
{ value: "LSO", label: { fr: "Lesotho", en: "Lesotho", default: "Lesotho" } },
|
|
4638
|
+
{ value: "LBR", label: { fr: "Lib\xE9ria", en: "Liberia", default: "Liberia" } },
|
|
4639
|
+
{ value: "LBY", label: { fr: "Libye", en: "Libya", default: "Libya" } },
|
|
4640
|
+
{ value: "LIE", label: { fr: "Liechtenstein", en: "Liechtenstein", default: "Liechtenstein" } },
|
|
4641
|
+
{ value: "LTU", label: { fr: "Lituanie", en: "Lithuania", default: "Lithuania" } },
|
|
4642
|
+
{ value: "LUX", label: { fr: "Luxembourg", en: "Luxembourg", default: "Luxembourg" } },
|
|
4643
|
+
{ value: "MDG", label: { fr: "Madagascar", en: "Madagascar", default: "Madagascar" } },
|
|
4644
|
+
{ value: "MWI", label: { fr: "Malawi", en: "Malawi", default: "Malawi" } },
|
|
4645
|
+
{ value: "MYS", label: { fr: "Malaisie", en: "Malaysia", default: "Malaysia" } },
|
|
4646
|
+
{ value: "MDV", label: { fr: "Maldives", en: "Maldives", default: "Maldives" } },
|
|
4647
|
+
{ value: "MLI", label: { fr: "Mali", en: "Mali", default: "Mali" } },
|
|
4648
|
+
{ value: "MLT", label: { fr: "Malte", en: "Malta", default: "Malta" } },
|
|
4649
|
+
{ value: "MHL", label: { fr: "\xCEles Marshall", en: "Marshall Islands", default: "Marshall Islands" } },
|
|
4650
|
+
{ value: "MRT", label: { fr: "Mauritanie", en: "Mauritania", default: "Mauritania" } },
|
|
4651
|
+
{ value: "MUS", label: { fr: "Maurice", en: "Mauritius", default: "Mauritius" } },
|
|
4652
|
+
{ value: "MEX", label: { fr: "Mexique", en: "Mexico", default: "Mexico" } },
|
|
4653
|
+
{ value: "FSM", label: { fr: "\xC9tats f\xE9d\xE9r\xE9s de Micron\xE9sie", en: "Micronesia", default: "Micronesia" } },
|
|
4654
|
+
{ value: "MDA", label: { fr: "Moldavie", en: "Moldova", default: "Moldova" } },
|
|
4655
|
+
{ value: "MCO", label: { fr: "Monaco", en: "Monaco", default: "Monaco" } },
|
|
4656
|
+
{ value: "MNG", label: { fr: "Mongolie", en: "Mongolia", default: "Mongolia" } },
|
|
4657
|
+
{ value: "MNE", label: { fr: "Mont\xE9n\xE9gro", en: "Montenegro", default: "Montenegro" } },
|
|
4658
|
+
{ value: "MAR", label: { fr: "Maroc", en: "Morocco", default: "Morocco" } },
|
|
4659
|
+
{ value: "MOZ", label: { fr: "Mozambique", en: "Mozambique", default: "Mozambique" } },
|
|
4660
|
+
{ value: "MMR", label: { fr: "Myanmar", en: "Myanmar", default: "Myanmar" } },
|
|
4661
|
+
{ value: "NAM", label: { fr: "Namibie", en: "Namibia", default: "Namibia" } },
|
|
4662
|
+
{ value: "NRU", label: { fr: "Nauru", en: "Nauru", default: "Nauru" } },
|
|
4663
|
+
{ value: "NPL", label: { fr: "N\xE9pal", en: "Nepal", default: "Nepal" } },
|
|
4664
|
+
{ value: "NLD", label: { fr: "Pays-Bas", en: "Netherlands", default: "Netherlands" } },
|
|
4665
|
+
{ value: "NZL", label: { fr: "Nouvelle-Z\xE9lande", en: "New Zealand", default: "New Zealand" } },
|
|
4666
|
+
{ value: "NIC", label: { fr: "Nicaragua", en: "Nicaragua", default: "Nicaragua" } },
|
|
4667
|
+
{ value: "NER", label: { fr: "Niger", en: "Niger", default: "Niger" } },
|
|
4668
|
+
{ value: "NGA", label: { fr: "Nig\xE9ria", en: "Nigeria", default: "Nigeria" } },
|
|
4669
|
+
{ value: "MKD", label: { fr: "Mac\xE9doine du Nord", en: "North Macedonia", default: "North Macedonia" } },
|
|
4670
|
+
{ value: "NOR", label: { fr: "Norv\xE8ge", en: "Norway", default: "Norway" } },
|
|
4671
|
+
{ value: "OMN", label: { fr: "Oman", en: "Oman", default: "Oman" } },
|
|
4672
|
+
{ value: "PAK", label: { fr: "Pakistan", en: "Pakistan", default: "Pakistan" } },
|
|
4673
|
+
{ value: "PLW", label: { fr: "Palaos", en: "Palau", default: "Palau" } },
|
|
4674
|
+
{ value: "PAN", label: { fr: "Panama", en: "Panama", default: "Panama" } },
|
|
4675
|
+
{ value: "PNG", label: { fr: "Papouasie-Nouvelle-Guin\xE9e", en: "Papua New Guinea", default: "Papua New Guinea" } },
|
|
4676
|
+
{ value: "PRY", label: { fr: "Paraguay", en: "Paraguay", default: "Paraguay" } },
|
|
4677
|
+
{ value: "PER", label: { fr: "P\xE9rou", en: "Peru", default: "Peru" } },
|
|
4678
|
+
{ value: "PHL", label: { fr: "Philippines", en: "Philippines", default: "Philippines" } },
|
|
4679
|
+
{ value: "POL", label: { fr: "Pologne", en: "Poland", default: "Poland" } },
|
|
4680
|
+
{ value: "PRT", label: { fr: "Portugal", en: "Portugal", default: "Portugal" } },
|
|
4681
|
+
{ value: "QAT", label: { fr: "Qatar", en: "Qatar", default: "Qatar" } },
|
|
4682
|
+
{ value: "ROU", label: { fr: "Roumanie", en: "Romania", default: "Romania" } },
|
|
4683
|
+
{ value: "RUS", label: { fr: "Russie", en: "Russia", default: "Russia" } },
|
|
4684
|
+
{ value: "RWA", label: { fr: "Rwanda", en: "Rwanda", default: "Rwanda" } },
|
|
4685
|
+
{ value: "KNA", label: { fr: "Saint-Christophe-et-Ni\xE9v\xE8s", en: "Saint Kitts and Nevis", default: "Saint Kitts and Nevis" } },
|
|
4686
|
+
{ value: "LCA", label: { fr: "Sainte-Lucie", en: "Saint Lucia", default: "Saint Lucia" } },
|
|
4687
|
+
{ value: "VCT", label: { fr: "Saint-Vincent-et-les-Grenadines", en: "Saint Vincent and the Grenadines", default: "Saint Vincent and the Grenadines" } },
|
|
4688
|
+
{ value: "WSM", label: { fr: "Samoa", en: "Samoa", default: "Samoa" } },
|
|
4689
|
+
{ value: "SMR", label: { fr: "Saint-Marin", en: "San Marino", default: "San Marino" } },
|
|
4690
|
+
{ value: "STP", label: { fr: "Sao Tom\xE9-et-Principe", en: "Sao Tome and Principe", default: "Sao Tome and Principe" } },
|
|
4691
|
+
{ value: "SAU", label: { fr: "Arabie saoudite", en: "Saudi Arabia", default: "Saudi Arabia" } },
|
|
4692
|
+
{ value: "SEN", label: { fr: "S\xE9n\xE9gal", en: "Senegal", default: "Senegal" } },
|
|
4693
|
+
{ value: "SRB", label: { fr: "Serbie", en: "Serbia", default: "Serbia" } },
|
|
4694
|
+
{ value: "SYC", label: { fr: "Seychelles", en: "Seychelles", default: "Seychelles" } },
|
|
4695
|
+
{ value: "SLE", label: { fr: "Sierra Leone", en: "Sierra Leone", default: "Sierra Leone" } },
|
|
4696
|
+
{ value: "SGP", label: { fr: "Singapour", en: "Singapore", default: "Singapore" } },
|
|
4697
|
+
{ value: "SVK", label: { fr: "Slovaquie", en: "Slovakia", default: "Slovakia" } },
|
|
4698
|
+
{ value: "SVN", label: { fr: "Slov\xE9nie", en: "Slovenia", default: "Slovenia" } },
|
|
4699
|
+
{ value: "SLB", label: { fr: "\xCEles Salomon", en: "Solomon Islands", default: "Solomon Islands" } },
|
|
4700
|
+
{ value: "SOM", label: { fr: "Somalie", en: "Somalia", default: "Somalia" } },
|
|
4701
|
+
{ value: "ZAF", label: { fr: "Afrique du Sud", en: "South Africa", default: "South Africa" } },
|
|
4702
|
+
{ value: "SSD", label: { fr: "Soudan du Sud", en: "South Sudan", default: "South Sudan" } },
|
|
4703
|
+
{ value: "ESP", label: { fr: "Espagne", en: "Spain", default: "Spain" } },
|
|
4704
|
+
{ value: "LKA", label: { fr: "Sri Lanka", en: "Sri Lanka", default: "Sri Lanka" } },
|
|
4705
|
+
{ value: "SDN", label: { fr: "Soudan", en: "Sudan", default: "Sudan" } },
|
|
4706
|
+
{ value: "SUR", label: { fr: "Suriname", en: "Suriname", default: "Suriname" } },
|
|
4707
|
+
{ value: "SWE", label: { fr: "Su\xE8de", en: "Sweden", default: "Sweden" } },
|
|
4708
|
+
{ value: "CHE", label: { fr: "Suisse", en: "Switzerland", default: "Switzerland" } },
|
|
4709
|
+
{ value: "SYR", label: { fr: "Syrie", en: "Syria", default: "Syria" } },
|
|
4710
|
+
{ value: "TWN", label: { fr: "Ta\xEFwan", en: "Taiwan", default: "Taiwan" } },
|
|
4711
|
+
{ value: "TJK", label: { fr: "Tadjikistan", en: "Tajikistan", default: "Tajikistan" } },
|
|
4712
|
+
{ value: "TZA", label: { fr: "Tanzanie", en: "Tanzania", default: "Tanzania" } },
|
|
4713
|
+
{ value: "THA", label: { fr: "Tha\xEFlande", en: "Thailand", default: "Thailand" } },
|
|
4714
|
+
{ value: "TLS", label: { fr: "Timor oriental", en: "Timor-Leste", default: "Timor-Leste" } },
|
|
4715
|
+
{ value: "TGO", label: { fr: "Togo", en: "Togo", default: "Togo" } },
|
|
4716
|
+
{ value: "TON", label: { fr: "Tonga", en: "Tonga", default: "Tonga" } },
|
|
4717
|
+
{ value: "TTO", label: { fr: "Trinit\xE9-et-Tobago", en: "Trinidad and Tobago", default: "Trinidad and Tobago" } },
|
|
4718
|
+
{ value: "TUN", label: { fr: "Tunisie", en: "Tunisia", default: "Tunisia" } },
|
|
4719
|
+
{ value: "TUR", label: { fr: "Turquie", en: "Turkey", default: "Turkey" } },
|
|
4720
|
+
{ value: "TKM", label: { fr: "Turkm\xE9nistan", en: "Turkmenistan", default: "Turkmenistan" } },
|
|
4721
|
+
{ value: "TUV", label: { fr: "Tuvalu", en: "Tuvalu", default: "Tuvalu" } },
|
|
4722
|
+
{ value: "UGA", label: { fr: "Ouganda", en: "Uganda", default: "Uganda" } },
|
|
4723
|
+
{ value: "UKR", label: { fr: "Ukraine", en: "Ukraine", default: "Ukraine" } },
|
|
4724
|
+
{ value: "ARE", label: { fr: "\xC9mirats arabes unis", en: "United Arab Emirates", default: "United Arab Emirates" } },
|
|
4725
|
+
{ value: "GBR", label: { fr: "Royaume-Uni", en: "United Kingdom", default: "United Kingdom" } },
|
|
4726
|
+
{ value: "USA", label: { fr: "\xC9tats-Unis", en: "United States", default: "United States" } },
|
|
4727
|
+
{ value: "URY", label: { fr: "Uruguay", en: "Uruguay", default: "Uruguay" } },
|
|
4728
|
+
{ value: "UZB", label: { fr: "Ouzb\xE9kistan", en: "Uzbekistan", default: "Uzbekistan" } },
|
|
4729
|
+
{ value: "VUT", label: { fr: "Vanuatu", en: "Vanuatu", default: "Vanuatu" } },
|
|
4730
|
+
{ value: "VAT", label: { fr: "Vatican", en: "Vatican City", default: "Vatican City" } },
|
|
4731
|
+
{ value: "VEN", label: { fr: "Venezuela", en: "Venezuela", default: "Venezuela" } },
|
|
4732
|
+
{ value: "VNM", label: { fr: "Vietnam", en: "Vietnam", default: "Vietnam" } },
|
|
4733
|
+
{ value: "YEM", label: { fr: "Y\xE9men", en: "Yemen", default: "Yemen" } },
|
|
4734
|
+
{ value: "ZMB", label: { fr: "Zambie", en: "Zambia", default: "Zambia" } },
|
|
4735
|
+
{ value: "ZWE", label: { fr: "Zimbabwe", en: "Zimbabwe", default: "Zimbabwe" } }
|
|
4736
|
+
]
|
|
4737
|
+
};
|
|
4738
|
+
var Choices_default = CHOICES;
|
|
4739
|
+
var InvoiceTypeSelector = ({
|
|
4740
|
+
value,
|
|
4741
|
+
onSelect,
|
|
4742
|
+
disabled = false,
|
|
4743
|
+
language = "default"
|
|
4744
|
+
}) => {
|
|
4745
|
+
const options = CHOICES.INVOICE_TYPES.map((item) => ({
|
|
4746
|
+
value: item.value,
|
|
4747
|
+
label: item.label[language]
|
|
4748
|
+
}));
|
|
4749
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
4750
|
+
SearchableSelect,
|
|
4751
|
+
{
|
|
4752
|
+
value,
|
|
4753
|
+
options,
|
|
4754
|
+
placeholder: "S\xE9lectionner un type...",
|
|
4755
|
+
searchPlaceholder: "Rechercher...",
|
|
4756
|
+
onSelect,
|
|
4757
|
+
disabled
|
|
4758
|
+
},
|
|
4759
|
+
`invoice-type-${value}`
|
|
4760
|
+
);
|
|
4761
|
+
};
|
|
4762
|
+
var PaymentMethodSelector = ({
|
|
4763
|
+
value,
|
|
4764
|
+
onSelect,
|
|
4765
|
+
disabled = false,
|
|
4766
|
+
language = "default"
|
|
4767
|
+
}) => {
|
|
4768
|
+
const options = CHOICES.PAYMENT_METHODS.map((item) => ({
|
|
4769
|
+
value: item.value,
|
|
4770
|
+
label: item.label[language]
|
|
4771
|
+
}));
|
|
4772
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
4773
|
+
SearchableSelect,
|
|
4774
|
+
{
|
|
4775
|
+
value,
|
|
4776
|
+
options,
|
|
4777
|
+
placeholder: "S\xE9lectionner un mode de paiement...",
|
|
4778
|
+
searchPlaceholder: "Rechercher...",
|
|
4779
|
+
onSelect,
|
|
4780
|
+
disabled
|
|
4781
|
+
},
|
|
4782
|
+
`payment-method-${value}`
|
|
4783
|
+
);
|
|
4784
|
+
};
|
|
4785
|
+
var TemplateFNESelector = ({
|
|
4786
|
+
value,
|
|
4787
|
+
onSelect,
|
|
4788
|
+
disabled = false,
|
|
4789
|
+
language = "default"
|
|
4790
|
+
}) => {
|
|
4791
|
+
const options = CHOICES.TEMPLATES.map((item) => ({
|
|
4792
|
+
value: item.value,
|
|
4793
|
+
label: item.label[language]
|
|
4794
|
+
}));
|
|
4795
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
4796
|
+
SearchableSelect,
|
|
4797
|
+
{
|
|
4798
|
+
value,
|
|
4799
|
+
options,
|
|
4800
|
+
placeholder: "S\xE9lectionner un template...",
|
|
4801
|
+
searchPlaceholder: "Rechercher...",
|
|
4802
|
+
onSelect,
|
|
4803
|
+
disabled
|
|
4804
|
+
},
|
|
4805
|
+
`template-${value}`
|
|
4806
|
+
);
|
|
4807
|
+
};
|
|
4808
|
+
var ForeignCurrencySelector = ({
|
|
4809
|
+
value,
|
|
4810
|
+
onSelect,
|
|
4811
|
+
disabled = false,
|
|
4812
|
+
language = "default"
|
|
4813
|
+
}) => {
|
|
4814
|
+
const options = CHOICES.FOREIGN_CURRENCIES.map((item) => ({
|
|
4815
|
+
value: item.value,
|
|
4816
|
+
label: item.label[language]
|
|
4817
|
+
}));
|
|
4818
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
4819
|
+
SearchableSelect,
|
|
4820
|
+
{
|
|
4821
|
+
value,
|
|
4822
|
+
options,
|
|
4823
|
+
placeholder: "S\xE9lectionner une devise...",
|
|
4824
|
+
searchPlaceholder: "Rechercher...",
|
|
4825
|
+
onSelect,
|
|
4826
|
+
disabled
|
|
4827
|
+
},
|
|
4828
|
+
`currency-${value}`
|
|
4829
|
+
);
|
|
4830
|
+
};
|
|
4831
|
+
var TaxSelector = ({
|
|
4832
|
+
value,
|
|
4833
|
+
onSelect,
|
|
4834
|
+
disabled = false,
|
|
4835
|
+
language = "default",
|
|
4836
|
+
handleChange
|
|
4837
|
+
}) => {
|
|
4838
|
+
const options = CHOICES.TAXES.map((item) => ({
|
|
4839
|
+
value: item.value,
|
|
4840
|
+
label: item.label[language]
|
|
4841
|
+
}));
|
|
4842
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
4843
|
+
SearchableSelect,
|
|
4844
|
+
{
|
|
4845
|
+
value,
|
|
4846
|
+
options,
|
|
4847
|
+
placeholder: "S\xE9lectionner une taxe...",
|
|
4848
|
+
searchPlaceholder: "Rechercher...",
|
|
4849
|
+
onSelect: (option) => {
|
|
4850
|
+
if (handleChange) {
|
|
4851
|
+
handleChange(option.value);
|
|
4852
|
+
}
|
|
4853
|
+
onSelect(option);
|
|
4854
|
+
},
|
|
4855
|
+
disabled
|
|
4856
|
+
},
|
|
4857
|
+
`tax-${value}`
|
|
4858
|
+
);
|
|
4859
|
+
};
|
|
4860
|
+
var LegalFormSelector = ({
|
|
4861
|
+
value,
|
|
4862
|
+
onSelect,
|
|
4863
|
+
disabled = false,
|
|
4864
|
+
language = "default"
|
|
4865
|
+
}) => {
|
|
4866
|
+
const options = CHOICES.LEGAL_FORMS.map((item) => ({
|
|
4867
|
+
value: item.value,
|
|
4868
|
+
label: item.label[language] ?? item.label.default
|
|
4869
|
+
}));
|
|
4870
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
4871
|
+
SearchableSelect,
|
|
4872
|
+
{
|
|
4873
|
+
value,
|
|
4874
|
+
options,
|
|
4875
|
+
placeholder: "S\xE9lectionner une forme juridique...",
|
|
4876
|
+
searchPlaceholder: "Rechercher...",
|
|
4877
|
+
onSelect,
|
|
4878
|
+
disabled
|
|
4879
|
+
},
|
|
4880
|
+
`legal-form-${value}`
|
|
4881
|
+
);
|
|
4882
|
+
};
|
|
4883
|
+
var CountrySelector = ({
|
|
4884
|
+
value,
|
|
4885
|
+
onSelect,
|
|
4886
|
+
disabled = false,
|
|
4887
|
+
language = "default"
|
|
4888
|
+
}) => {
|
|
4889
|
+
const options = CHOICES.COUNTRIES.map((item) => ({
|
|
4890
|
+
value: item.value,
|
|
4891
|
+
label: item.label[language]
|
|
4892
|
+
}));
|
|
4893
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
4894
|
+
SearchableSelect,
|
|
4895
|
+
{
|
|
4896
|
+
value,
|
|
4897
|
+
options,
|
|
4898
|
+
placeholder: "S\xE9lectionner un pays...",
|
|
4899
|
+
searchPlaceholder: "Rechercher...",
|
|
4900
|
+
onSelect,
|
|
4901
|
+
disabled
|
|
4902
|
+
},
|
|
4903
|
+
`country-${value}`
|
|
4904
|
+
);
|
|
4905
|
+
};
|
|
4351
4906
|
// Annotate the CommonJS export names for ESM import in node:
|
|
4352
4907
|
0 && (module.exports = {
|
|
4353
4908
|
Alert,
|
|
@@ -4356,14 +4911,20 @@ var SelectCostCenter = ({
|
|
|
4356
4911
|
ApprovalAnswerPage,
|
|
4357
4912
|
ApprovalPreviewAnswer,
|
|
4358
4913
|
ApprovalWorkflow,
|
|
4914
|
+
CHOICES,
|
|
4915
|
+
CountrySelector,
|
|
4359
4916
|
DateInput,
|
|
4360
4917
|
FDrawer,
|
|
4361
4918
|
FetchApi,
|
|
4362
4919
|
FileInput,
|
|
4920
|
+
ForeignCurrencySelector,
|
|
4363
4921
|
InputField,
|
|
4922
|
+
InvoiceTypeSelector,
|
|
4923
|
+
LegalFormSelector,
|
|
4364
4924
|
Modal,
|
|
4365
4925
|
NumberInput,
|
|
4366
4926
|
Pages,
|
|
4927
|
+
PaymentMethodSelector,
|
|
4367
4928
|
PrimaryButton,
|
|
4368
4929
|
RewiseLayout,
|
|
4369
4930
|
SecondaryButton,
|
|
@@ -4373,6 +4934,8 @@ var SelectCostCenter = ({
|
|
|
4373
4934
|
SelectUser,
|
|
4374
4935
|
SelectVendor,
|
|
4375
4936
|
SessionProvider,
|
|
4937
|
+
TaxSelector,
|
|
4938
|
+
TemplateFNESelector,
|
|
4376
4939
|
TextInput,
|
|
4377
4940
|
ThemeProvider,
|
|
4378
4941
|
ToastContainer,
|