@digital-ai/dot-components 3.11.1 → 3.11.2
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/index.esm.js +14 -2
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -9925,6 +9925,18 @@ const StyledDashboardDetails = styled(DotDrawer)`
|
|
|
9925
9925
|
`}
|
|
9926
9926
|
`;
|
|
9927
9927
|
|
|
9928
|
+
const getFormattedDate = dateString => {
|
|
9929
|
+
if (!dateString) {
|
|
9930
|
+
return '';
|
|
9931
|
+
}
|
|
9932
|
+
const date = new Date(dateString);
|
|
9933
|
+
return date.toLocaleDateString('en-US', {
|
|
9934
|
+
dateStyle: 'medium'
|
|
9935
|
+
}) + ' - ' + date.toLocaleTimeString('en-US', {
|
|
9936
|
+
hour: '2-digit',
|
|
9937
|
+
minute: '2-digit'
|
|
9938
|
+
});
|
|
9939
|
+
};
|
|
9928
9940
|
const DashboardDetailsField = ({
|
|
9929
9941
|
children,
|
|
9930
9942
|
className,
|
|
@@ -10086,11 +10098,11 @@ const DotDashboardDetailsView = ({
|
|
|
10086
10098
|
}), jsx(DashboardDetailsField, {
|
|
10087
10099
|
className: "dashboard-details-created-dt",
|
|
10088
10100
|
label: "Created on",
|
|
10089
|
-
value: dashboard.created_dt
|
|
10101
|
+
value: getFormattedDate(dashboard.created_dt)
|
|
10090
10102
|
}), dashboard.updated_dt && jsx(DashboardDetailsField, {
|
|
10091
10103
|
className: "dashboard-details-updated-dt",
|
|
10092
10104
|
label: "Modified on",
|
|
10093
|
-
value: dashboard.updated_dt
|
|
10105
|
+
value: getFormattedDate(dashboard.updated_dt)
|
|
10094
10106
|
}), dashboard.updated_by_fullname && jsx(DashboardDetailsField, {
|
|
10095
10107
|
className: "dashboard-details-updated-by",
|
|
10096
10108
|
label: "Modified by",
|