Custom message per prompt type
This commit is contained in:
parent
2d903d731f
commit
bd60b66977
@ -19,7 +19,7 @@ function TrackedMeasurementsContextProvider(
|
|||||||
UIViewportDialogService,
|
UIViewportDialogService,
|
||||||
{ children }
|
{ children }
|
||||||
) {
|
) {
|
||||||
function promptUser(ctx, evt) {
|
function promptUser(message, ctx, evt) {
|
||||||
const { StudyInstanceUID, SeriesInstanceUID } = evt;
|
const { StudyInstanceUID, SeriesInstanceUID } = evt;
|
||||||
// TODO: ... ActiveViewport? Or Study + Series --> Viewport?
|
// TODO: ... ActiveViewport? Or Study + Series --> Viewport?
|
||||||
// Let's just use zero for meow?
|
// Let's just use zero for meow?
|
||||||
@ -33,7 +33,7 @@ function TrackedMeasurementsContextProvider(
|
|||||||
UIViewportDialogService.show({
|
UIViewportDialogService.show({
|
||||||
viewportIndex: 0,
|
viewportIndex: 0,
|
||||||
type: 'info',
|
type: 'info',
|
||||||
message: 'Would you like to track?',
|
message,
|
||||||
actions: [
|
actions: [
|
||||||
{ type: 'cancel', text: 'No', value: 0 },
|
{ type: 'cancel', text: 'No', value: 0 },
|
||||||
{ type: 'secondary', text: 'No, do not ask again', value: -1 },
|
{ type: 'secondary', text: 'No, do not ask again', value: -1 },
|
||||||
@ -47,9 +47,9 @@ function TrackedMeasurementsContextProvider(
|
|||||||
const machOptions = Object.assign({}, defaultOptions);
|
const machOptions = Object.assign({}, defaultOptions);
|
||||||
// Merge services
|
// Merge services
|
||||||
machOptions.services = Object.assign({}, machOptions.services, {
|
machOptions.services = Object.assign({}, machOptions.services, {
|
||||||
promptBeginTracking: promptUser,
|
promptBeginTracking: promptUser.bind(null, 'Start tracking?'),
|
||||||
promptTrackNewStudy: promptUser,
|
promptTrackNewStudy: promptUser.bind(null, 'New study?'),
|
||||||
promptTrackNewSeries: promptUser,
|
promptTrackNewSeries: promptUser.bind(null, 'New series?'),
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(
|
console.log(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user