@processmaker/screen-builder 2.90.0 → 2.92.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/README.md +5 -4
- package/dist/vue-form-builder.css +1 -1
- package/dist/vue-form-builder.es.js +7897 -7488
- package/dist/vue-form-builder.es.js.map +1 -1
- package/dist/vue-form-builder.umd.js +76 -59
- package/dist/vue-form-builder.umd.js.map +1 -1
- package/package.json +3 -3
- package/src/DataProvider.js +31 -11
- package/src/assets/icons/Bypass.svg +5 -0
- package/src/assets/icons/Unbypass.svg +5 -0
- package/src/components/accordions.js +1 -0
- package/src/components/computed-properties.vue +211 -110
- package/src/components/index.js +2 -0
- package/src/components/inspector/options-list.vue +1 -1
- package/src/components/renderer/form-list-table.vue +11 -2
- package/src/components/renderer/form-requests.vue +13 -26
- package/src/components/renderer/form-tasks.vue +5 -3
- package/src/components/renderer/index.js +1 -0
- package/src/components/renderer/link-button.vue +30 -0
- package/src/components/sortable/Sortable.vue +95 -13
- package/src/components/sortable/sortable.scss +5 -0
- package/src/components/sortable/sortableList/SortableList.vue +103 -36
- package/src/components/sortable/sortableList/sortableList.scss +63 -22
- package/src/components/task.vue +256 -59
- package/src/components/vue-form-builder.vue +19 -10
- package/src/components/watchers-form.vue +4 -3
- package/src/components/watchers-list.vue +46 -100
- package/src/components/watchers-popup.vue +89 -16
- package/src/customLogs.js +26 -0
- package/src/form-builder-controls.js +42 -0
- package/src/main.js +26 -1
- package/src/mixins/Json2Vue.js +5 -3
- package/src/mixins/computedFields.js +25 -7
- package/src/mixins/extensions/ComputedFields.js +26 -5
- package/src/mixins/extensions/Watchers.js +4 -0
- package/src/mixins/watchers.js +5 -2
- package/src/stories/Sortable.stories.js +58 -11
package/src/components/task.vue
CHANGED
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
<vue-form-renderer
|
|
24
24
|
ref="renderer"
|
|
25
25
|
v-model="requestData"
|
|
26
|
+
:class="{ loading: loadingTask || loadingListeners }"
|
|
26
27
|
:config="screen.config"
|
|
27
28
|
:computed="screen.computed"
|
|
28
29
|
:custom-css="screen.custom_css"
|
|
@@ -120,6 +121,8 @@ export default {
|
|
|
120
121
|
refreshScreen: 0,
|
|
121
122
|
redirecting: null,
|
|
122
123
|
loadingButton: false,
|
|
124
|
+
loadingTask: false,
|
|
125
|
+
loadingListeners: true,
|
|
123
126
|
};
|
|
124
127
|
},
|
|
125
128
|
watch: {
|
|
@@ -129,12 +132,6 @@ export default {
|
|
|
129
132
|
},
|
|
130
133
|
},
|
|
131
134
|
|
|
132
|
-
initialTaskId: {
|
|
133
|
-
handler() {
|
|
134
|
-
this.taskId = this.initialTaskId;
|
|
135
|
-
},
|
|
136
|
-
},
|
|
137
|
-
|
|
138
135
|
initialRequestId: {
|
|
139
136
|
handler() {
|
|
140
137
|
this.requestId = this.initialRequestId;
|
|
@@ -161,16 +158,6 @@ export default {
|
|
|
161
158
|
},
|
|
162
159
|
},
|
|
163
160
|
|
|
164
|
-
taskId: {
|
|
165
|
-
handler() {
|
|
166
|
-
if (this.taskId) {
|
|
167
|
-
if (!this.task || this.task.id !== this.taskId) {
|
|
168
|
-
this.loadTask();
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
},
|
|
172
|
-
},
|
|
173
|
-
|
|
174
161
|
requestId: {
|
|
175
162
|
handler() {
|
|
176
163
|
if (this.requestId) {
|
|
@@ -182,30 +169,6 @@ export default {
|
|
|
182
169
|
},
|
|
183
170
|
},
|
|
184
171
|
|
|
185
|
-
task: {
|
|
186
|
-
handler() {
|
|
187
|
-
if (!this.screen) {
|
|
188
|
-
// if no current screen show the interstitial screen if exists
|
|
189
|
-
this.screen = this.task && this.task.interstitial_screen;
|
|
190
|
-
}
|
|
191
|
-
this.taskId = this.task.id;
|
|
192
|
-
this.nodeId = this.task.element_id;
|
|
193
|
-
this.listenForParentChanges();
|
|
194
|
-
if (this.task.process_request.status === 'COMPLETED') {
|
|
195
|
-
if (!this.taskPreview) {
|
|
196
|
-
this.$emit('completed', this.task.process_request.id);
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
if (this.taskPreview && this.task.status === "CLOSED") {
|
|
200
|
-
this.task.interstitial_screen['_interstitial'] = false;
|
|
201
|
-
if (!this.alwaysAllowEditing) {
|
|
202
|
-
this.task.screen.config = this.disableForm(this.task.screen.config);
|
|
203
|
-
}
|
|
204
|
-
this.screen = this.task.screen;
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
},
|
|
208
|
-
|
|
209
172
|
value: {
|
|
210
173
|
handler() {
|
|
211
174
|
this.requestData = this.value;
|
|
@@ -295,7 +258,7 @@ export default {
|
|
|
295
258
|
}
|
|
296
259
|
},
|
|
297
260
|
loadTask() {
|
|
298
|
-
const url = `/${this.taskId}?include=data,user,draft,requestor,processRequest,component,screen,requestData,loopContext,bpmnTagName,interstitial,definition,nested,userRequestPermission`;
|
|
261
|
+
const url = `/${this.taskId}?include=data,user,draft,requestor,processRequest,component,screen,requestData,loopContext,bpmnTagName,interstitial,definition,nested,userRequestPermission,elementDestination`;
|
|
299
262
|
// For Vocabularies
|
|
300
263
|
if (window.ProcessMaker && window.ProcessMaker.packages && window.ProcessMaker.packages.includes('package-vocabularies')) {
|
|
301
264
|
window.ProcessMaker.VocabulariesSchemaUrl = `vocabularies/task_schema/${this.taskId}`;
|
|
@@ -306,6 +269,7 @@ export default {
|
|
|
306
269
|
.getTasks(url)
|
|
307
270
|
.then((response) => {
|
|
308
271
|
this.task = response.data;
|
|
272
|
+
this.linkTask();
|
|
309
273
|
this.checkTaskStatus();
|
|
310
274
|
if (
|
|
311
275
|
window.PM4ConfigOverrides
|
|
@@ -319,9 +283,28 @@ export default {
|
|
|
319
283
|
})
|
|
320
284
|
.catch(() => {
|
|
321
285
|
this.hasErrors = true;
|
|
286
|
+
})
|
|
287
|
+
.finally(() => {
|
|
288
|
+
this.loadingTask = false;
|
|
322
289
|
});
|
|
323
290
|
});
|
|
324
291
|
},
|
|
292
|
+
linkTask() {
|
|
293
|
+
this.nodeId = this.task.element_id;
|
|
294
|
+
this.listenForParentChanges();
|
|
295
|
+
if (this.task.process_request.status === 'COMPLETED') {
|
|
296
|
+
if (!this.taskPreview) {
|
|
297
|
+
this.$emit('completed', this.task.process_request.id);
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
if (this.taskPreview && this.task.status === "CLOSED") {
|
|
301
|
+
this.task.interstitial_screen['_interstitial'] = false;
|
|
302
|
+
if (!this.alwaysAllowEditing) {
|
|
303
|
+
this.task.screen.config = this.disableForm(this.task.screen.config);
|
|
304
|
+
}
|
|
305
|
+
this.screen = this.task.screen;
|
|
306
|
+
}
|
|
307
|
+
},
|
|
325
308
|
prepareTask() {
|
|
326
309
|
// If the immediate task status is completed and we are waiting with a loading button,
|
|
327
310
|
// do not reset the screen because that would stop displaying the loading spinner
|
|
@@ -380,28 +363,107 @@ export default {
|
|
|
380
363
|
}
|
|
381
364
|
});
|
|
382
365
|
},
|
|
366
|
+
/**
|
|
367
|
+
* Closes the current task and performs necessary actions based on task properties.
|
|
368
|
+
* @param {string|null} parentRequestId - The parent request ID.
|
|
369
|
+
*/
|
|
383
370
|
closeTask(parentRequestId = null) {
|
|
384
371
|
if (this.hasErrors) {
|
|
385
|
-
this
|
|
386
|
-
return;
|
|
372
|
+
this.emitError();
|
|
387
373
|
}
|
|
388
374
|
|
|
389
|
-
if (this.
|
|
390
|
-
this.loadNextAssignedTask(parentRequestId);
|
|
391
|
-
} else if (this.loadingButton) {
|
|
375
|
+
if (this.shouldLoadNextTask()) {
|
|
392
376
|
this.loadNextAssignedTask(parentRequestId);
|
|
393
377
|
} else if (this.task.allow_interstitial) {
|
|
394
|
-
this.
|
|
395
|
-
this.screen = this.task.interstitial_screen;
|
|
396
|
-
this.loadNextAssignedTask(parentRequestId);
|
|
378
|
+
this.showInterstitial(parentRequestId);
|
|
397
379
|
} else if (!this.taskPreview) {
|
|
398
|
-
this
|
|
380
|
+
this.emitClosedEvent();
|
|
399
381
|
}
|
|
400
382
|
},
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* Checks if the next task should be loaded.
|
|
386
|
+
* @returns {boolean} - True if the next task should be loaded, otherwise false.
|
|
387
|
+
*/
|
|
388
|
+
shouldLoadNextTask() {
|
|
389
|
+
return (
|
|
390
|
+
this.task.process_request.status === "COMPLETED" || this.loadingButton
|
|
391
|
+
);
|
|
392
|
+
},
|
|
393
|
+
/**
|
|
394
|
+
* Shows the interstitial screen and loads the next assigned task.
|
|
395
|
+
* @param {string|null} parentRequestId - The parent request ID.
|
|
396
|
+
*/
|
|
397
|
+
showInterstitial(parentRequestId) {
|
|
398
|
+
// Show the interstitial screen
|
|
399
|
+
this.task.interstitial_screen['_interstitial'] = true;
|
|
400
|
+
this.screen = this.task.interstitial_screen;
|
|
401
|
+
|
|
402
|
+
// Load the next assigned task
|
|
403
|
+
this.loadNextAssignedTask(parentRequestId);
|
|
404
|
+
},
|
|
405
|
+
/**
|
|
406
|
+
* Emits an error event.
|
|
407
|
+
*/
|
|
408
|
+
emitError() {
|
|
409
|
+
this.$emit('error', this.requestId);
|
|
410
|
+
},
|
|
411
|
+
/**
|
|
412
|
+
* Emits a closed event.
|
|
413
|
+
*/
|
|
414
|
+
async emitClosedEvent() {
|
|
415
|
+
this.$emit("closed", this.task.id, await this.getDestinationUrl());
|
|
416
|
+
},
|
|
417
|
+
/**
|
|
418
|
+
* Retrieves the destination URL for the closed event.
|
|
419
|
+
* @returns {string|null} - The destination URL.
|
|
420
|
+
*/
|
|
421
|
+
// eslint-disable-next-line consistent-return
|
|
422
|
+
async getDestinationUrl() {
|
|
423
|
+
const { elementDestination, allow_interstitial: allowInterstitial } = this.task || {};
|
|
424
|
+
|
|
425
|
+
if (!elementDestination) {
|
|
426
|
+
return null;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
if (elementDestination.type === "taskSource") {
|
|
430
|
+
try {
|
|
431
|
+
const params = {
|
|
432
|
+
processRequestId: this.requestId,
|
|
433
|
+
status: "ACTIVE",
|
|
434
|
+
userId: this.userId,
|
|
435
|
+
};
|
|
436
|
+
|
|
437
|
+
const response = await this.retryApiCall(() => this.getTasks(params));
|
|
438
|
+
|
|
439
|
+
const firstTask = response.data.data[0];
|
|
440
|
+
if (allowInterstitial && firstTask?.user_id === this.userId) {
|
|
441
|
+
return `/tasks/${firstTask.id}/edit`;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
return document.referrer || null;
|
|
445
|
+
} catch (error) {
|
|
446
|
+
console.error("Error in getDestinationUrl:", error);
|
|
447
|
+
return null;
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
const elementDestinationUrl = elementDestination.value;
|
|
452
|
+
if (elementDestinationUrl) {
|
|
453
|
+
return elementDestinationUrl;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
const sessionStorageUrl = sessionStorage.getItem("elementDestinationURL");
|
|
457
|
+
return sessionStorageUrl || null;
|
|
458
|
+
},
|
|
459
|
+
|
|
401
460
|
loadNextAssignedTask(requestId = null) {
|
|
402
461
|
if (!requestId) {
|
|
403
462
|
requestId = this.requestId;
|
|
404
463
|
}
|
|
464
|
+
if (!this.userId) {
|
|
465
|
+
return;
|
|
466
|
+
}
|
|
405
467
|
const timestamp = !window.Cypress ? `&t=${Date.now()}` : "";
|
|
406
468
|
const url = `?user_id=${this.userId}&status=ACTIVE&process_request_id=${requestId}&include_sub_tasks=1${timestamp}`;
|
|
407
469
|
return this.$dataProvider
|
|
@@ -421,9 +483,12 @@ export default {
|
|
|
421
483
|
this.emitIfTaskCompleted(requestId);
|
|
422
484
|
}
|
|
423
485
|
this.taskId = task.id;
|
|
486
|
+
this.loadTask();
|
|
424
487
|
this.nodeId = task.element_id;
|
|
425
488
|
} else if (this.parentRequest && ['COMPLETED', 'CLOSED'].includes(this.task.process_request.status)) {
|
|
426
489
|
this.$emit('completed', this.getAllowedRequestId());
|
|
490
|
+
} else if (!this.taskPreview) {
|
|
491
|
+
this.emitClosedEvent();
|
|
427
492
|
}
|
|
428
493
|
});
|
|
429
494
|
},
|
|
@@ -481,14 +546,133 @@ export default {
|
|
|
481
546
|
activityAssigned() {
|
|
482
547
|
// This may no longer be needed
|
|
483
548
|
},
|
|
484
|
-
processCompleted() {
|
|
549
|
+
processCompleted(data = null) {
|
|
485
550
|
let requestId;
|
|
486
551
|
if (this.parentRequest) {
|
|
487
552
|
requestId = this.getAllowedRequestId();
|
|
488
553
|
this.$emit('completed', requestId);
|
|
489
554
|
}
|
|
490
555
|
if (requestId !== this.requestId) {
|
|
491
|
-
this
|
|
556
|
+
this.processCompletedRedirect(data, this.userId, this.requestId);
|
|
557
|
+
}
|
|
558
|
+
},
|
|
559
|
+
/**
|
|
560
|
+
* Makes an API call with retry logic.
|
|
561
|
+
* @param {Function} apiCall - The API call to be made.
|
|
562
|
+
* @param {number} retries - The number of retry attempts.
|
|
563
|
+
* @param {number} delay - The delay between retries in milliseconds.
|
|
564
|
+
* @returns {Promise} - The response from the API call.
|
|
565
|
+
*/
|
|
566
|
+
// eslint-disable-next-line consistent-return
|
|
567
|
+
async retryApiCall(apiCall, retries = 3, delay = 1000) {
|
|
568
|
+
for (let attempt = 0; attempt < retries; attempt++) {
|
|
569
|
+
try {
|
|
570
|
+
// eslint-disable-next-line no-await-in-loop
|
|
571
|
+
const response = await apiCall();
|
|
572
|
+
return response;
|
|
573
|
+
} catch (error) {
|
|
574
|
+
if (attempt === retries - 1) {
|
|
575
|
+
throw error;
|
|
576
|
+
}
|
|
577
|
+
// eslint-disable-next-line no-await-in-loop
|
|
578
|
+
await new Promise((resolve) => {
|
|
579
|
+
setTimeout(resolve, delay);
|
|
580
|
+
});
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
},
|
|
584
|
+
/**
|
|
585
|
+
* Gets the next request by posting to the specified endpoint.
|
|
586
|
+
* @param {string} processId - The process ID.
|
|
587
|
+
* @param {string} startEvent - The start event.
|
|
588
|
+
* @returns {Promise} - The response from the API call.
|
|
589
|
+
*/
|
|
590
|
+
getNextRequest(processId, startEvent) {
|
|
591
|
+
return window.ProcessMaker.apiClient.post(
|
|
592
|
+
`/process_events/${processId}?event=${startEvent}`,
|
|
593
|
+
{}
|
|
594
|
+
);
|
|
595
|
+
},
|
|
596
|
+
|
|
597
|
+
/**
|
|
598
|
+
* Gets the tasks for the specified process request ID.
|
|
599
|
+
* @param {object} params - The query params.
|
|
600
|
+
* @returns {Promise} - The response from the API call.
|
|
601
|
+
*/
|
|
602
|
+
|
|
603
|
+
getTasks(params) {
|
|
604
|
+
const queryParams = {
|
|
605
|
+
user_id: this.userId,
|
|
606
|
+
process_request_id: params.processRequestId,
|
|
607
|
+
page: params.page || 1,
|
|
608
|
+
per_page: params.perPage || 1,
|
|
609
|
+
status: params.status,
|
|
610
|
+
};
|
|
611
|
+
|
|
612
|
+
const queryString = new URLSearchParams(queryParams).toString();
|
|
613
|
+
|
|
614
|
+
return this.$dataProvider.getTasks(`?${queryString}`);
|
|
615
|
+
},
|
|
616
|
+
/**
|
|
617
|
+
* Parses a JSON string and returns the result.
|
|
618
|
+
* @param {string} jsonString - The JSON string to parse.
|
|
619
|
+
* @returns {object|null} - The parsed object or null if parsing fails.
|
|
620
|
+
*/
|
|
621
|
+
parseJsonSafely(jsonString) {
|
|
622
|
+
try {
|
|
623
|
+
return JSON.parse(jsonString);
|
|
624
|
+
} catch (error) {
|
|
625
|
+
console.error("Invalid JSON string:", error);
|
|
626
|
+
return null;
|
|
627
|
+
}
|
|
628
|
+
},
|
|
629
|
+
/**
|
|
630
|
+
* Handles the process completion and redirects the user based on the task assignment.
|
|
631
|
+
* @param {object} data - The data object containing endEventDestination.
|
|
632
|
+
* @param {string} userId - The ID of the current user.
|
|
633
|
+
* @param {string} requestId - The ID of the current request.
|
|
634
|
+
*/
|
|
635
|
+
async processCompletedRedirect(data, userId, requestId) {
|
|
636
|
+
try {
|
|
637
|
+
// Verify if is not anotherProcess type
|
|
638
|
+
if (data.endEventDestination.type !== "anotherProcess") {
|
|
639
|
+
this.$emit(
|
|
640
|
+
"completed",
|
|
641
|
+
this.requestId,
|
|
642
|
+
data?.endEventDestination.value
|
|
643
|
+
);
|
|
644
|
+
return;
|
|
645
|
+
}
|
|
646
|
+
// Parse endEventDestination from the provided data
|
|
647
|
+
const endEventDestination = this.parseJsonSafely(
|
|
648
|
+
data.endEventDestination.value
|
|
649
|
+
);
|
|
650
|
+
// Get the next request using retry logic
|
|
651
|
+
const nextRequest = await this.retryApiCall(() =>
|
|
652
|
+
this.getNextRequest(
|
|
653
|
+
endEventDestination.processId,
|
|
654
|
+
endEventDestination.startEvent
|
|
655
|
+
)
|
|
656
|
+
);
|
|
657
|
+
|
|
658
|
+
const params = {
|
|
659
|
+
processRequestId: nextRequest.data.id,
|
|
660
|
+
status: "ACTIVE",
|
|
661
|
+
page: 1,
|
|
662
|
+
perPage: 1
|
|
663
|
+
};
|
|
664
|
+
// Get the tasks for the next request using retry logic
|
|
665
|
+
const response = await this.retryApiCall(() => this.getTasks(params));
|
|
666
|
+
// Handle the first task from the response
|
|
667
|
+
const firstTask = response.data.data[0];
|
|
668
|
+
if (firstTask && firstTask.user_id === userId) {
|
|
669
|
+
this.$emit("completed", requestId, `/tasks/${firstTask.id}/edit`);
|
|
670
|
+
} else {
|
|
671
|
+
this.$emit("completed", requestId);
|
|
672
|
+
}
|
|
673
|
+
} catch (error) {
|
|
674
|
+
console.error("Error processing completed redirect:", error);
|
|
675
|
+
this.$emit("completed", requestId);
|
|
492
676
|
}
|
|
493
677
|
},
|
|
494
678
|
getAllowedRequestId() {
|
|
@@ -498,14 +682,23 @@ export default {
|
|
|
498
682
|
return allowed ? this.parentRequest : this.requestId
|
|
499
683
|
},
|
|
500
684
|
processUpdated: _.debounce(function(data) {
|
|
501
|
-
if (
|
|
685
|
+
if (
|
|
686
|
+
data.event === "ACTIVITY_ACTIVATED"
|
|
687
|
+
&& data.elementType === 'task'
|
|
688
|
+
) {
|
|
689
|
+
if (!this.task.elementDestination?.type) {
|
|
690
|
+
this.taskId = data.taskId;
|
|
691
|
+
}
|
|
692
|
+
|
|
502
693
|
this.reload();
|
|
503
694
|
}
|
|
695
|
+
|
|
504
696
|
if (data.event === 'ACTIVITY_EXCEPTION') {
|
|
505
697
|
this.$emit('error', this.requestId);
|
|
506
698
|
}
|
|
507
|
-
},
|
|
699
|
+
}, 100),
|
|
508
700
|
initSocketListeners() {
|
|
701
|
+
this.loadingListeners = false;
|
|
509
702
|
this.addSocketListener(
|
|
510
703
|
`completed-${this.requestId}`,
|
|
511
704
|
`ProcessMaker.Models.ProcessRequest.${this.requestId}`,
|
|
@@ -514,7 +707,6 @@ export default {
|
|
|
514
707
|
this.processCompleted(data);
|
|
515
708
|
}
|
|
516
709
|
);
|
|
517
|
-
|
|
518
710
|
this.addSocketListener(
|
|
519
711
|
`updated-${this.requestId}`,
|
|
520
712
|
`ProcessMaker.Models.ProcessRequest.${this.requestId}`,
|
|
@@ -547,14 +739,12 @@ export default {
|
|
|
547
739
|
'.ProcessUpdated',
|
|
548
740
|
(data) => {
|
|
549
741
|
if (
|
|
550
|
-
['ACTIVITY_ACTIVATED'].includes(data.event)
|
|
551
|
-
!this.existsEventMessage(`${data.event}-${this.userId}-${this.taskId}`)
|
|
742
|
+
['ACTIVITY_ACTIVATED'].includes(data.event)
|
|
552
743
|
) {
|
|
553
744
|
this.closeTask(this.parentRequest);
|
|
554
745
|
}
|
|
555
746
|
if (
|
|
556
|
-
["ACTIVITY_COMPLETED"].includes(data.event)
|
|
557
|
-
!this.existsEventMessage(`${data.event}-${this.userId}-${this.taskId}`)
|
|
747
|
+
["ACTIVITY_COMPLETED"].includes(data.event)
|
|
558
748
|
) {
|
|
559
749
|
if (this.task.process_request.status === 'COMPLETED') {
|
|
560
750
|
this.processCompleted();
|
|
@@ -612,9 +802,16 @@ export default {
|
|
|
612
802
|
this.nodeId = this.initialNodeId;
|
|
613
803
|
this.requestData = this.value;
|
|
614
804
|
this.loopContext = this.initialLoopContext;
|
|
805
|
+
this.loadTask();
|
|
615
806
|
},
|
|
616
807
|
destroyed() {
|
|
617
808
|
this.unsubscribeSocketListeners();
|
|
618
809
|
},
|
|
619
810
|
};
|
|
620
811
|
</script>
|
|
812
|
+
|
|
813
|
+
<style scoped>
|
|
814
|
+
.loading {
|
|
815
|
+
pointer-events: none;
|
|
816
|
+
}
|
|
817
|
+
</style>
|
|
@@ -368,18 +368,20 @@
|
|
|
368
368
|
:ok-title="$t('DONE')"
|
|
369
369
|
ok-only
|
|
370
370
|
ok-variant="secondary"
|
|
371
|
-
header-class
|
|
371
|
+
header-class="modal-header-custom"
|
|
372
372
|
>
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
373
|
+
<template #modal-title>
|
|
374
|
+
<h5 class="modal-title">{{ $t('Edit Pages') }}</h5>
|
|
375
|
+
<span class="modal-subtitle">{{ $t('Change pages order and name') }}</span>
|
|
376
|
+
</template>
|
|
377
|
+
<template #modal-header-close="{ close }">
|
|
378
|
+
<button type="button" aria-label="Close" class="close">×</button>
|
|
379
|
+
</template>
|
|
380
|
+
|
|
380
381
|
<Sortable
|
|
382
|
+
:fields="fields"
|
|
381
383
|
:items="config"
|
|
382
|
-
|
|
384
|
+
:search-properties="searchProperties"
|
|
383
385
|
@item-edit="() => {}"
|
|
384
386
|
@item-delete="confirmDelete"
|
|
385
387
|
@add-page="$bvModal.show('addPageModal')"
|
|
@@ -604,6 +606,12 @@ export default {
|
|
|
604
606
|
editPageIndex: null,
|
|
605
607
|
editPageName: "",
|
|
606
608
|
originalPageName: null,
|
|
609
|
+
fields: [
|
|
610
|
+
{
|
|
611
|
+
label: this.$t("Name"),
|
|
612
|
+
key: "name",
|
|
613
|
+
},
|
|
614
|
+
],
|
|
607
615
|
config,
|
|
608
616
|
confirmMessage: "",
|
|
609
617
|
pageDelete: 0,
|
|
@@ -621,7 +629,8 @@ export default {
|
|
|
621
629
|
editorContentKey: 0,
|
|
622
630
|
cancelledJobs: [],
|
|
623
631
|
collapse: {},
|
|
624
|
-
groupOrder: {}
|
|
632
|
+
groupOrder: {},
|
|
633
|
+
searchProperties: ['name'],
|
|
625
634
|
};
|
|
626
635
|
},
|
|
627
636
|
computed: {
|
|
@@ -341,14 +341,14 @@
|
|
|
341
341
|
|
|
342
342
|
<div class="d-flex justify-content-end mt-3">
|
|
343
343
|
<button
|
|
344
|
-
class="btn btn-outline-secondary"
|
|
344
|
+
class="btn btn-outline-secondary text-uppercase"
|
|
345
345
|
data-cy="watchers-button-cancel"
|
|
346
346
|
@click.stop="displayTableList"
|
|
347
347
|
>
|
|
348
348
|
{{ $t("Cancel") }}
|
|
349
349
|
</button>
|
|
350
350
|
<button
|
|
351
|
-
class="btn btn-secondary ml-3"
|
|
351
|
+
class="btn btn-secondary ml-3 text-uppercase"
|
|
352
352
|
data-cy="watchers-button-save"
|
|
353
353
|
@click="validateDataAndSave"
|
|
354
354
|
>
|
|
@@ -701,6 +701,7 @@ export default {
|
|
|
701
701
|
|
|
702
702
|
if (!this.config.uid) {
|
|
703
703
|
this.config.uid = _.uniqueId(new Date().getTime());
|
|
704
|
+
this.config.byPass = false;
|
|
704
705
|
}
|
|
705
706
|
|
|
706
707
|
this.save();
|
|
@@ -743,7 +744,7 @@ export default {
|
|
|
743
744
|
}
|
|
744
745
|
|
|
745
746
|
.editor {
|
|
746
|
-
height:
|
|
747
|
+
height: 375px;
|
|
747
748
|
z-index: 0;
|
|
748
749
|
}
|
|
749
750
|
|