ptechcore_ui 1.0.75 → 1.0.76
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 +8 -19
- package/dist/index.js +8 -19
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -5486,7 +5486,7 @@ var Pagination = ({
|
|
|
5486
5486
|
"select",
|
|
5487
5487
|
{
|
|
5488
5488
|
id: "page-select",
|
|
5489
|
-
value: current_page,
|
|
5489
|
+
value: current_page ?? "",
|
|
5490
5490
|
onChange: (e) => setFilters({ ...filtersValue, page: Number(e.target.value) }),
|
|
5491
5491
|
style: { height: "27px", color: "#72939D", border: "0.05rem solid #f2f2f2", background: "#ffffff" },
|
|
5492
5492
|
children: Array.from({ length: total_pages }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: index + 1, children: index + 1 }, index + 1))
|
|
@@ -11965,7 +11965,10 @@ 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) =>
|
|
11968
|
+
var getRole = (a, center_id) => {
|
|
11969
|
+
console.log(a.user_detail, center_id);
|
|
11970
|
+
return a.user_detail?.centers_access?.find((c) => c.id === center_id)?.fonction ?? "";
|
|
11971
|
+
};
|
|
11969
11972
|
var formatDate2 = (date) => date ? formatDateFR(date) : "-";
|
|
11970
11973
|
var borderStyle = { borderColor: "var(--color-border)" };
|
|
11971
11974
|
var cellClass = "border px-2 py-1";
|
|
@@ -11995,14 +11998,7 @@ var ApprovalRecap = ({ process, object_id }) => {
|
|
|
11995
11998
|
if (items.length === 0) return null;
|
|
11996
11999
|
const status = getStatus(items[0].answer);
|
|
11997
12000
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
|
|
11998
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.
|
|
11999
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("td", { className: cellClass, style: borderStyle, rowSpan: items.length + 1, children: label }),
|
|
12000
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("td", { className: cellClass, style: borderStyle }),
|
|
12001
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("td", { className: cellClass, style: borderStyle }),
|
|
12002
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("td", { className: cellClass, style: borderStyle }),
|
|
12003
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("td", { className: cellClass, style: borderStyle }),
|
|
12004
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("td", { className: cellClass, style: borderStyle })
|
|
12005
|
-
] }),
|
|
12001
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("td", { className: cellClass, style: borderStyle, rowSpan: items.length + 1, children: label }) }),
|
|
12006
12002
|
items.map((item, i) => {
|
|
12007
12003
|
const s = getStatus(item.answer);
|
|
12008
12004
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("tr", { children: [
|
|
@@ -12028,7 +12024,7 @@ var ApprovalRecap = ({ process, object_id }) => {
|
|
|
12028
12024
|
requester && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("tr", { children: [
|
|
12029
12025
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("td", { className: cellClass, style: borderStyle, children: "Demand\xE9 par" }),
|
|
12030
12026
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("td", { className: `${cellClass} uppercase`, style: { ...borderStyle, color: "var(--color-text)" }, children: `${requester.first_name} ${requester.last_name}`.trim() }),
|
|
12031
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("td", { className: `${cellClass} uppercase`, style: { ...borderStyle, color: "var(--color-text)" }, children: requester?.
|
|
12027
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("td", { className: `${cellClass} uppercase`, style: { ...borderStyle, color: "var(--color-text)" }, children: requester?.centers_access?.find((c) => c.id === activeBusinessEntity?.id)?.fonction ?? "" }),
|
|
12032
12028
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("td", { className: cellClass, style: borderStyle, children: formatDate2(caseData.created_at) }),
|
|
12033
12029
|
/* @__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" }) }) }),
|
|
12034
12030
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("td", { className: cellClass, style: borderStyle })
|
|
@@ -19881,14 +19877,7 @@ var PrintablePurchaseRequest = ({
|
|
|
19881
19877
|
data.vendor_info.phone && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: "text-gray-600", children: data.vendor_info.phone })
|
|
19882
19878
|
] })
|
|
19883
19879
|
] }),
|
|
19884
|
-
/* @__PURE__ */ (0, import_jsx_runtime59.
|
|
19885
|
-
ApprovalRecap_default,
|
|
19886
|
-
{
|
|
19887
|
-
process: "PCR-PR",
|
|
19888
|
-
object_id: data.id
|
|
19889
|
-
}
|
|
19890
|
-
) }),
|
|
19891
|
-
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "grid grid-cols-2 gap-8 mt-12 pt-4", children: [
|
|
19880
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex justify-between gap-8 mt-12 pt-4", children: [
|
|
19892
19881
|
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { children: [
|
|
19893
19882
|
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: "text-xs text-gray-600 mb-1", children: "Date d'impression:" }),
|
|
19894
19883
|
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "border-b border-gray-400 w-32 mb-4 text-xs", children: currentDate }),
|
package/dist/index.js
CHANGED
|
@@ -5293,7 +5293,7 @@ var Pagination = ({
|
|
|
5293
5293
|
"select",
|
|
5294
5294
|
{
|
|
5295
5295
|
id: "page-select",
|
|
5296
|
-
value: current_page,
|
|
5296
|
+
value: current_page ?? "",
|
|
5297
5297
|
onChange: (e) => setFilters({ ...filtersValue, page: Number(e.target.value) }),
|
|
5298
5298
|
style: { height: "27px", color: "#72939D", border: "0.05rem solid #f2f2f2", background: "#ffffff" },
|
|
5299
5299
|
children: Array.from({ length: total_pages }, (_, index) => /* @__PURE__ */ jsx16("option", { value: index + 1, children: index + 1 }, index + 1))
|
|
@@ -11820,7 +11820,10 @@ 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) =>
|
|
11823
|
+
var getRole = (a, center_id) => {
|
|
11824
|
+
console.log(a.user_detail, center_id);
|
|
11825
|
+
return a.user_detail?.centers_access?.find((c) => c.id === center_id)?.fonction ?? "";
|
|
11826
|
+
};
|
|
11824
11827
|
var formatDate2 = (date) => date ? formatDateFR(date) : "-";
|
|
11825
11828
|
var borderStyle = { borderColor: "var(--color-border)" };
|
|
11826
11829
|
var cellClass = "border px-2 py-1";
|
|
@@ -11850,14 +11853,7 @@ var ApprovalRecap = ({ process, object_id }) => {
|
|
|
11850
11853
|
if (items.length === 0) return null;
|
|
11851
11854
|
const status = getStatus(items[0].answer);
|
|
11852
11855
|
return /* @__PURE__ */ jsxs28(Fragment10, { children: [
|
|
11853
|
-
/* @__PURE__ */
|
|
11854
|
-
/* @__PURE__ */ jsx34("td", { className: cellClass, style: borderStyle, rowSpan: items.length + 1, children: label }),
|
|
11855
|
-
/* @__PURE__ */ jsx34("td", { className: cellClass, style: borderStyle }),
|
|
11856
|
-
/* @__PURE__ */ jsx34("td", { className: cellClass, style: borderStyle }),
|
|
11857
|
-
/* @__PURE__ */ jsx34("td", { className: cellClass, style: borderStyle }),
|
|
11858
|
-
/* @__PURE__ */ jsx34("td", { className: cellClass, style: borderStyle }),
|
|
11859
|
-
/* @__PURE__ */ jsx34("td", { className: cellClass, style: borderStyle })
|
|
11860
|
-
] }),
|
|
11856
|
+
/* @__PURE__ */ jsx34("tr", { children: /* @__PURE__ */ jsx34("td", { className: cellClass, style: borderStyle, rowSpan: items.length + 1, children: label }) }),
|
|
11861
11857
|
items.map((item, i) => {
|
|
11862
11858
|
const s = getStatus(item.answer);
|
|
11863
11859
|
return /* @__PURE__ */ jsxs28("tr", { children: [
|
|
@@ -11883,7 +11879,7 @@ var ApprovalRecap = ({ process, object_id }) => {
|
|
|
11883
11879
|
requester && /* @__PURE__ */ jsxs28("tr", { children: [
|
|
11884
11880
|
/* @__PURE__ */ jsx34("td", { className: cellClass, style: borderStyle, children: "Demand\xE9 par" }),
|
|
11885
11881
|
/* @__PURE__ */ jsx34("td", { className: `${cellClass} uppercase`, style: { ...borderStyle, color: "var(--color-text)" }, children: `${requester.first_name} ${requester.last_name}`.trim() }),
|
|
11886
|
-
/* @__PURE__ */ jsx34("td", { className: `${cellClass} uppercase`, style: { ...borderStyle, color: "var(--color-text)" }, children: requester?.
|
|
11882
|
+
/* @__PURE__ */ jsx34("td", { className: `${cellClass} uppercase`, style: { ...borderStyle, color: "var(--color-text)" }, children: requester?.centers_access?.find((c) => c.id === activeBusinessEntity?.id)?.fonction ?? "" }),
|
|
11887
11883
|
/* @__PURE__ */ jsx34("td", { className: cellClass, style: borderStyle, children: formatDate2(caseData.created_at) }),
|
|
11888
11884
|
/* @__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" }) }) }),
|
|
11889
11885
|
/* @__PURE__ */ jsx34("td", { className: cellClass, style: borderStyle })
|
|
@@ -19810,14 +19806,7 @@ var PrintablePurchaseRequest = ({
|
|
|
19810
19806
|
data.vendor_info.phone && /* @__PURE__ */ jsx59("p", { className: "text-gray-600", children: data.vendor_info.phone })
|
|
19811
19807
|
] })
|
|
19812
19808
|
] }),
|
|
19813
|
-
/* @__PURE__ */
|
|
19814
|
-
ApprovalRecap_default,
|
|
19815
|
-
{
|
|
19816
|
-
process: "PCR-PR",
|
|
19817
|
-
object_id: data.id
|
|
19818
|
-
}
|
|
19819
|
-
) }),
|
|
19820
|
-
/* @__PURE__ */ jsxs52("div", { className: "grid grid-cols-2 gap-8 mt-12 pt-4", children: [
|
|
19809
|
+
/* @__PURE__ */ jsxs52("div", { className: "flex justify-between gap-8 mt-12 pt-4", children: [
|
|
19821
19810
|
/* @__PURE__ */ jsxs52("div", { children: [
|
|
19822
19811
|
/* @__PURE__ */ jsx59("p", { className: "text-xs text-gray-600 mb-1", children: "Date d'impression:" }),
|
|
19823
19812
|
/* @__PURE__ */ jsx59("div", { className: "border-b border-gray-400 w-32 mb-4 text-xs", children: currentDate }),
|