@ttn-shared/ui 0.1.0 → 1.0.0
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 +15 -8
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +15 -8
- package/package.json +9 -1
package/dist/index.cjs
CHANGED
|
@@ -954,7 +954,7 @@ var PatientAssistanceRisks = ({
|
|
|
954
954
|
eaccount: userAccountId ?? 0,
|
|
955
955
|
idPatient: patientId ?? 0,
|
|
956
956
|
riskList: {
|
|
957
|
-
assistance: selectedRisks
|
|
957
|
+
assistance: selectedRisks.map((risk) => ({ id: risk.clinicalDiseaseId }))
|
|
958
958
|
}
|
|
959
959
|
});
|
|
960
960
|
onClose();
|
|
@@ -969,8 +969,7 @@ var PatientAssistanceRisks = ({
|
|
|
969
969
|
}
|
|
970
970
|
const formattedRisks = (patientInfo.risk.assistance ?? []).map((risk) => ({
|
|
971
971
|
clinicalDiseaseId: risk.id,
|
|
972
|
-
clinicalDiseaseName: risk.name
|
|
973
|
-
clinicalDiseaseTag: ""
|
|
972
|
+
clinicalDiseaseName: risk.name
|
|
974
973
|
}));
|
|
975
974
|
setSelectedRisks(formattedRisks);
|
|
976
975
|
}, [patientInfo, isOpen]);
|
|
@@ -1198,7 +1197,7 @@ var PatientAppointmentHistory = ({ patientId }) => {
|
|
|
1198
1197
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
1199
1198
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_core6.Box, { children: [
|
|
1200
1199
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_core6.Title, { order: 6, c: "brand-color", mb: "xs", children: "Historial de citas" }),
|
|
1201
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_core6.Table, { children: [
|
|
1200
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_core6.Table.ScrollContainer, { minWidth: 300, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_core6.Table, { children: [
|
|
1202
1201
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_core6.Table.Thead, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_core6.Table.Tr, { children: [
|
|
1203
1202
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_core6.Table.Th, { ta: "center", children: "Fecha" }),
|
|
1204
1203
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_core6.Table.Th, { ta: "start", children: " Servicio" }),
|
|
@@ -1234,7 +1233,7 @@ var PatientAppointmentHistory = ({ patientId }) => {
|
|
|
1234
1233
|
] }, appointment.id)),
|
|
1235
1234
|
!appointments?.length && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_core6.Table.Tr, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_core6.Table.Td, { ta: "center", colSpan: 4, children: "No hay informaci\xF3n para mostrar." }) })
|
|
1236
1235
|
] })
|
|
1237
|
-
] }),
|
|
1236
|
+
] }) }),
|
|
1238
1237
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1239
1238
|
AppPagination,
|
|
1240
1239
|
{
|
|
@@ -1782,6 +1781,7 @@ var PatientForm = ({
|
|
|
1782
1781
|
import_core8.ActionIcon,
|
|
1783
1782
|
{
|
|
1784
1783
|
variant: "subtle",
|
|
1784
|
+
c: "brand-color",
|
|
1785
1785
|
onClick: () => setMode("edit"),
|
|
1786
1786
|
"data-testid": "patient-form-edit-button",
|
|
1787
1787
|
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_icons_react6.IconPencil, { style: { width: 24, height: 24 } })
|
|
@@ -1791,6 +1791,7 @@ var PatientForm = ({
|
|
|
1791
1791
|
import_core8.ActionIcon,
|
|
1792
1792
|
{
|
|
1793
1793
|
variant: "subtle",
|
|
1794
|
+
c: "brand-color",
|
|
1794
1795
|
onClick: () => setOpenPatientNotes(true),
|
|
1795
1796
|
"data-testid": "patient-form-notes-button",
|
|
1796
1797
|
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_icons_react6.IconMessage, { style: { width: 24, height: 24 } })
|
|
@@ -1800,6 +1801,7 @@ var PatientForm = ({
|
|
|
1800
1801
|
import_core8.ActionIcon,
|
|
1801
1802
|
{
|
|
1802
1803
|
variant: "subtle",
|
|
1804
|
+
c: "#83c036",
|
|
1803
1805
|
color: "#83c036",
|
|
1804
1806
|
onClick: () => setOpenPatientAssistanceRisks(true),
|
|
1805
1807
|
"data-testid": "patient-form-assistance-risks-button",
|
|
@@ -1810,6 +1812,7 @@ var PatientForm = ({
|
|
|
1810
1812
|
import_core8.ActionIcon,
|
|
1811
1813
|
{
|
|
1812
1814
|
variant: "subtle",
|
|
1815
|
+
c: "#f39682",
|
|
1813
1816
|
color: "#f39682",
|
|
1814
1817
|
onClick: () => setOpenPatientAdministrativeRisks(true),
|
|
1815
1818
|
"data-testid": "patient-form-administrative-risks-button",
|
|
@@ -1956,7 +1959,7 @@ var PatientForm = ({
|
|
|
1956
1959
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Grid.Col, { span: 12, mt: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1957
1960
|
import_core8.Checkbox,
|
|
1958
1961
|
{
|
|
1959
|
-
|
|
1962
|
+
disabled: mode === "view",
|
|
1960
1963
|
label: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_core8.Text, { fz: "sm", children: [
|
|
1961
1964
|
"Autorizo el tratamiento de mis datos personales conforme a la",
|
|
1962
1965
|
" ",
|
|
@@ -1967,7 +1970,10 @@ var PatientForm = ({
|
|
|
1967
1970
|
c: "brand-color",
|
|
1968
1971
|
td: "underline",
|
|
1969
1972
|
style: { cursor: "pointer" },
|
|
1970
|
-
onClick: () =>
|
|
1973
|
+
onClick: (event) => {
|
|
1974
|
+
event.preventDefault();
|
|
1975
|
+
setOpenPatientFormPolicy(true);
|
|
1976
|
+
},
|
|
1971
1977
|
"data-testid": "patient-form-data-policy-link",
|
|
1972
1978
|
children: "pol\xEDtica de tratamiento de datos."
|
|
1973
1979
|
}
|
|
@@ -2267,7 +2273,8 @@ var createPatientPayload = (values) => {
|
|
|
2267
2273
|
stratumId: Number(values.stratumId),
|
|
2268
2274
|
ethnicGroupId: Number(values.ethnicGroupId),
|
|
2269
2275
|
educationLevelId: Number(values.educationLevelId),
|
|
2270
|
-
contracts: [mandatoryInsurance, ...voluntaryInsurance]
|
|
2276
|
+
contracts: [mandatoryInsurance, ...voluntaryInsurance],
|
|
2277
|
+
processing_of_personal_data: values.isDataPolicyAccepted
|
|
2271
2278
|
};
|
|
2272
2279
|
};
|
|
2273
2280
|
var createPatientForm = (info) => {
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -965,7 +965,7 @@ var PatientAssistanceRisks = ({
|
|
|
965
965
|
eaccount: userAccountId ?? 0,
|
|
966
966
|
idPatient: patientId ?? 0,
|
|
967
967
|
riskList: {
|
|
968
|
-
assistance: selectedRisks
|
|
968
|
+
assistance: selectedRisks.map((risk) => ({ id: risk.clinicalDiseaseId }))
|
|
969
969
|
}
|
|
970
970
|
});
|
|
971
971
|
onClose();
|
|
@@ -980,8 +980,7 @@ var PatientAssistanceRisks = ({
|
|
|
980
980
|
}
|
|
981
981
|
const formattedRisks = (patientInfo.risk.assistance ?? []).map((risk) => ({
|
|
982
982
|
clinicalDiseaseId: risk.id,
|
|
983
|
-
clinicalDiseaseName: risk.name
|
|
984
|
-
clinicalDiseaseTag: ""
|
|
983
|
+
clinicalDiseaseName: risk.name
|
|
985
984
|
}));
|
|
986
985
|
setSelectedRisks(formattedRisks);
|
|
987
986
|
}, [patientInfo, isOpen]);
|
|
@@ -1220,7 +1219,7 @@ var PatientAppointmentHistory = ({ patientId }) => {
|
|
|
1220
1219
|
return /* @__PURE__ */ jsxs6(Fragment, { children: [
|
|
1221
1220
|
/* @__PURE__ */ jsxs6(Box2, { children: [
|
|
1222
1221
|
/* @__PURE__ */ jsx7(Title3, { order: 6, c: "brand-color", mb: "xs", children: "Historial de citas" }),
|
|
1223
|
-
/* @__PURE__ */ jsxs6(Table, { children: [
|
|
1222
|
+
/* @__PURE__ */ jsx7(Table.ScrollContainer, { minWidth: 300, children: /* @__PURE__ */ jsxs6(Table, { children: [
|
|
1224
1223
|
/* @__PURE__ */ jsx7(Table.Thead, { children: /* @__PURE__ */ jsxs6(Table.Tr, { children: [
|
|
1225
1224
|
/* @__PURE__ */ jsx7(Table.Th, { ta: "center", children: "Fecha" }),
|
|
1226
1225
|
/* @__PURE__ */ jsx7(Table.Th, { ta: "start", children: " Servicio" }),
|
|
@@ -1256,7 +1255,7 @@ var PatientAppointmentHistory = ({ patientId }) => {
|
|
|
1256
1255
|
] }, appointment.id)),
|
|
1257
1256
|
!appointments?.length && /* @__PURE__ */ jsx7(Table.Tr, { children: /* @__PURE__ */ jsx7(Table.Td, { ta: "center", colSpan: 4, children: "No hay informaci\xF3n para mostrar." }) })
|
|
1258
1257
|
] })
|
|
1259
|
-
] }),
|
|
1258
|
+
] }) }),
|
|
1260
1259
|
/* @__PURE__ */ jsx7(
|
|
1261
1260
|
AppPagination,
|
|
1262
1261
|
{
|
|
@@ -1804,6 +1803,7 @@ var PatientForm = ({
|
|
|
1804
1803
|
ActionIcon6,
|
|
1805
1804
|
{
|
|
1806
1805
|
variant: "subtle",
|
|
1806
|
+
c: "brand-color",
|
|
1807
1807
|
onClick: () => setMode("edit"),
|
|
1808
1808
|
"data-testid": "patient-form-edit-button",
|
|
1809
1809
|
children: /* @__PURE__ */ jsx9(IconPencil, { style: { width: 24, height: 24 } })
|
|
@@ -1813,6 +1813,7 @@ var PatientForm = ({
|
|
|
1813
1813
|
ActionIcon6,
|
|
1814
1814
|
{
|
|
1815
1815
|
variant: "subtle",
|
|
1816
|
+
c: "brand-color",
|
|
1816
1817
|
onClick: () => setOpenPatientNotes(true),
|
|
1817
1818
|
"data-testid": "patient-form-notes-button",
|
|
1818
1819
|
children: /* @__PURE__ */ jsx9(IconMessage, { style: { width: 24, height: 24 } })
|
|
@@ -1822,6 +1823,7 @@ var PatientForm = ({
|
|
|
1822
1823
|
ActionIcon6,
|
|
1823
1824
|
{
|
|
1824
1825
|
variant: "subtle",
|
|
1826
|
+
c: "#83c036",
|
|
1825
1827
|
color: "#83c036",
|
|
1826
1828
|
onClick: () => setOpenPatientAssistanceRisks(true),
|
|
1827
1829
|
"data-testid": "patient-form-assistance-risks-button",
|
|
@@ -1832,6 +1834,7 @@ var PatientForm = ({
|
|
|
1832
1834
|
ActionIcon6,
|
|
1833
1835
|
{
|
|
1834
1836
|
variant: "subtle",
|
|
1837
|
+
c: "#f39682",
|
|
1835
1838
|
color: "#f39682",
|
|
1836
1839
|
onClick: () => setOpenPatientAdministrativeRisks(true),
|
|
1837
1840
|
"data-testid": "patient-form-administrative-risks-button",
|
|
@@ -1978,7 +1981,7 @@ var PatientForm = ({
|
|
|
1978
1981
|
/* @__PURE__ */ jsx9(Grid3.Col, { span: 12, mt: "sm", children: /* @__PURE__ */ jsx9(
|
|
1979
1982
|
Checkbox,
|
|
1980
1983
|
{
|
|
1981
|
-
|
|
1984
|
+
disabled: mode === "view",
|
|
1982
1985
|
label: /* @__PURE__ */ jsxs8(Text6, { fz: "sm", children: [
|
|
1983
1986
|
"Autorizo el tratamiento de mis datos personales conforme a la",
|
|
1984
1987
|
" ",
|
|
@@ -1989,7 +1992,10 @@ var PatientForm = ({
|
|
|
1989
1992
|
c: "brand-color",
|
|
1990
1993
|
td: "underline",
|
|
1991
1994
|
style: { cursor: "pointer" },
|
|
1992
|
-
onClick: () =>
|
|
1995
|
+
onClick: (event) => {
|
|
1996
|
+
event.preventDefault();
|
|
1997
|
+
setOpenPatientFormPolicy(true);
|
|
1998
|
+
},
|
|
1993
1999
|
"data-testid": "patient-form-data-policy-link",
|
|
1994
2000
|
children: "pol\xEDtica de tratamiento de datos."
|
|
1995
2001
|
}
|
|
@@ -2289,7 +2295,8 @@ var createPatientPayload = (values) => {
|
|
|
2289
2295
|
stratumId: Number(values.stratumId),
|
|
2290
2296
|
ethnicGroupId: Number(values.ethnicGroupId),
|
|
2291
2297
|
educationLevelId: Number(values.educationLevelId),
|
|
2292
|
-
contracts: [mandatoryInsurance, ...voluntaryInsurance]
|
|
2298
|
+
contracts: [mandatoryInsurance, ...voluntaryInsurance],
|
|
2299
|
+
processing_of_personal_data: values.isDataPolicyAccepted
|
|
2293
2300
|
};
|
|
2294
2301
|
};
|
|
2295
2302
|
var createPatientForm = (info) => {
|
package/package.json
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttn-shared/ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist"
|
|
8
8
|
],
|
|
9
|
+
"keywords": [
|
|
10
|
+
"ttn",
|
|
11
|
+
"ui",
|
|
12
|
+
"components",
|
|
13
|
+
"react",
|
|
14
|
+
"shared"
|
|
15
|
+
],
|
|
16
|
+
"description": "Componentes UI compartidos para apps de Tecnologia Transformando Negocios",
|
|
9
17
|
"main": "./dist/index.cjs",
|
|
10
18
|
"module": "./dist/index.js",
|
|
11
19
|
"types": "./dist/index.d.ts",
|