@pnkx-lib/ui 1.9.557 → 1.9.558
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/es/index.js
CHANGED
|
@@ -75,6 +75,7 @@ export { Descriptions } from './ui/Descriptions.js';
|
|
|
75
75
|
export { CustomeBulkActions } from './ui/CustomeBulkActions/index.js';
|
|
76
76
|
export { Clock } from './ui/Clock/index.js';
|
|
77
77
|
export { CATEGORY_PRICE_ENUM, PriceStatus, badgeStatusPriceConfig } from './ui/PriceStatus.js';
|
|
78
|
+
export { badgeStatusclinicalConfig } from './ui/ClinicalStatus.js';
|
|
78
79
|
export { Input } from './fields/Input.js';
|
|
79
80
|
export { PnkxField } from './fields/PnkxField.js';
|
|
80
81
|
export { Select } from './fields/Select.js';
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { t as twMerge } from '../chunks/bundle-mjs-BBFHkixS.js';
|
|
4
|
+
|
|
5
|
+
const badgeStatusclinicalConfig = {
|
|
6
|
+
[0 /* WAITING */]: {
|
|
7
|
+
color: "bg-[#722ED1]",
|
|
8
|
+
text: "Chờ tiếp đón"
|
|
9
|
+
},
|
|
10
|
+
[1 /* INPROGRESS */]: {
|
|
11
|
+
color: "bg-[#007BE5]",
|
|
12
|
+
text: "Đang tiếp đón"
|
|
13
|
+
},
|
|
14
|
+
[2 /* SKIPPED */]: {
|
|
15
|
+
color: "bg-[#B2B7C2]",
|
|
16
|
+
text: "Bỏ qua"
|
|
17
|
+
},
|
|
18
|
+
[3 /* COMPLETED */]: {
|
|
19
|
+
color: "bg-[#27CD7F]",
|
|
20
|
+
text: "Đã tiếp đón"
|
|
21
|
+
},
|
|
22
|
+
[4 /* CANCELLED */]: {
|
|
23
|
+
color: "bg-[#DD4338]",
|
|
24
|
+
text: "Huỷ tiếp đón"
|
|
25
|
+
},
|
|
26
|
+
[5 /* CLOSED */]: {
|
|
27
|
+
color: "bg-[#DA9438]",
|
|
28
|
+
text: "Đóng hồ sơ"
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
const ClinicalStatus = ({ status }) => {
|
|
32
|
+
const bagde = badgeStatusclinicalConfig[Number(status)];
|
|
33
|
+
//! Function
|
|
34
|
+
const ItemStatus = ({
|
|
35
|
+
color,
|
|
36
|
+
statusName
|
|
37
|
+
}) => {
|
|
38
|
+
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
39
|
+
/* @__PURE__ */ jsx("div", { className: twMerge("w-3 h-3 rounded-sm", color || "") }),
|
|
40
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-normal", children: statusName || "" })
|
|
41
|
+
] }) });
|
|
42
|
+
};
|
|
43
|
+
//! Render
|
|
44
|
+
return /* @__PURE__ */ jsx(ItemStatus, { color: bagde?.color, statusName: bagde?.text });
|
|
45
|
+
};
|
|
46
|
+
const ClinicalStatus$1 = React__default.memo(ClinicalStatus);
|
|
47
|
+
|
|
48
|
+
export { badgeStatusclinicalConfig, ClinicalStatus$1 as default };
|
package/es/ui/index.js
CHANGED
|
@@ -76,6 +76,7 @@ export { Descriptions } from './Descriptions.js';
|
|
|
76
76
|
export { CustomeBulkActions } from './CustomeBulkActions/index.js';
|
|
77
77
|
export { Clock } from './Clock/index.js';
|
|
78
78
|
export { CATEGORY_PRICE_ENUM, PriceStatus, badgeStatusPriceConfig } from './PriceStatus.js';
|
|
79
|
+
export { badgeStatusclinicalConfig } from './ClinicalStatus.js';
|
|
79
80
|
export { I as ID_TABLE_WRAPPER, a as MAX_TAG_COUNT, M as MAX_TAG_TEXT_LENGTH, T as TINY_API } from '../chunks/common-BcURBmQ-.js';
|
|
80
81
|
export { Sidebar } from './Sidebar/index.js';
|
|
81
82
|
|
package/package.json
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
declare enum CATEGORY_CLINICAL_ENUM {
|
|
3
|
+
WAITING = 0,// CHỜ TIẾP ĐÓN
|
|
4
|
+
INPROGRESS = 1,// ĐANG TIẾP ĐÓN
|
|
5
|
+
SKIPPED = 2,// BỎ QUA
|
|
6
|
+
COMPLETED = 3,// ĐÃ TIẾP ĐÓN
|
|
7
|
+
CANCELLED = 4,// HỦY TIẾP ĐÓN
|
|
8
|
+
CLOSED = 5
|
|
9
|
+
}
|
|
10
|
+
type BadgeConfig = {
|
|
11
|
+
[key: number]: {
|
|
12
|
+
color: string;
|
|
13
|
+
text: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export declare const badgeStatusclinicalConfig: BadgeConfig;
|
|
17
|
+
export interface ClinicalStatusProps {
|
|
18
|
+
status: CATEGORY_CLINICAL_ENUM;
|
|
19
|
+
}
|
|
20
|
+
declare const _default: React.MemoExoticComponent<({ status }: ClinicalStatusProps) => import("react/jsx-runtime").JSX.Element>;
|
|
21
|
+
export default _default;
|