@digital-ai/dot-components 4.1.0 → 4.1.1
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 +15 -19
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -9543,7 +9543,7 @@ function DotDashboardStatusPill({
|
|
|
9543
9543
|
label: "Edit in progress",
|
|
9544
9544
|
size: "small",
|
|
9545
9545
|
variant: "outlined",
|
|
9546
|
-
status: "
|
|
9546
|
+
status: "warning"
|
|
9547
9547
|
})
|
|
9548
9548
|
});
|
|
9549
9549
|
} else {
|
|
@@ -12294,24 +12294,20 @@ function DotDashboardBanner({
|
|
|
12294
12294
|
});
|
|
12295
12295
|
}
|
|
12296
12296
|
function getDashboardBanner(dashboard, isEdit, onExitEditMode, onPublishChanges, currentUser, modifiedAuthorUser) {
|
|
12297
|
-
if (
|
|
12298
|
-
if (dashboard.
|
|
12299
|
-
|
|
12300
|
-
|
|
12301
|
-
|
|
12302
|
-
|
|
12303
|
-
|
|
12304
|
-
|
|
12305
|
-
|
|
12306
|
-
|
|
12307
|
-
|
|
12308
|
-
|
|
12309
|
-
|
|
12310
|
-
|
|
12311
|
-
}
|
|
12312
|
-
}
|
|
12313
|
-
} else {
|
|
12314
|
-
if (currentUser && dashboard.is_being_modified && dashboard.modified_author_id !== currentUser.id && modifiedAuthorUser) {
|
|
12297
|
+
if (dashboard.is_being_modified && currentUser) {
|
|
12298
|
+
if (dashboard.modified_author_id === currentUser.id) {
|
|
12299
|
+
// We're in Edit mode for a published dashboard, and the dashboard is being modified by the current user.
|
|
12300
|
+
return jsx(DotDashboardBanner, {
|
|
12301
|
+
bannerSeverity: "warning",
|
|
12302
|
+
bannerText: jsx(DotTypography, {
|
|
12303
|
+
children: "The Dashboard is currently locked and only you can make changes. Publish the changes for other users to see the updated dashboard."
|
|
12304
|
+
}),
|
|
12305
|
+
buttonText: "Publish changes",
|
|
12306
|
+
buttonAction: () => {
|
|
12307
|
+
onPublishChanges(dashboard);
|
|
12308
|
+
}
|
|
12309
|
+
});
|
|
12310
|
+
} else if (dashboard.modified_author_id !== currentUser.id && modifiedAuthorUser) {
|
|
12315
12311
|
// We're in View mode for a published dashboard that is being edited by someone else.
|
|
12316
12312
|
const bannerText = jsx(DotTypography, {
|
|
12317
12313
|
children: jsxs("div", {
|