project-booster-vue 8.93.0 → 8.93.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/package.json +1 -1
- package/src/components/categories/PbCategoriesSection.vue +0 -2
- package/src/components/media/upload/PbMediaUpload.vue +0 -2
- package/src/components/mozaic/dialog/MDialog.vue +0 -1
- package/src/components/project-item-save/PbProjectItemSave.vue +0 -2
- package/src/components/project-item-save/PbProjectItemSaveProjectsList.vue +2 -0
- package/src/components/question/upload-document/PbUploadDocumentForm.vue +0 -2
- package/src/components/tasks/details/PbTaskDetails.vue +12 -14
- package/src/components/tasks/preview/PbTasksPreview.stories.mdx +13 -12
package/package.json
CHANGED
|
@@ -384,19 +384,15 @@ export default {
|
|
|
384
384
|
|
|
385
385
|
dirty.value = tempDirty;
|
|
386
386
|
};
|
|
387
|
-
const saveTask = async (
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
*/
|
|
397
|
-
context.emit('save-task', props.task);
|
|
398
|
-
dirty.value = false;
|
|
399
|
-
}
|
|
387
|
+
const saveTask = async () => {
|
|
388
|
+
updateOptionValues();
|
|
389
|
+
/**
|
|
390
|
+
* Emitted to save a task
|
|
391
|
+
* @event save-task
|
|
392
|
+
* @type {Event}
|
|
393
|
+
*/
|
|
394
|
+
context.emit('save-task', props.task);
|
|
395
|
+
dirty.value = false;
|
|
400
396
|
};
|
|
401
397
|
const updateOptionValues = () => {
|
|
402
398
|
if (props.task?.viewModel?.sections) {
|
|
@@ -484,7 +480,9 @@ export default {
|
|
|
484
480
|
return yup.object(options);
|
|
485
481
|
});
|
|
486
482
|
const { handleSubmit, errors, submitCount } = useForm({ validationSchema });
|
|
487
|
-
const handleFormSubmit = handleSubmit((values) => {
|
|
483
|
+
const handleFormSubmit = handleSubmit((values) => {
|
|
484
|
+
saveTask();
|
|
485
|
+
});
|
|
488
486
|
const getErrorsCount = computed(() => {
|
|
489
487
|
let errorsCount = 0;
|
|
490
488
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useStore } from 'vuex';
|
|
1
2
|
import { nestedAppDecorator } from '../../../../.storybook/nested-app-decorator';
|
|
2
3
|
import { Meta, Canvas, Story, ArgsTable, Source } from '@storybook/addon-docs';
|
|
3
4
|
import PbTasksPreview from './PbTasksPreview';
|
|
@@ -40,18 +41,18 @@ The `PbTasksPreview` component display all the task for a planner.
|
|
|
40
41
|
|
|
41
42
|
# `PbTasksPreview` - Component props
|
|
42
43
|
|
|
43
|
-
export const TemplateSandbox = (args, { argTypes }) => {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
};
|
|
44
|
+
export const TemplateSandbox = (args, { argTypes }) => ({
|
|
45
|
+
props: Object.keys(argTypes),
|
|
46
|
+
components: { PbTasksPreview },
|
|
47
|
+
setup() {
|
|
48
|
+
const store = useStore();
|
|
49
|
+
setTimeout(() => {
|
|
50
|
+
store.dispatch('togglePlannerProjectPlannerInitialized');
|
|
51
|
+
}, 2000);
|
|
52
|
+
return { args };
|
|
53
|
+
},
|
|
54
|
+
template: `<pb-tasks-preview :tasks="args.tasks" :tasks-number="args.tasksNumber" style="margin: 0 auto;max-width: 1024px; padding: 0 1rem;" />`,
|
|
55
|
+
});
|
|
55
56
|
|
|
56
57
|
<Canvas>
|
|
57
58
|
<Story name="101 Sandbox" inline={false} args={{ tasks: TASKS.slice() }} height="512px">
|