@trii/components 2.0.38 → 2.0.39
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/cjs/index.js +96 -60
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/layout/SubsectionHeaderWithButton/SubsectionHeaderWithButton.d.ts +1 -2
- package/dist/esm/index.js +96 -60
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/layout/SubsectionHeaderWithButton/SubsectionHeaderWithButton.d.ts +1 -2
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -9208,7 +9208,7 @@ const TitleBox = material.styled(material.Box)({
|
|
|
9208
9208
|
width: '100%',
|
|
9209
9209
|
borderBottom: `1px solid lightgray`,
|
|
9210
9210
|
});
|
|
9211
|
-
const StyledBox$
|
|
9211
|
+
const StyledBox$2 = material.styled(material.Box)({
|
|
9212
9212
|
display: 'flex',
|
|
9213
9213
|
alignItems: 'center',
|
|
9214
9214
|
justifyContent: 'space-between',
|
|
@@ -9249,7 +9249,7 @@ const NoteText$2 = material.styled(material.Typography)({
|
|
|
9249
9249
|
left: 40,
|
|
9250
9250
|
});
|
|
9251
9251
|
const ContactMethod$1 = ({ icon, contactList, title, showTitle = true, }) => {
|
|
9252
|
-
const renderContactInfo = (contact) => (jsxRuntimeExports.jsx(StyledBox$
|
|
9252
|
+
const renderContactInfo = (contact) => (jsxRuntimeExports.jsx(StyledBox$2, { children: jsxRuntimeExports.jsxs(InfoContainer, { children: [jsxRuntimeExports.jsx(IconBox, { children: icon }), jsxRuntimeExports.jsxs(AddressContainer, { children: [jsxRuntimeExports.jsx(material.Tooltip, { title: contact.address, arrow: true, placement: "top", children: jsxRuntimeExports.jsx(material.Typography, { variant: "subtitle1", fontWeight: "semi-bold", fontSize: 14, color: "text.primary", sx: {
|
|
9253
9253
|
whiteSpace: 'nowrap',
|
|
9254
9254
|
textOverflow: 'ellipsis',
|
|
9255
9255
|
overflow: 'hidden',
|
|
@@ -15399,11 +15399,21 @@ default_1$e = Label.default = (0, _createSvgIcon$d.default)( /*#__PURE__*/(0, _j
|
|
|
15399
15399
|
const noop$3 = (key) => key;
|
|
15400
15400
|
const TranslationContext = React$1.createContext(noop$3);
|
|
15401
15401
|
const TranslationProvider = ({ t, children }) => {
|
|
15402
|
+
console.log('[TranslationProvider] t fn:', t?.name || 'anonymous', t);
|
|
15402
15403
|
return jsxRuntimeExports.jsx(TranslationContext.Provider, { value: t, children: children });
|
|
15403
15404
|
};
|
|
15404
15405
|
const useTranslationContext = () => {
|
|
15405
15406
|
const t = React$1.useContext(TranslationContext);
|
|
15406
|
-
|
|
15407
|
+
if (!t) {
|
|
15408
|
+
console.warn('[useTranslationContext] using noop, context value is falsy');
|
|
15409
|
+
return noop$3;
|
|
15410
|
+
}
|
|
15411
|
+
return (...args) => {
|
|
15412
|
+
const [key, ...rest] = args;
|
|
15413
|
+
const result = t(key, ...rest);
|
|
15414
|
+
console.log('[useTranslationContext] key:', key, 'args:', rest, 'result:', result);
|
|
15415
|
+
return result;
|
|
15416
|
+
};
|
|
15407
15417
|
};
|
|
15408
15418
|
|
|
15409
15419
|
const Tags = ({ tags, onEditTags }) => {
|
|
@@ -52445,7 +52455,7 @@ default_1$8 = Cancel.default = (0, _createSvgIcon$8.default)( /*#__PURE__*/(0, _
|
|
|
52445
52455
|
|
|
52446
52456
|
const isUserInfo = (option) => 'email' in option;
|
|
52447
52457
|
const isContactBirthdayProps = (p) => p.entityType === 'contact' && p.inputType === 'birthday';
|
|
52448
|
-
const StyledIconButton$
|
|
52458
|
+
const StyledIconButton$2 = material.styled(material.IconButton)({
|
|
52449
52459
|
opacity: 0,
|
|
52450
52460
|
transition: 'opacity 0.3s ease-in-out',
|
|
52451
52461
|
'& .MuiSvgIcon-root': {
|
|
@@ -52575,7 +52585,7 @@ const EntityInfoLabel = (props) => {
|
|
|
52575
52585
|
'&:hover .edit-icon': {
|
|
52576
52586
|
opacity: 1,
|
|
52577
52587
|
},
|
|
52578
|
-
}, children: [jsxRuntimeExports.jsxs(material.Box, { display: "flex", position: "relative", minHeight: '25px', children: [jsxRuntimeExports.jsx(material.Typography, { letterSpacing: -0.5, fontWeight: '600', alignSelf: 'center', flexGrow: isEditing ? 1 : 0, color: (theme) => theme.palette.text.primary, children: title }), isNotEditable ? null : isEditing ? (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(StyledSaveCancelButton$1, { size: "small", onClick: handleSave, children: isSaving ? jsxRuntimeExports.jsx(material.CircularProgress, { size: 24 }) : jsxRuntimeExports.jsx(default_1$a, {}) }), jsxRuntimeExports.jsx(StyledSaveCancelButton$1, { size: "small", onClick: handleCancel, children: jsxRuntimeExports.jsx(default_1$8, {}) })] })) : (jsxRuntimeExports.jsx(StyledIconButton$
|
|
52588
|
+
}, children: [jsxRuntimeExports.jsxs(material.Box, { display: "flex", position: "relative", minHeight: '25px', children: [jsxRuntimeExports.jsx(material.Typography, { letterSpacing: -0.5, fontWeight: '600', alignSelf: 'center', flexGrow: isEditing ? 1 : 0, color: (theme) => theme.palette.text.primary, children: title }), isNotEditable ? null : isEditing ? (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(StyledSaveCancelButton$1, { size: "small", onClick: handleSave, children: isSaving ? jsxRuntimeExports.jsx(material.CircularProgress, { size: 24 }) : jsxRuntimeExports.jsx(default_1$a, {}) }), jsxRuntimeExports.jsx(StyledSaveCancelButton$1, { size: "small", onClick: handleCancel, children: jsxRuntimeExports.jsx(default_1$8, {}) })] })) : (jsxRuntimeExports.jsx(StyledIconButton$2, { className: "edit-icon", size: "small", onClick: handleEditClick, children: jsxRuntimeExports.jsx(default_1$f, {}) }))] }), jsxRuntimeExports.jsx(material.Box, { width: isEditing ? '100%' : '50%', position: "relative", children: isEditing && inputType === 'text' ? (jsxRuntimeExports.jsx(material.TextField, { value: textValue, onChange: handleInputChange, variant: "standard", size: "small", sx: { width: '100%' } })) : isEditing && (inputType === 'select' || inputType === 'selectMembers') ? (jsxRuntimeExports.jsxs(material.Select, { value: selectValue, onChange: handleSelectChange, variant: "standard", size: "small", sx: { width: '100%' }, children: [props.entityType === 'contact' ? (jsxRuntimeExports.jsx(material.MenuItem, { value: "", children: t('contactDetails.contactInfo.emptySelection') })) : null, options.map((option, index) => (jsxRuntimeExports.jsx(material.MenuItem, { value: option.id, children: props.entityType === 'contact'
|
|
52579
52589
|
? option.name?.trim() || (isUserInfo(option) ? option.email : '') || 'Sin nombre'
|
|
52580
52590
|
: option.name?.trim() || option.email || 'Sin nombre' }, index)))] })) : isEditing && isContactBirthdayProps(props) ? (jsxRuntimeExports.jsx(DateSelect, { birthDate: props.contact.field.birthDate, setBirthDate: props.contact.action.setBirthDate, dateFormat: props.dateFormat })) : !isEditing && props.entityType === 'contact' && inputType === 'selectBusiness' && props.businessId ? (jsxRuntimeExports.jsx(material.Box, { display: "flex", alignItems: "center", children: "Popover" })) : (jsxRuntimeExports.jsx(material.Typography, { fontWeight: '400', sx: { padding: '2.5px 14px 8.5px 0px' }, color: (theme) => theme.palette.text.primary, children: displayValue || (typeof value === 'string' && value) || '-' })) })] }));
|
|
52581
52591
|
};
|
|
@@ -54383,7 +54393,7 @@ const CustomPropertyDateRangePicker = ({ value, handleChange, userDateFormat })
|
|
|
54383
54393
|
}, value: value || initDates, onChange: (newValue) => handleChange(newValue), format: dateFormat }) }) }));
|
|
54384
54394
|
};
|
|
54385
54395
|
|
|
54386
|
-
const StyledIconButton$
|
|
54396
|
+
const StyledIconButton$1 = material.styled(material.IconButton)(() => ({
|
|
54387
54397
|
opacity: 0,
|
|
54388
54398
|
transition: 'opacity 0.3s ease-in-out',
|
|
54389
54399
|
'& .MuiSvgIcon-root': {
|
|
@@ -54585,7 +54595,7 @@ const EntityCustomFieldLabel = ({ property, entity, entityType, entityId, custom
|
|
|
54585
54595
|
else
|
|
54586
54596
|
return (jsxRuntimeExports.jsx(CustomPropertyInput, { type: type, nameKey: nameKey, value: value, onChange: handleInputChange }));
|
|
54587
54597
|
};
|
|
54588
|
-
return (jsxRuntimeExports.jsxs(ContactBox, { className: `fadein ${property.type === Contacts.ContactField_type.LONGTEXT ? 'contacts-col-12' : 'contacts-col-5'}`, children: [jsxRuntimeExports.jsxs(material.Box, { display: "flex", position: "relative", minHeight: "25px", children: [jsxRuntimeExports.jsx(FieldName, { flexGrow: isEditing ? 1 : 0, children: getPropertyName(property.nameKey) }), isEditing ? (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(StyledSaveCancelButton, { size: "small", onClick: handleSave, children: isSaving ? jsxRuntimeExports.jsx(material.CircularProgress, { size: 24 }) : jsxRuntimeExports.jsx(default_1$a, {}) }), jsxRuntimeExports.jsx(StyledSaveCancelButton, { size: "small", onClick: handleCancel, children: jsxRuntimeExports.jsx(default_1$8, {}) })] })) : (jsxRuntimeExports.jsx(StyledIconButton$
|
|
54598
|
+
return (jsxRuntimeExports.jsxs(ContactBox, { className: `fadein ${property.type === Contacts.ContactField_type.LONGTEXT ? 'contacts-col-12' : 'contacts-col-5'}`, children: [jsxRuntimeExports.jsxs(material.Box, { display: "flex", position: "relative", minHeight: "25px", children: [jsxRuntimeExports.jsx(FieldName, { flexGrow: isEditing ? 1 : 0, children: getPropertyName(property.nameKey) }), isEditing ? (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(StyledSaveCancelButton, { size: "small", onClick: handleSave, children: isSaving ? jsxRuntimeExports.jsx(material.CircularProgress, { size: 24 }) : jsxRuntimeExports.jsx(default_1$a, {}) }), jsxRuntimeExports.jsx(StyledSaveCancelButton, { size: "small", onClick: handleCancel, children: jsxRuntimeExports.jsx(default_1$8, {}) })] })) : (jsxRuntimeExports.jsx(StyledIconButton$1, { className: "edit-icon", size: "small", onClick: toggleEdit, children: jsxRuntimeExports.jsx(default_1$f, {}) }))] }), jsxRuntimeExports.jsx(material.Box, { width: isEditing || property.type === Contacts.ContactField_type.LONGTEXT ? '100%' : '50%', position: "relative", children: isEditing ? (EditField()) : (jsxRuntimeExports.jsx(FieldValue, { children: hasValue(property?.value)
|
|
54589
54599
|
? property.type === Contacts.ContactField_type.DATERANGE
|
|
54590
54600
|
? (() => {
|
|
54591
54601
|
if (typeof property.value === 'string') {
|
|
@@ -54818,7 +54828,7 @@ const useEditModal = () => {
|
|
|
54818
54828
|
return { isOpen, title, openModal, closeModal };
|
|
54819
54829
|
};
|
|
54820
54830
|
|
|
54821
|
-
const StyledBox$
|
|
54831
|
+
const StyledBox$1 = styled$1(material.Box)(({ theme }) => ({
|
|
54822
54832
|
display: 'flex',
|
|
54823
54833
|
alignItems: 'flex-start',
|
|
54824
54834
|
justifyContent: 'space-between',
|
|
@@ -54885,7 +54895,7 @@ const ContactMethodItem = ({ item }) => {
|
|
|
54885
54895
|
const { imageUrl } = useImage({
|
|
54886
54896
|
initialImageUrl: avatarUrlWithoutAccess,
|
|
54887
54897
|
});
|
|
54888
|
-
return (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: jsxRuntimeExports.jsxs(StyledBox$
|
|
54898
|
+
return (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: jsxRuntimeExports.jsxs(StyledBox$1, { children: [jsxRuntimeExports.jsx(LeftSection$1, { children: jsxRuntimeExports.jsxs(ContactDetails$1, { children: [jsxRuntimeExports.jsx(material.Tooltip, { title: item.address || '', arrow: true, children: jsxRuntimeExports.jsx(PhoneText$1, { children: item.address }) }), jsxRuntimeExports.jsx(material.Tooltip, { title: item.profileName || '', arrow: true, children: jsxRuntimeExports.jsx(ProfileNameText, { sx: {
|
|
54889
54899
|
marginTop: '-10px',
|
|
54890
54900
|
marginLeft: '5px',
|
|
54891
54901
|
fontSize: '10px',
|
|
@@ -56145,7 +56155,7 @@ const formatPhoneForDisplay = (number) => {
|
|
|
56145
56155
|
}
|
|
56146
56156
|
};
|
|
56147
56157
|
|
|
56148
|
-
const StyledIconButton
|
|
56158
|
+
const StyledIconButton = styled$1(material.IconButton)(({ theme }) => ({
|
|
56149
56159
|
padding: theme.spacing(0.5),
|
|
56150
56160
|
marginTop: '-5px',
|
|
56151
56161
|
}));
|
|
@@ -56154,7 +56164,7 @@ const StyledLocalPhoneIcon = styled$1(default_1$7)(({ theme }) => ({
|
|
|
56154
56164
|
width: 16,
|
|
56155
56165
|
color: theme.palette.secondary.main
|
|
56156
56166
|
}));
|
|
56157
|
-
const StyledBox
|
|
56167
|
+
const StyledBox = styled$1(material.Box)(({ theme }) => ({
|
|
56158
56168
|
display: 'flex',
|
|
56159
56169
|
alignItems: 'flex-start',
|
|
56160
56170
|
justifyContent: 'space-between',
|
|
@@ -56217,7 +56227,7 @@ const ContactMethodPhoneItem = ({ item }) => {
|
|
|
56217
56227
|
window.dispatchEvent(event);
|
|
56218
56228
|
};
|
|
56219
56229
|
const formattedPhone = React$1.useMemo(() => formatPhoneForDisplay(item.address || ''), [item.address]);
|
|
56220
|
-
return (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: jsxRuntimeExports.jsxs(StyledBox
|
|
56230
|
+
return (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: jsxRuntimeExports.jsxs(StyledBox, { children: [jsxRuntimeExports.jsxs(LeftSection, { children: [jsxRuntimeExports.jsx(StyledIconButton, { onClick: handleCallContact, color: "primary", size: "small", children: jsxRuntimeExports.jsx(StyledLocalPhoneIcon, {}) }), jsxRuntimeExports.jsxs(ContactDetails, { children: [jsxRuntimeExports.jsx(material.Tooltip, { title: formattedPhone || '', arrow: true, children: jsxRuntimeExports.jsx(PhoneText, { children: formattedPhone }) }), jsxRuntimeExports.jsx(material.Tooltip, { title: item.note || '', arrow: true, children: jsxRuntimeExports.jsx(NoteText, { children: item.note }) })] })] }), jsxRuntimeExports.jsx(RightSection, { children: jsxRuntimeExports.jsx(material.Box, { sx: {
|
|
56221
56231
|
display: 'flex',
|
|
56222
56232
|
alignItems: 'center',
|
|
56223
56233
|
justifyContent: 'flex-end',
|
|
@@ -56228,47 +56238,13 @@ const ContactMethodPhoneItem = ({ item }) => {
|
|
|
56228
56238
|
} })) }) }) })] }) }));
|
|
56229
56239
|
};
|
|
56230
56240
|
|
|
56231
|
-
const StyledBox = styled$1(material.Box)(({ theme }) => ({
|
|
56232
|
-
display: 'flex',
|
|
56233
|
-
flexDirection: 'column',
|
|
56234
|
-
padding: theme.spacing(1, 0, 2, 0),
|
|
56235
|
-
width: '100%',
|
|
56236
|
-
gap: theme.spacing(1),
|
|
56237
|
-
'&:hover .edit-icon': {
|
|
56238
|
-
opacity: 1,
|
|
56239
|
-
},
|
|
56240
|
-
}));
|
|
56241
|
-
const StyledTypography = styled$1(material.Typography)(({}) => ({
|
|
56242
|
-
letterSpacing: -0.5,
|
|
56243
|
-
fontSize: 14,
|
|
56244
|
-
fontWeight: 600,
|
|
56245
|
-
}));
|
|
56246
|
-
const HeaderBox = styled$1(material.Box)(({}) => ({
|
|
56247
|
-
display: 'flex',
|
|
56248
|
-
alignItems: 'center',
|
|
56249
|
-
}));
|
|
56250
|
-
const MethodItemsBox = styled$1(material.Box)(({ theme }) => ({
|
|
56251
|
-
display: 'flex',
|
|
56252
|
-
flexDirection: 'column',
|
|
56253
|
-
gap: theme.spacing(1),
|
|
56254
|
-
width: '100%',
|
|
56255
|
-
}));
|
|
56256
|
-
const StyledIconButton = styled$1(material.IconButton)({
|
|
56257
|
-
opacity: 0,
|
|
56258
|
-
transition: 'opacity 0.3s ease-in-out',
|
|
56259
|
-
'& .MuiSvgIcon-root': {
|
|
56260
|
-
width: '0.8em',
|
|
56261
|
-
height: '0.8em',
|
|
56262
|
-
},
|
|
56263
|
-
marginLeft: '15px',
|
|
56264
|
-
});
|
|
56265
56241
|
const ContactMethod = ({ title, methodItems, isPhone, handleEdit, owner }) => {
|
|
56266
|
-
return (jsxRuntimeExports.
|
|
56267
|
-
|
|
56268
|
-
|
|
56269
|
-
|
|
56270
|
-
|
|
56271
|
-
|
|
56242
|
+
return (jsxRuntimeExports.jsxs("div", { className: "w-full rounded-xl border border-gray-200 bg-white/60 p-3 shadow-sm transition hover:-translate-y-0.5 hover:shadow-md", children: [jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between gap-2", children: [jsxRuntimeExports.jsx("p", { className: "text-sm font-semibold text-gray-800", children: title }), jsxRuntimeExports.jsx(material.IconButton, { "aria-label": `Edit ${title}`, size: "small", onClick: handleEdit, className: "edit-icon text-gray-500 transition hover:text-gray-800", children: jsxRuntimeExports.jsx(default_1$f, { fontSize: "small" }) })] }), jsxRuntimeExports.jsx("div", { className: "mt-3 space-y-2", children: methodItems.map((item, index) => {
|
|
56243
|
+
if (isPhone) {
|
|
56244
|
+
return jsxRuntimeExports.jsx(ContactMethodPhoneItem, { item: item }, index);
|
|
56245
|
+
}
|
|
56246
|
+
return jsxRuntimeExports.jsx(ContactMethodItem, { item: item, owner: owner }, index);
|
|
56247
|
+
}) })] }));
|
|
56272
56248
|
};
|
|
56273
56249
|
|
|
56274
56250
|
const SubsectionHeader = ({ title }) => {
|
|
@@ -56296,10 +56272,10 @@ default_1$6 = Add.default = (0, _createSvgIcon$6.default)( /*#__PURE__*/(0, _jsx
|
|
|
56296
56272
|
d: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"
|
|
56297
56273
|
}), 'Add');
|
|
56298
56274
|
|
|
56299
|
-
const SubsectionHeaderWithButton = ({ title, handleAdd
|
|
56300
|
-
const
|
|
56301
|
-
|
|
56302
|
-
return (jsxRuntimeExports.jsxs(material.Box, { sx: subsectionHeaderWithButtonStyle.container, children: [jsxRuntimeExports.jsx(material.Typography, { variant: "subtitle2", children: title }), jsxRuntimeExports.jsx(material.Button, { onClick: handleAdd, size: "small", startIcon: jsxRuntimeExports.jsx(default_1$6, {}), variant: "text", color: "primary", children:
|
|
56275
|
+
const SubsectionHeaderWithButton = ({ title, handleAdd }) => {
|
|
56276
|
+
const t = useTranslationContext();
|
|
56277
|
+
console.log('[SubsectionHeaderWithButton] title:', title, 't fn:', t?.name || 'anonymous');
|
|
56278
|
+
return (jsxRuntimeExports.jsxs(material.Box, { sx: subsectionHeaderWithButtonStyle.container, children: [jsxRuntimeExports.jsx(material.Typography, { variant: "subtitle2", children: title }), jsxRuntimeExports.jsx(material.Button, { onClick: handleAdd, size: "small", startIcon: jsxRuntimeExports.jsx(default_1$6, {}), variant: "text", color: "primary", children: t('global.add') })] }));
|
|
56303
56279
|
};
|
|
56304
56280
|
|
|
56305
56281
|
const informationItemContainerStyle = {
|
|
@@ -56980,7 +56956,68 @@ const ContactInformation = ({ ownerData }) => {
|
|
|
56980
56956
|
const webchat = editEntity.field.imsWebchats;
|
|
56981
56957
|
const instagram = editEntity.field.imsInstagrams;
|
|
56982
56958
|
const rcs = editEntity.field.imsRCS;
|
|
56983
|
-
|
|
56959
|
+
const contactMethods = [
|
|
56960
|
+
{
|
|
56961
|
+
key: 'phones',
|
|
56962
|
+
title: t('contactDetails.phones'),
|
|
56963
|
+
items: phones,
|
|
56964
|
+
isPhone: true,
|
|
56965
|
+
modalTitle: 'Phones',
|
|
56966
|
+
visible: true,
|
|
56967
|
+
},
|
|
56968
|
+
{
|
|
56969
|
+
key: 'emails',
|
|
56970
|
+
title: 'Emails',
|
|
56971
|
+
items: emails,
|
|
56972
|
+
modalTitle: 'Emails',
|
|
56973
|
+
visible: true,
|
|
56974
|
+
},
|
|
56975
|
+
{
|
|
56976
|
+
key: 'facebook',
|
|
56977
|
+
title: 'Facebook',
|
|
56978
|
+
items: facebook,
|
|
56979
|
+
modalTitle: 'Facebook',
|
|
56980
|
+
visible: true,
|
|
56981
|
+
},
|
|
56982
|
+
{
|
|
56983
|
+
key: 'whatsapp',
|
|
56984
|
+
title: 'Whatsapp',
|
|
56985
|
+
items: whatsapp,
|
|
56986
|
+
modalTitle: 'Whatsapp',
|
|
56987
|
+
visible: true,
|
|
56988
|
+
},
|
|
56989
|
+
{
|
|
56990
|
+
key: 'rcs',
|
|
56991
|
+
title: 'RCS',
|
|
56992
|
+
items: rcs,
|
|
56993
|
+
modalTitle: 'RCS',
|
|
56994
|
+
visible: rcs.length > 0,
|
|
56995
|
+
},
|
|
56996
|
+
{
|
|
56997
|
+
key: 'mercado-libre',
|
|
56998
|
+
title: 'Mercado libre',
|
|
56999
|
+
items: mercadolibre,
|
|
57000
|
+
modalTitle: 'Mercado libre',
|
|
57001
|
+
visible: true,
|
|
57002
|
+
},
|
|
57003
|
+
{
|
|
57004
|
+
key: 'webchat',
|
|
57005
|
+
title: 'Webchat',
|
|
57006
|
+
items: webchat,
|
|
57007
|
+
modalTitle: 'Webchat',
|
|
57008
|
+
visible: true,
|
|
57009
|
+
},
|
|
57010
|
+
{
|
|
57011
|
+
key: 'instagram',
|
|
57012
|
+
title: 'Instagram',
|
|
57013
|
+
items: instagram,
|
|
57014
|
+
modalTitle: 'Instagram',
|
|
57015
|
+
visible: true,
|
|
57016
|
+
},
|
|
57017
|
+
];
|
|
57018
|
+
return (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(Section, { title: t('contactDetails.contactInformation'), children: jsxRuntimeExports.jsx(SectionContent, { children: jsxRuntimeExports.jsx("div", { className: "grid grid-cols-1 gap-3", children: contactMethods
|
|
57019
|
+
.filter((method) => method.visible)
|
|
57020
|
+
.map((method) => (jsxRuntimeExports.jsx(ContactMethod, { handleEdit: () => openModal(method.modalTitle), title: method.title, methodItems: method.items, isPhone: method.isPhone, owner: ownerData }, method.key))) }) }) }), jsxRuntimeExports.jsx(EditModal, { open: isOpen, onClose: closeModal, title: title })] }));
|
|
56984
57021
|
};
|
|
56985
57022
|
|
|
56986
57023
|
const AddressInformation = ({ entityType, entityData, baseUrl, spaceId, onEntityUpdated, }) => {
|
|
@@ -56991,9 +57028,7 @@ const AddressInformation = ({ entityType, entityData, baseUrl, spaceId, onEntity
|
|
|
56991
57028
|
onEntityUpdated,
|
|
56992
57029
|
};
|
|
56993
57030
|
const t = useTranslationContext();
|
|
56994
|
-
|
|
56995
|
-
const sectionTitle = maybeTitle === 'contactDetails.addressInformation' ? 'Address Information' : maybeTitle;
|
|
56996
|
-
return (jsxRuntimeExports.jsx(Section, { title: sectionTitle, children: jsxRuntimeExports.jsx(SectionContent, { children: entityType === 'contact' ? (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(EntityInfoLabel, { entityType: "contact", title: t('contactDetails.street'), value: entityData.address1?.street ?? '', ...commonProps, constructUpdateObject: (value) => ({
|
|
57031
|
+
return (jsxRuntimeExports.jsx(Section, { title: t('contactDetails.addressInformation'), children: jsxRuntimeExports.jsx(SectionContent, { children: entityType === 'contact' ? (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(EntityInfoLabel, { entityType: "contact", title: t('contactDetails.street'), value: entityData.address1?.street ?? '', ...commonProps, constructUpdateObject: (value) => ({
|
|
56997
57032
|
address1: { street: value },
|
|
56998
57033
|
}) }), jsxRuntimeExports.jsx(EntityInfoLabel, { entityType: "contact", title: t('contactDetails.anotherStreet'), value: entityData.address2?.street ?? '', ...commonProps, constructUpdateObject: (value) => ({
|
|
56999
57034
|
address2: { street: value },
|
|
@@ -57147,6 +57182,7 @@ const EditContactModal = ({ open, onClose, baseUrl, spaceId, contactId, sx, t })
|
|
|
57147
57182
|
return null;
|
|
57148
57183
|
return createEditContactApi(baseUrl, spaceId);
|
|
57149
57184
|
}, [baseUrl, spaceId]);
|
|
57185
|
+
console.log('[EditContactModal] t fn:', t?.name || 'anonymous', t);
|
|
57150
57186
|
const { state, selectors, actions } = useEditContactModalController({
|
|
57151
57187
|
open,
|
|
57152
57188
|
baseUrl,
|