ptechcore_ui 1.0.73 → 1.0.74
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 +7 -19
- package/dist/index.js +7 -19
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -11965,7 +11965,7 @@ var statusMap = {
|
|
|
11965
11965
|
};
|
|
11966
11966
|
var getStatus = (answer) => statusMap[answer] || statusMap["not-send" /* NOT_SEND */];
|
|
11967
11967
|
var getName = (a) => a.user_detail ? `${a.user_detail.first_name} ${a.user_detail.last_name}`.trim() : a.full_name || "-";
|
|
11968
|
-
var getRole = (a, center_id) => a.user_detail?.center_access
|
|
11968
|
+
var getRole = (a, center_id) => a.user_detail?.center_access?.find((c) => c.center_id === center_id)?.fonction ?? "";
|
|
11969
11969
|
var formatDate2 = (date) => date ? formatDateFR(date) : "-";
|
|
11970
11970
|
var borderStyle = { borderColor: "var(--color-border)" };
|
|
11971
11971
|
var cellClass = "border px-2 py-1";
|
|
@@ -12009,10 +12009,7 @@ var ApprovalRecap = ({ process, object_id }) => {
|
|
|
12009
12009
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("td", { className: `${cellClass} uppercase`, style: { ...borderStyle, color: "var(--color-text)" }, children: getName(item) }),
|
|
12010
12010
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("td", { className: `${cellClass} uppercase`, style: { ...borderStyle, color: "var(--color-text)" }, children: getRole(item, activeBusinessEntity?.id ?? null) }),
|
|
12011
12011
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("td", { className: cellClass, style: borderStyle, children: formatDate2(item.answered_at) }),
|
|
12012
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("td", { className: cellClass, style: borderStyle, children: /* @__PURE__ */ (0, import_jsx_runtime34.
|
|
12013
|
-
s.icon,
|
|
12014
|
-
s.label
|
|
12015
|
-
] }) }),
|
|
12012
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("td", { className: cellClass, style: borderStyle, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "inline-flex items-center gap-1", style: { color: s.color }, children: s.icon }) }),
|
|
12016
12013
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("td", { className: cellClass, style: borderStyle })
|
|
12017
12014
|
] }, i);
|
|
12018
12015
|
})
|
|
@@ -12033,10 +12030,7 @@ var ApprovalRecap = ({ process, object_id }) => {
|
|
|
12033
12030
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("td", { className: `${cellClass} uppercase`, style: { ...borderStyle, color: "var(--color-text)" }, children: `${requester.first_name} ${requester.last_name}`.trim() }),
|
|
12034
12031
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("td", { className: `${cellClass} uppercase`, style: { ...borderStyle, color: "var(--color-text)" }, children: requester?.role ?? "" }),
|
|
12035
12032
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("td", { className: cellClass, style: borderStyle, children: formatDate2(caseData.created_at) }),
|
|
12036
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("td", { className: cellClass, style: borderStyle, children: /* @__PURE__ */ (0, import_jsx_runtime34.
|
|
12037
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react23.CheckCircle, { className: "w-3.5 h-3.5" }),
|
|
12038
|
-
"Demand\xE9"
|
|
12039
|
-
] }) }),
|
|
12033
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("td", { className: cellClass, style: borderStyle, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "inline-flex items-center gap-1", style: { color: "var(--color-primary)" }, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react23.CheckCircle, { className: "w-3.5 h-3.5" }) }) }),
|
|
12040
12034
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("td", { className: cellClass, style: borderStyle })
|
|
12041
12035
|
] }),
|
|
12042
12036
|
renderGroupRows("V\xE9rifi\xE9 par", verifications),
|
|
@@ -19197,8 +19191,6 @@ var FormPurchaseRequest = ({
|
|
|
19197
19191
|
}
|
|
19198
19192
|
if (!formData.items || formData.items.length === 0) {
|
|
19199
19193
|
newErrors.items = "Au moins un article est requis";
|
|
19200
|
-
} else if (!formData.estimated_amount || formData.estimated_amount <= 0) {
|
|
19201
|
-
newErrors.items = "Le montant total des articles doit \xEAtre sup\xE9rieur \xE0 0";
|
|
19202
19194
|
} else {
|
|
19203
19195
|
const missingCostCenter = formData.items.some((item) => !item.cost_center);
|
|
19204
19196
|
if (missingCostCenter) {
|
|
@@ -19812,7 +19804,7 @@ var PrintablePurchaseRequest = ({
|
|
|
19812
19804
|
] })
|
|
19813
19805
|
] })
|
|
19814
19806
|
] }),
|
|
19815
|
-
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "grid grid-cols-
|
|
19807
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "grid grid-cols-3 gap-0 mb-4", children: [
|
|
19816
19808
|
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { children: [
|
|
19817
19809
|
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "text-white text-xs py-1.5 px-3", style: { backgroundColor: PRINT_GRAY }, children: "CAT\xC9GORIE" }),
|
|
19818
19810
|
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "border border-gray-300 border-t-0 p-2 text-xs", children: data.category || "-" })
|
|
@@ -19824,10 +19816,6 @@ var PrintablePurchaseRequest = ({
|
|
|
19824
19816
|
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { children: [
|
|
19825
19817
|
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "text-white text-xs py-1.5 px-3", style: { backgroundColor: PRINT_GRAY }, children: "DATE SOUHAIT\xC9E" }),
|
|
19826
19818
|
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "border border-gray-300 border-t-0 border-l-0 p-2 text-xs", children: data.needed_date ? formatDateFR(data.needed_date) : "-" })
|
|
19827
|
-
] }),
|
|
19828
|
-
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { children: [
|
|
19829
|
-
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "text-white text-xs py-1.5 px-3", style: { backgroundColor: PRINT_GRAY }, children: "BUDGET DISPONIBLE" }),
|
|
19830
|
-
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "border border-gray-300 border-t-0 border-l-0 p-2 text-xs", children: data.budget_available ? "Oui" : "Non" })
|
|
19831
19819
|
] })
|
|
19832
19820
|
] }),
|
|
19833
19821
|
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "mb-4", children: [
|
|
@@ -19893,7 +19881,7 @@ var PrintablePurchaseRequest = ({
|
|
|
19893
19881
|
data.vendor_info.phone && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: "text-gray-600", children: data.vendor_info.phone })
|
|
19894
19882
|
] })
|
|
19895
19883
|
] }),
|
|
19896
|
-
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "flex w-[
|
|
19884
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "flex w-[55%]", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
19897
19885
|
ApprovalRecap_default,
|
|
19898
19886
|
{
|
|
19899
19887
|
process: "PCR-PR",
|
|
@@ -19974,12 +19962,11 @@ var PurchaseRequestsPage = () => {
|
|
|
19974
19962
|
apiEndpoint: `/procurement/purchase-requests/myself/`,
|
|
19975
19963
|
toggle: refreshToggle,
|
|
19976
19964
|
columns: [
|
|
19965
|
+
{ key: "created_at", label: "Date de cr\xE9ation", type: "date", filterable: true, sortable: true, search_name: "created_at" },
|
|
19977
19966
|
{ key: "request_number", label: "N\xB0 DA", type: "text", filterable: true, sortable: true, search_name: "request_number" },
|
|
19978
19967
|
{ key: "requested_by_user", label: "Demandeur", type: "text", filterable: true, sortable: false, search_name: "requester__last_name" },
|
|
19979
19968
|
{ key: "title", label: "Titre", type: "text", filterable: true, sortable: true, search_name: "title" },
|
|
19980
19969
|
{ key: "amount", label: "Montant Estim\xE9", type: "number", filterable: true, sortable: true, search_name: "amount", formule: (item) => item.amount ? `${formatCurrency(item.amount)}` : "0 FCFA" },
|
|
19981
|
-
{ key: "vendor", label: "Fournisseur", type: "text", filterable: true, sortable: true, search_name: "vendor", filter_endpoint: "/accounting/vendors/", formule: (item) => item.vendor_info?.legal_name ?? "" },
|
|
19982
|
-
{ key: "created_at", label: "Date de cr\xE9ation", type: "date", filterable: true, sortable: true, search_name: "created_at" },
|
|
19983
19970
|
{
|
|
19984
19971
|
key: "status",
|
|
19985
19972
|
label: "Statut",
|
|
@@ -20024,6 +20011,7 @@ var PurchaseRequestsPage = () => {
|
|
|
20024
20011
|
return "N/A";
|
|
20025
20012
|
}
|
|
20026
20013
|
},
|
|
20014
|
+
{ key: "vendor", label: "Fournisseur", type: "text", filterable: true, sortable: true, search_name: "vendor", formule: (item) => item.po_details?.vendor_name ?? "", filter_endpoint: "/accounting/vendors/" },
|
|
20027
20015
|
{ key: "po_amount", label: "Montant Reel", type: "number", filterable: true, sortable: true, search_name: "po_amount", formule: (item) => item.po_amount ? `${formatCurrency(item.po_amount)}` : "-" },
|
|
20028
20016
|
{
|
|
20029
20017
|
key: "approval_status",
|
package/dist/index.js
CHANGED
|
@@ -11820,7 +11820,7 @@ var statusMap = {
|
|
|
11820
11820
|
};
|
|
11821
11821
|
var getStatus = (answer) => statusMap[answer] || statusMap["not-send" /* NOT_SEND */];
|
|
11822
11822
|
var getName = (a) => a.user_detail ? `${a.user_detail.first_name} ${a.user_detail.last_name}`.trim() : a.full_name || "-";
|
|
11823
|
-
var getRole = (a, center_id) => a.user_detail?.center_access
|
|
11823
|
+
var getRole = (a, center_id) => a.user_detail?.center_access?.find((c) => c.center_id === center_id)?.fonction ?? "";
|
|
11824
11824
|
var formatDate2 = (date) => date ? formatDateFR(date) : "-";
|
|
11825
11825
|
var borderStyle = { borderColor: "var(--color-border)" };
|
|
11826
11826
|
var cellClass = "border px-2 py-1";
|
|
@@ -11864,10 +11864,7 @@ var ApprovalRecap = ({ process, object_id }) => {
|
|
|
11864
11864
|
/* @__PURE__ */ jsx34("td", { className: `${cellClass} uppercase`, style: { ...borderStyle, color: "var(--color-text)" }, children: getName(item) }),
|
|
11865
11865
|
/* @__PURE__ */ jsx34("td", { className: `${cellClass} uppercase`, style: { ...borderStyle, color: "var(--color-text)" }, children: getRole(item, activeBusinessEntity?.id ?? null) }),
|
|
11866
11866
|
/* @__PURE__ */ jsx34("td", { className: cellClass, style: borderStyle, children: formatDate2(item.answered_at) }),
|
|
11867
|
-
/* @__PURE__ */ jsx34("td", { className: cellClass, style: borderStyle, children: /* @__PURE__ */
|
|
11868
|
-
s.icon,
|
|
11869
|
-
s.label
|
|
11870
|
-
] }) }),
|
|
11867
|
+
/* @__PURE__ */ jsx34("td", { className: cellClass, style: borderStyle, children: /* @__PURE__ */ jsx34("span", { className: "inline-flex items-center gap-1", style: { color: s.color }, children: s.icon }) }),
|
|
11871
11868
|
/* @__PURE__ */ jsx34("td", { className: cellClass, style: borderStyle })
|
|
11872
11869
|
] }, i);
|
|
11873
11870
|
})
|
|
@@ -11888,10 +11885,7 @@ var ApprovalRecap = ({ process, object_id }) => {
|
|
|
11888
11885
|
/* @__PURE__ */ jsx34("td", { className: `${cellClass} uppercase`, style: { ...borderStyle, color: "var(--color-text)" }, children: `${requester.first_name} ${requester.last_name}`.trim() }),
|
|
11889
11886
|
/* @__PURE__ */ jsx34("td", { className: `${cellClass} uppercase`, style: { ...borderStyle, color: "var(--color-text)" }, children: requester?.role ?? "" }),
|
|
11890
11887
|
/* @__PURE__ */ jsx34("td", { className: cellClass, style: borderStyle, children: formatDate2(caseData.created_at) }),
|
|
11891
|
-
/* @__PURE__ */ jsx34("td", { className: cellClass, style: borderStyle, children: /* @__PURE__ */
|
|
11892
|
-
/* @__PURE__ */ jsx34(CheckCircle3, { className: "w-3.5 h-3.5" }),
|
|
11893
|
-
"Demand\xE9"
|
|
11894
|
-
] }) }),
|
|
11888
|
+
/* @__PURE__ */ jsx34("td", { className: cellClass, style: borderStyle, children: /* @__PURE__ */ jsx34("span", { className: "inline-flex items-center gap-1", style: { color: "var(--color-primary)" }, children: /* @__PURE__ */ jsx34(CheckCircle3, { className: "w-3.5 h-3.5" }) }) }),
|
|
11895
11889
|
/* @__PURE__ */ jsx34("td", { className: cellClass, style: borderStyle })
|
|
11896
11890
|
] }),
|
|
11897
11891
|
renderGroupRows("V\xE9rifi\xE9 par", verifications),
|
|
@@ -19126,8 +19120,6 @@ var FormPurchaseRequest = ({
|
|
|
19126
19120
|
}
|
|
19127
19121
|
if (!formData.items || formData.items.length === 0) {
|
|
19128
19122
|
newErrors.items = "Au moins un article est requis";
|
|
19129
|
-
} else if (!formData.estimated_amount || formData.estimated_amount <= 0) {
|
|
19130
|
-
newErrors.items = "Le montant total des articles doit \xEAtre sup\xE9rieur \xE0 0";
|
|
19131
19123
|
} else {
|
|
19132
19124
|
const missingCostCenter = formData.items.some((item) => !item.cost_center);
|
|
19133
19125
|
if (missingCostCenter) {
|
|
@@ -19741,7 +19733,7 @@ var PrintablePurchaseRequest = ({
|
|
|
19741
19733
|
] })
|
|
19742
19734
|
] })
|
|
19743
19735
|
] }),
|
|
19744
|
-
/* @__PURE__ */ jsxs52("div", { className: "grid grid-cols-
|
|
19736
|
+
/* @__PURE__ */ jsxs52("div", { className: "grid grid-cols-3 gap-0 mb-4", children: [
|
|
19745
19737
|
/* @__PURE__ */ jsxs52("div", { children: [
|
|
19746
19738
|
/* @__PURE__ */ jsx59("div", { className: "text-white text-xs py-1.5 px-3", style: { backgroundColor: PRINT_GRAY }, children: "CAT\xC9GORIE" }),
|
|
19747
19739
|
/* @__PURE__ */ jsx59("div", { className: "border border-gray-300 border-t-0 p-2 text-xs", children: data.category || "-" })
|
|
@@ -19753,10 +19745,6 @@ var PrintablePurchaseRequest = ({
|
|
|
19753
19745
|
/* @__PURE__ */ jsxs52("div", { children: [
|
|
19754
19746
|
/* @__PURE__ */ jsx59("div", { className: "text-white text-xs py-1.5 px-3", style: { backgroundColor: PRINT_GRAY }, children: "DATE SOUHAIT\xC9E" }),
|
|
19755
19747
|
/* @__PURE__ */ jsx59("div", { className: "border border-gray-300 border-t-0 border-l-0 p-2 text-xs", children: data.needed_date ? formatDateFR(data.needed_date) : "-" })
|
|
19756
|
-
] }),
|
|
19757
|
-
/* @__PURE__ */ jsxs52("div", { children: [
|
|
19758
|
-
/* @__PURE__ */ jsx59("div", { className: "text-white text-xs py-1.5 px-3", style: { backgroundColor: PRINT_GRAY }, children: "BUDGET DISPONIBLE" }),
|
|
19759
|
-
/* @__PURE__ */ jsx59("div", { className: "border border-gray-300 border-t-0 border-l-0 p-2 text-xs", children: data.budget_available ? "Oui" : "Non" })
|
|
19760
19748
|
] })
|
|
19761
19749
|
] }),
|
|
19762
19750
|
/* @__PURE__ */ jsxs52("div", { className: "mb-4", children: [
|
|
@@ -19822,7 +19810,7 @@ var PrintablePurchaseRequest = ({
|
|
|
19822
19810
|
data.vendor_info.phone && /* @__PURE__ */ jsx59("p", { className: "text-gray-600", children: data.vendor_info.phone })
|
|
19823
19811
|
] })
|
|
19824
19812
|
] }),
|
|
19825
|
-
/* @__PURE__ */ jsx59("div", { className: "flex w-[
|
|
19813
|
+
/* @__PURE__ */ jsx59("div", { className: "flex w-[55%]", children: /* @__PURE__ */ jsx59(
|
|
19826
19814
|
ApprovalRecap_default,
|
|
19827
19815
|
{
|
|
19828
19816
|
process: "PCR-PR",
|
|
@@ -19903,12 +19891,11 @@ var PurchaseRequestsPage = () => {
|
|
|
19903
19891
|
apiEndpoint: `/procurement/purchase-requests/myself/`,
|
|
19904
19892
|
toggle: refreshToggle,
|
|
19905
19893
|
columns: [
|
|
19894
|
+
{ key: "created_at", label: "Date de cr\xE9ation", type: "date", filterable: true, sortable: true, search_name: "created_at" },
|
|
19906
19895
|
{ key: "request_number", label: "N\xB0 DA", type: "text", filterable: true, sortable: true, search_name: "request_number" },
|
|
19907
19896
|
{ key: "requested_by_user", label: "Demandeur", type: "text", filterable: true, sortable: false, search_name: "requester__last_name" },
|
|
19908
19897
|
{ key: "title", label: "Titre", type: "text", filterable: true, sortable: true, search_name: "title" },
|
|
19909
19898
|
{ key: "amount", label: "Montant Estim\xE9", type: "number", filterable: true, sortable: true, search_name: "amount", formule: (item) => item.amount ? `${formatCurrency(item.amount)}` : "0 FCFA" },
|
|
19910
|
-
{ key: "vendor", label: "Fournisseur", type: "text", filterable: true, sortable: true, search_name: "vendor", filter_endpoint: "/accounting/vendors/", formule: (item) => item.vendor_info?.legal_name ?? "" },
|
|
19911
|
-
{ key: "created_at", label: "Date de cr\xE9ation", type: "date", filterable: true, sortable: true, search_name: "created_at" },
|
|
19912
19899
|
{
|
|
19913
19900
|
key: "status",
|
|
19914
19901
|
label: "Statut",
|
|
@@ -19953,6 +19940,7 @@ var PurchaseRequestsPage = () => {
|
|
|
19953
19940
|
return "N/A";
|
|
19954
19941
|
}
|
|
19955
19942
|
},
|
|
19943
|
+
{ key: "vendor", label: "Fournisseur", type: "text", filterable: true, sortable: true, search_name: "vendor", formule: (item) => item.po_details?.vendor_name ?? "", filter_endpoint: "/accounting/vendors/" },
|
|
19956
19944
|
{ key: "po_amount", label: "Montant Reel", type: "number", filterable: true, sortable: true, search_name: "po_amount", formule: (item) => item.po_amount ? `${formatCurrency(item.po_amount)}` : "-" },
|
|
19957
19945
|
{
|
|
19958
19946
|
key: "approval_status",
|