@ailaw/venus 0.3.17 → 0.3.21
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/dist/style.css +1 -1
- package/dist/venus.es.js +44 -44
- package/package.json +1 -1
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! tailwindcss v2.2.17 | MIT License | https://tailwindcss.com *//*! modern-normalize v1.1.0 | MIT License | https://github.com/sindresorhus/modern-normalize */*,:before,:after{box-sizing:border-box}html{-moz-tab-size:4;-o-tab-size:4;tab-size:4}html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}body{font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"}hr{height:0;color:inherit}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}::-moz-focus-inner{border-style:none;padding:0}legend{padding:0}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}button{background-color:transparent;background-image:none}fieldset{margin:0;padding:0}ol,ul{list-style:none;margin:0;padding:0}html{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";line-height:1.5}body{font-family:inherit;line-height:inherit}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}hr{border-top-width:1px}img{border-style:solid}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#a1a1aa}input:-ms-input-placeholder,textarea:-ms-input-placeholder{opacity:1;color:#a1a1aa}input::placeholder,textarea::placeholder{opacity:1;color:#a1a1aa}button,[role=button]{cursor:pointer}table{border-collapse:collapse}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}button,input,optgroup,select,textarea{padding:0;line-height:inherit;color:inherit}pre,code,kbd,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}*,:before,:after{border-color:currentColor}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.visible{visibility:visible}.relative{position:relative}.my-1{margin-top:.25rem;margin-bottom:.25rem}.mr-2{margin-right:.5rem}.mb-5{margin-bottom:1.25rem}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.table{display:table}.h-6{height:1.5rem}.h-screen{height:100vh}.w-6{width:1.5rem}.w-60{width:15rem}.w-72{width:18rem}.flex-1{flex:1 1 0%}@-webkit-keyframes spin{to{transform:rotate(360deg)}}@keyframes spin{to{transform:rotate(360deg)}}@-webkit-keyframes ping{75%,to{transform:scale(2);opacity:0}}@keyframes ping{75%,to{transform:scale(2);opacity:0}}@-webkit-keyframes pulse{50%{opacity:.5}}@keyframes pulse{50%{opacity:.5}}@-webkit-keyframes bounce{0%,to{transform:translateY(-25%);-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1)}}@keyframes bounce{0%,to{transform:translateY(-25%);-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1)}}.items-center{align-items:center}.justify-end{justify-content:flex-end}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.border{border-width:1px}.p-4{padding:1rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.capitalize{text-transform:capitalize}.text-secondary{--tw-text-opacity: 1;color:rgba(102,102,102,var(--tw-text-opacity))}*,:before,:after{--tw-shadow: 0 0 #0000}*,:before,:after{--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgba(59, 130, 246, .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000}.filter{--tw-blur: var(--tw-empty, );--tw-brightness: var(--tw-empty, );--tw-contrast: var(--tw-empty, );--tw-grayscale: var(--tw-empty, );--tw-hue-rotate: var(--tw-empty, );--tw-invert: var(--tw-empty, );--tw-saturate: var(--tw-empty, );--tw-sepia: var(--tw-empty, );--tw-drop-shadow: var(--tw-empty, );filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur{--tw-blur: blur(8px)}.tags-container[data-v-c4729600]{word-break:keep-all;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}.container[data-v-
|
|
1
|
+
/*! tailwindcss v2.2.17 | MIT License | https://tailwindcss.com *//*! modern-normalize v1.1.0 | MIT License | https://github.com/sindresorhus/modern-normalize */*,:before,:after{box-sizing:border-box}html{-moz-tab-size:4;-o-tab-size:4;tab-size:4}html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}body{font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"}hr{height:0;color:inherit}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}::-moz-focus-inner{border-style:none;padding:0}legend{padding:0}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}button{background-color:transparent;background-image:none}fieldset{margin:0;padding:0}ol,ul{list-style:none;margin:0;padding:0}html{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";line-height:1.5}body{font-family:inherit;line-height:inherit}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}hr{border-top-width:1px}img{border-style:solid}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#a1a1aa}input:-ms-input-placeholder,textarea:-ms-input-placeholder{opacity:1;color:#a1a1aa}input::placeholder,textarea::placeholder{opacity:1;color:#a1a1aa}button,[role=button]{cursor:pointer}table{border-collapse:collapse}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}button,input,optgroup,select,textarea{padding:0;line-height:inherit;color:inherit}pre,code,kbd,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}*,:before,:after{border-color:currentColor}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.visible{visibility:visible}.relative{position:relative}.my-1{margin-top:.25rem;margin-bottom:.25rem}.mr-2{margin-right:.5rem}.mb-5{margin-bottom:1.25rem}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.table{display:table}.h-6{height:1.5rem}.h-screen{height:100vh}.w-6{width:1.5rem}.w-60{width:15rem}.w-72{width:18rem}.flex-1{flex:1 1 0%}@-webkit-keyframes spin{to{transform:rotate(360deg)}}@keyframes spin{to{transform:rotate(360deg)}}@-webkit-keyframes ping{75%,to{transform:scale(2);opacity:0}}@keyframes ping{75%,to{transform:scale(2);opacity:0}}@-webkit-keyframes pulse{50%{opacity:.5}}@keyframes pulse{50%{opacity:.5}}@-webkit-keyframes bounce{0%,to{transform:translateY(-25%);-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1)}}@keyframes bounce{0%,to{transform:translateY(-25%);-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1)}}.items-center{align-items:center}.justify-end{justify-content:flex-end}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.border{border-width:1px}.p-4{padding:1rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.capitalize{text-transform:capitalize}.text-secondary{--tw-text-opacity: 1;color:rgba(102,102,102,var(--tw-text-opacity))}*,:before,:after{--tw-shadow: 0 0 #0000}*,:before,:after{--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgba(59, 130, 246, .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000}.filter{--tw-blur: var(--tw-empty, );--tw-brightness: var(--tw-empty, );--tw-contrast: var(--tw-empty, );--tw-grayscale: var(--tw-empty, );--tw-hue-rotate: var(--tw-empty, );--tw-invert: var(--tw-empty, );--tw-saturate: var(--tw-empty, );--tw-sepia: var(--tw-empty, );--tw-drop-shadow: var(--tw-empty, );filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur{--tw-blur: blur(8px)}.tags-container[data-v-c4729600]{word-break:keep-all;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}.container[data-v-6b2011bc]{border:1px solid #cccccc;border-radius:6px;padding:0 4px;min-height:30px;cursor:pointer}.taskTemplateInline[data-v-5128ec2c]{float:right}a.taskTemplateInline[data-v-5128ec2c]{margin-left:10px}div.taskTemplateInline[data-v-5128ec2c]{margin-top:5px!important}
|
package/dist/venus.es.js
CHANGED
|
@@ -836,6 +836,7 @@ var __vue2_script$9 = defineComponent({
|
|
|
836
836
|
}
|
|
837
837
|
},
|
|
838
838
|
setup(props, { emit }) {
|
|
839
|
+
const me = useMe();
|
|
839
840
|
const loading = ref$1(false);
|
|
840
841
|
const changeVal = (k, v) => {
|
|
841
842
|
emit("change", __spreadProps(__spreadValues({}, props.value), {
|
|
@@ -846,10 +847,11 @@ var __vue2_script$9 = defineComponent({
|
|
|
846
847
|
emit("change", props.value.filter((v) => v.id !== id));
|
|
847
848
|
};
|
|
848
849
|
const beforeUpload = (file) => {
|
|
850
|
+
var _a, _b;
|
|
849
851
|
if (loading.value)
|
|
850
852
|
return false;
|
|
851
853
|
loading.value = true;
|
|
852
|
-
props.uploadFilesFunc([file]).then(([
|
|
854
|
+
props.uploadFilesFunc([file], { office_id: (_a = me.value) == null ? void 0 : _a.lawFirmId, user_id: (_b = me.value) == null ? void 0 : _b.id }).then(([
|
|
853
855
|
{
|
|
854
856
|
status,
|
|
855
857
|
value: { id, name, link }
|
|
@@ -902,7 +904,7 @@ var render$9 = function() {
|
|
|
902
904
|
var staticRenderFns$9 = [];
|
|
903
905
|
var aFileUploader_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
904
906
|
const __cssModules$9 = {};
|
|
905
|
-
var __component__$9 = /* @__PURE__ */ normalizeComponent(__vue2_script$9, render$9, staticRenderFns$9, false, __vue2_injectStyles$9, "
|
|
907
|
+
var __component__$9 = /* @__PURE__ */ normalizeComponent(__vue2_script$9, render$9, staticRenderFns$9, false, __vue2_injectStyles$9, "6b2011bc", null, null);
|
|
906
908
|
function __vue2_injectStyles$9(context) {
|
|
907
909
|
for (let o in __cssModules$9) {
|
|
908
910
|
this[o] = __cssModules$9[o];
|
|
@@ -2354,8 +2356,7 @@ var useTaskActions = (addedTasks, emit) => {
|
|
|
2354
2356
|
const taskToAdd = {
|
|
2355
2357
|
taskTemplateObj: record
|
|
2356
2358
|
};
|
|
2357
|
-
emit("
|
|
2358
|
-
emit("update:newTaskVisible", true);
|
|
2359
|
+
emit("editTask", taskToAdd);
|
|
2359
2360
|
};
|
|
2360
2361
|
const removeTask = (record) => emit("update:addedTasks", addedTasks.value.filter(({ id }) => id !== record.id));
|
|
2361
2362
|
return {
|
|
@@ -2379,7 +2380,7 @@ var useTaskTemplateTableData = (props, emit) => {
|
|
|
2379
2380
|
total: 0
|
|
2380
2381
|
});
|
|
2381
2382
|
const { conditions = useSearchTaskConditions(), addedTasks = ref$1([]) } = toRefs$1(props);
|
|
2382
|
-
const { result, loading,
|
|
2383
|
+
const { result, loading, variables } = useSearchTaskTemplates(initialPagination, conditions, props.lawFirmId);
|
|
2383
2384
|
const dataSource = computed(() => {
|
|
2384
2385
|
var _a;
|
|
2385
2386
|
return ((_a = result.value) == null ? void 0 : _a.taskTemplateSearch.taskTemplateList) || [];
|
|
@@ -2404,7 +2405,6 @@ var useTaskTemplateTableData = (props, emit) => {
|
|
|
2404
2405
|
dataSource,
|
|
2405
2406
|
result,
|
|
2406
2407
|
loading,
|
|
2407
|
-
refetch,
|
|
2408
2408
|
conditions,
|
|
2409
2409
|
addedTasks,
|
|
2410
2410
|
variables
|
|
@@ -2435,7 +2435,6 @@ var __vue2_script$4 = defineComponent({
|
|
|
2435
2435
|
setup(props, { emit }) {
|
|
2436
2436
|
const {
|
|
2437
2437
|
loading,
|
|
2438
|
-
refetch,
|
|
2439
2438
|
dataSource,
|
|
2440
2439
|
pagination,
|
|
2441
2440
|
variables,
|
|
@@ -2446,7 +2445,6 @@ var __vue2_script$4 = defineComponent({
|
|
|
2446
2445
|
} = useTaskTemplateTableData(props, emit);
|
|
2447
2446
|
return {
|
|
2448
2447
|
loading,
|
|
2449
|
-
refetch,
|
|
2450
2448
|
dataSource,
|
|
2451
2449
|
pagination,
|
|
2452
2450
|
AssigneeTypesText,
|
|
@@ -2469,7 +2467,7 @@ var render$4 = function() {
|
|
|
2469
2467
|
var staticRenderFns$4 = [];
|
|
2470
2468
|
var TaskTable_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
2471
2469
|
const __cssModules$4 = {};
|
|
2472
|
-
var __component__$4 = /* @__PURE__ */ normalizeComponent(__vue2_script$4, render$4, staticRenderFns$4, false, __vue2_injectStyles$4, "
|
|
2470
|
+
var __component__$4 = /* @__PURE__ */ normalizeComponent(__vue2_script$4, render$4, staticRenderFns$4, false, __vue2_injectStyles$4, "7b828978", null, null);
|
|
2473
2471
|
function __vue2_injectStyles$4(context) {
|
|
2474
2472
|
for (let o in __cssModules$4) {
|
|
2475
2473
|
this[o] = __cssModules$4[o];
|
|
@@ -2518,7 +2516,7 @@ var __vue2_script$3 = defineComponent({
|
|
|
2518
2516
|
const conditions = useSearchTaskConditions();
|
|
2519
2517
|
const currentComponent = shallowRef(props.showPage ? Card : Modal);
|
|
2520
2518
|
const editAction = (record) => {
|
|
2521
|
-
emit("
|
|
2519
|
+
emit("editTask", record);
|
|
2522
2520
|
};
|
|
2523
2521
|
const getVariables = () => taskTable.value.variables;
|
|
2524
2522
|
return {
|
|
@@ -2549,10 +2547,8 @@ var render$3 = function() {
|
|
|
2549
2547
|
return _vm.$emit("update:newTaskVisible", true);
|
|
2550
2548
|
} } }), _c("task-table", { ref: "taskTable", attrs: { "conditions": _vm.conditions, "added-tasks": _vm.addedTasks, "law-firm-id": _vm.lawFirmId, "page-size": _vm.pageSize }, on: { "update:addedTasks": function($event) {
|
|
2551
2549
|
return _vm.$emit("update:addedTasks", $event);
|
|
2552
|
-
}, "
|
|
2553
|
-
return _vm.$emit("
|
|
2554
|
-
}, "update:newTaskVisible": function($event) {
|
|
2555
|
-
return _vm.$emit("update:newTaskVisible", $event);
|
|
2550
|
+
}, "editTask": function($event) {
|
|
2551
|
+
return _vm.$emit("editTask", $event);
|
|
2556
2552
|
} }, scopedSlots: _vm._u([{ key: "default", fn: function(ref2) {
|
|
2557
2553
|
var loading = ref2.loading;
|
|
2558
2554
|
var dataSource = ref2.dataSource;
|
|
@@ -2564,7 +2560,7 @@ var render$3 = function() {
|
|
|
2564
2560
|
var staticRenderFns$3 = [];
|
|
2565
2561
|
var MainModal_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
2566
2562
|
const __cssModules$3 = {};
|
|
2567
|
-
var __component__$3 = /* @__PURE__ */ normalizeComponent(__vue2_script$3, render$3, staticRenderFns$3, false, __vue2_injectStyles$3, "
|
|
2563
|
+
var __component__$3 = /* @__PURE__ */ normalizeComponent(__vue2_script$3, render$3, staticRenderFns$3, false, __vue2_injectStyles$3, "b2f78f98", null, null);
|
|
2568
2564
|
function __vue2_injectStyles$3(context) {
|
|
2569
2565
|
for (let o in __cssModules$3) {
|
|
2570
2566
|
this[o] = __cssModules$3[o];
|
|
@@ -2616,7 +2612,7 @@ var __vue2_script$2 = defineComponent({
|
|
|
2616
2612
|
const pagination = ref$1({
|
|
2617
2613
|
total: addedTasks.value.length,
|
|
2618
2614
|
current: 1,
|
|
2619
|
-
pageSize:
|
|
2615
|
+
pageSize: 10
|
|
2620
2616
|
});
|
|
2621
2617
|
const changePagination = (newPagination) => {
|
|
2622
2618
|
pagination.value = newPagination;
|
|
@@ -2655,7 +2651,7 @@ var render$2 = function() {
|
|
|
2655
2651
|
var staticRenderFns$2 = [];
|
|
2656
2652
|
var ReviewModal_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
2657
2653
|
const __cssModules$2 = {};
|
|
2658
|
-
var __component__$2 = /* @__PURE__ */ normalizeComponent(__vue2_script$2, render$2, staticRenderFns$2, false, __vue2_injectStyles$2, "
|
|
2654
|
+
var __component__$2 = /* @__PURE__ */ normalizeComponent(__vue2_script$2, render$2, staticRenderFns$2, false, __vue2_injectStyles$2, "09e3f3ca", null, null);
|
|
2659
2655
|
function __vue2_injectStyles$2(context) {
|
|
2660
2656
|
for (let o in __cssModules$2) {
|
|
2661
2657
|
this[o] = __cssModules$2[o];
|
|
@@ -2824,54 +2820,58 @@ var __vue2_script$1 = defineComponent({
|
|
|
2824
2820
|
emit("update:value", newValue.map(({ id }) => id));
|
|
2825
2821
|
}
|
|
2826
2822
|
};
|
|
2827
|
-
const
|
|
2823
|
+
const writeQuery = (id, newRecord) => {
|
|
2828
2824
|
const variables = mainModal.value.getVariables();
|
|
2829
2825
|
const existed = client.readQuery({
|
|
2830
2826
|
query: SearchTaskTemplatesQuery,
|
|
2831
2827
|
variables
|
|
2832
2828
|
});
|
|
2829
|
+
client.writeQuery({
|
|
2830
|
+
query: SearchTaskTemplatesQuery,
|
|
2831
|
+
data: {
|
|
2832
|
+
taskTemplateSearch: __spreadProps(__spreadValues({}, existed.taskTemplateSearch), {
|
|
2833
|
+
taskTemplateList: existed.taskTemplateSearch.taskTemplateList.map((record) => {
|
|
2834
|
+
if (record.id === id) {
|
|
2835
|
+
return newRecord && __spreadProps(__spreadValues({}, newRecord), {
|
|
2836
|
+
isGallery: record.isGallery
|
|
2837
|
+
});
|
|
2838
|
+
}
|
|
2839
|
+
return record;
|
|
2840
|
+
}).filter((record) => !!record)
|
|
2841
|
+
})
|
|
2842
|
+
},
|
|
2843
|
+
variables
|
|
2844
|
+
});
|
|
2845
|
+
};
|
|
2846
|
+
const _submit = async (record) => {
|
|
2833
2847
|
const {
|
|
2834
2848
|
newRecord,
|
|
2835
|
-
success
|
|
2849
|
+
success,
|
|
2850
|
+
isUpdate
|
|
2836
2851
|
} = await submit(record, updateTemplate, createTemplate);
|
|
2837
2852
|
if (success) {
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
data: {
|
|
2841
|
-
taskTemplateSearch: __spreadProps(__spreadValues({}, existed.taskTemplateSearch), {
|
|
2842
|
-
taskTemplateList: existed.taskTemplateSearch.taskTemplateList.map((record2) => {
|
|
2843
|
-
if (record2.id === newRecord.id) {
|
|
2844
|
-
return __spreadProps(__spreadValues({}, newRecord), {
|
|
2845
|
-
isGallery: record2.isGallery
|
|
2846
|
-
});
|
|
2847
|
-
}
|
|
2848
|
-
return record2;
|
|
2849
|
-
})
|
|
2850
|
-
})
|
|
2851
|
-
},
|
|
2852
|
-
variables
|
|
2853
|
-
});
|
|
2853
|
+
if (!isUpdate)
|
|
2854
|
+
writeQuery(record.taskTemplateId, newRecord);
|
|
2854
2855
|
newTaskVisible.value = false;
|
|
2855
2856
|
updateReviewModalContent(record, newRecord);
|
|
2856
2857
|
}
|
|
2857
2858
|
};
|
|
2858
2859
|
const submitting = computed(() => updateTemplate.loading.value || createTemplate.loading.value);
|
|
2859
|
-
const
|
|
2860
|
+
const editTask = (record) => {
|
|
2860
2861
|
newTaskVisible.value = true;
|
|
2861
|
-
tempTask.value = {
|
|
2862
|
-
taskTemplateObj: __spreadValues({}, record)
|
|
2863
|
-
};
|
|
2862
|
+
tempTask.value = __spreadValues({}, record);
|
|
2864
2863
|
};
|
|
2865
2864
|
return {
|
|
2866
|
-
showEdit,
|
|
2867
2865
|
mainModal,
|
|
2868
2866
|
reviewModal,
|
|
2869
|
-
_submit,
|
|
2870
2867
|
newTaskVisible,
|
|
2871
2868
|
tempTask,
|
|
2872
2869
|
reviewModalVisible,
|
|
2873
2870
|
submitting,
|
|
2874
|
-
addedTasks
|
|
2871
|
+
addedTasks,
|
|
2872
|
+
writeQuery,
|
|
2873
|
+
editTask,
|
|
2874
|
+
_submit
|
|
2875
2875
|
};
|
|
2876
2876
|
}
|
|
2877
2877
|
});
|
|
@@ -2895,7 +2895,7 @@ var render$1 = function() {
|
|
|
2895
2895
|
_vm.reviewModalVisible = $event;
|
|
2896
2896
|
}, "update:review-modal-visible": function($event) {
|
|
2897
2897
|
_vm.reviewModalVisible = $event;
|
|
2898
|
-
}, "
|
|
2898
|
+
}, "editTask": _vm.editTask, "update:visible": function($event) {
|
|
2899
2899
|
return _vm.$emit("update:visible", $event);
|
|
2900
2900
|
} }, scopedSlots: _vm._u([{ key: "default", fn: function(ref2) {
|
|
2901
2901
|
var loading = ref2.loading;
|
|
@@ -2930,7 +2930,7 @@ var render$1 = function() {
|
|
|
2930
2930
|
var staticRenderFns$1 = [];
|
|
2931
2931
|
var index_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
2932
2932
|
const __cssModules$1 = {};
|
|
2933
|
-
var __component__$1 = /* @__PURE__ */ normalizeComponent(__vue2_script$1, render$1, staticRenderFns$1, false, __vue2_injectStyles$1, "
|
|
2933
|
+
var __component__$1 = /* @__PURE__ */ normalizeComponent(__vue2_script$1, render$1, staticRenderFns$1, false, __vue2_injectStyles$1, "5a18b070", null, null);
|
|
2934
2934
|
function __vue2_injectStyles$1(context) {
|
|
2935
2935
|
for (let o in __cssModules$1) {
|
|
2936
2936
|
this[o] = __cssModules$1[o];
|