@ailaw/venus 0.3.16 → 0.3.20
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 +115 -76
- 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-d9a5cb86]{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
|
@@ -17,9 +17,9 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import { defineComponent, ref as ref$1, watch, computed, toRefs as toRefs$1, shallowRef
|
|
20
|
+
import { defineComponent, ref as ref$1, watch, computed, toRefs as toRefs$1, shallowRef } from "vue-demi";
|
|
21
21
|
import { Select, Modal, Form, Input, Checkbox, Divider, Button, Tag, Tooltip, Upload, Row, Col, Radio, Table, Badge, Card, message } from "ant-design-vue";
|
|
22
|
-
import { useQuery, useResult, useMutation } from "@vue/apollo-composable";
|
|
22
|
+
import { useQuery, useResult, useMutation, useApolloClient } from "@vue/apollo-composable";
|
|
23
23
|
import gql from "graphql-tag";
|
|
24
24
|
import { path, uniqBy, prop } from "ramda";
|
|
25
25
|
import "vue";
|
|
@@ -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;
|
|
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 }).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, "d9a5cb86", null, null);
|
|
906
908
|
function __vue2_injectStyles$9(context) {
|
|
907
909
|
for (let o in __cssModules$9) {
|
|
908
910
|
this[o] = __cssModules$9[o];
|
|
@@ -2227,18 +2229,25 @@ var __vue2_script$5 = defineComponent({
|
|
|
2227
2229
|
key: "taskName",
|
|
2228
2230
|
scopedSlots: { customRender: "taskName" }
|
|
2229
2231
|
},
|
|
2232
|
+
{
|
|
2233
|
+
title: t("message.assignee"),
|
|
2234
|
+
dataIndex: "isEmployee",
|
|
2235
|
+
key: "isEmployee",
|
|
2236
|
+
width: 120,
|
|
2237
|
+
scopedSlots: { customRender: "isEmployee" }
|
|
2238
|
+
},
|
|
2230
2239
|
{
|
|
2231
2240
|
title: t("message.tag"),
|
|
2232
2241
|
dataIndex: "tagList",
|
|
2233
2242
|
key: "tagList",
|
|
2234
|
-
width:
|
|
2243
|
+
width: 120,
|
|
2235
2244
|
scopedSlots: { customRender: "tagList" }
|
|
2236
2245
|
},
|
|
2237
2246
|
{
|
|
2238
2247
|
title: "Operation",
|
|
2239
2248
|
dataIndex: "id",
|
|
2240
2249
|
key: "id",
|
|
2241
|
-
width:
|
|
2250
|
+
width: 210,
|
|
2242
2251
|
scopedSlots: { customRender: "operation" }
|
|
2243
2252
|
}
|
|
2244
2253
|
];
|
|
@@ -2256,7 +2265,9 @@ var render$5 = function() {
|
|
|
2256
2265
|
return _c("div", [_c("ant-table", { attrs: { "dataSource": _vm.dataSource, "rowKey": "id", "columns": _vm.columns, "pagination": _vm.pagination, "loading": _vm.loading }, on: { "change": function($event) {
|
|
2257
2266
|
return _vm.$emit("changePagination", $event);
|
|
2258
2267
|
} }, scopedSlots: _vm._u([{ key: "taskName", fn: function(text, record) {
|
|
2259
|
-
return _c("span", {}, [_c("span", { staticStyle: { "display": "inline-block", "width": "250px" } }, [_vm._v(_vm._s(text))])
|
|
2268
|
+
return _c("span", {}, [_c("span", { staticStyle: { "display": "inline-block", "width": "250px" } }, [_vm._v(_vm._s(text))])]);
|
|
2269
|
+
} }, { key: "isEmployee", fn: function(isEmployee) {
|
|
2270
|
+
return _c("span", {}, [_c("assignee-tag", { attrs: { "assignee-type": isEmployee } })], 1);
|
|
2260
2271
|
} }, { key: "tagList", fn: function(tags) {
|
|
2261
2272
|
return [_c("tags-with-tooltip", { attrs: { "tags": tags } })];
|
|
2262
2273
|
} }, { key: "operation", fn: function(_, record) {
|
|
@@ -2272,7 +2283,7 @@ var render$5 = function() {
|
|
|
2272
2283
|
var staticRenderFns$5 = [];
|
|
2273
2284
|
var TaskTablePure_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
2274
2285
|
const __cssModules$5 = {};
|
|
2275
|
-
var __component__$5 = /* @__PURE__ */ normalizeComponent(__vue2_script$5, render$5, staticRenderFns$5, false, __vue2_injectStyles$5, "
|
|
2286
|
+
var __component__$5 = /* @__PURE__ */ normalizeComponent(__vue2_script$5, render$5, staticRenderFns$5, false, __vue2_injectStyles$5, "cbdc9a40", null, null);
|
|
2276
2287
|
function __vue2_injectStyles$5(context) {
|
|
2277
2288
|
for (let o in __cssModules$5) {
|
|
2278
2289
|
this[o] = __cssModules$5[o];
|
|
@@ -2284,12 +2295,18 @@ var TaskTablePure = /* @__PURE__ */ function() {
|
|
|
2284
2295
|
var useSearchTaskTemplates = (pagination, conditions = ref$1({}), lawFirmId) => {
|
|
2285
2296
|
const startIndex = computed(() => (pagination.value.current - 1) * pagination.value.pageSize);
|
|
2286
2297
|
const endIndex = computed(() => startIndex.value + pagination.value.pageSize);
|
|
2298
|
+
watch(() => conditions.value, () => {
|
|
2299
|
+
pagination.value.current = 1;
|
|
2300
|
+
pagination.value.total = 0;
|
|
2301
|
+
});
|
|
2287
2302
|
return useQuery(SearchTaskTemplatesQuery, () => ({
|
|
2288
2303
|
query: {
|
|
2289
2304
|
includeGallery: true,
|
|
2290
2305
|
keywords: conditions.value.keywords || "",
|
|
2291
2306
|
isEmployee: conditions.value.isEmployee,
|
|
2292
|
-
taskTemplateId: conditions.value.taskTemplateId
|
|
2307
|
+
taskTemplateId: conditions.value.taskTemplateId,
|
|
2308
|
+
sortBy: TaskTemplateSortBy.name,
|
|
2309
|
+
sortOrder: SortOrder.asc
|
|
2293
2310
|
},
|
|
2294
2311
|
startIndex: startIndex.value,
|
|
2295
2312
|
endIndex: endIndex.value,
|
|
@@ -2339,8 +2356,7 @@ var useTaskActions = (addedTasks, emit) => {
|
|
|
2339
2356
|
const taskToAdd = {
|
|
2340
2357
|
taskTemplateObj: record
|
|
2341
2358
|
};
|
|
2342
|
-
emit("
|
|
2343
|
-
emit("update:newTaskVisible", true);
|
|
2359
|
+
emit("editTask", taskToAdd);
|
|
2344
2360
|
};
|
|
2345
2361
|
const removeTask = (record) => emit("update:addedTasks", addedTasks.value.filter(({ id }) => id !== record.id));
|
|
2346
2362
|
return {
|
|
@@ -2360,11 +2376,11 @@ var useSearchTaskConditions = () => ref$1({
|
|
|
2360
2376
|
var useTaskTemplateTableData = (props, emit) => {
|
|
2361
2377
|
const initialPagination = ref$1({
|
|
2362
2378
|
current: 1,
|
|
2363
|
-
pageSize: props.pageSize ||
|
|
2379
|
+
pageSize: props.pageSize || 10,
|
|
2364
2380
|
total: 0
|
|
2365
2381
|
});
|
|
2366
2382
|
const { conditions = useSearchTaskConditions(), addedTasks = ref$1([]) } = toRefs$1(props);
|
|
2367
|
-
const { result, loading,
|
|
2383
|
+
const { result, loading, variables } = useSearchTaskTemplates(initialPagination, conditions, props.lawFirmId);
|
|
2368
2384
|
const dataSource = computed(() => {
|
|
2369
2385
|
var _a;
|
|
2370
2386
|
return ((_a = result.value) == null ? void 0 : _a.taskTemplateSearch.taskTemplateList) || [];
|
|
@@ -2389,9 +2405,9 @@ var useTaskTemplateTableData = (props, emit) => {
|
|
|
2389
2405
|
dataSource,
|
|
2390
2406
|
result,
|
|
2391
2407
|
loading,
|
|
2392
|
-
refetch,
|
|
2393
2408
|
conditions,
|
|
2394
|
-
addedTasks
|
|
2409
|
+
addedTasks,
|
|
2410
|
+
variables
|
|
2395
2411
|
};
|
|
2396
2412
|
};
|
|
2397
2413
|
var __vue2_script$4 = defineComponent({
|
|
@@ -2419,9 +2435,9 @@ var __vue2_script$4 = defineComponent({
|
|
|
2419
2435
|
setup(props, { emit }) {
|
|
2420
2436
|
const {
|
|
2421
2437
|
loading,
|
|
2422
|
-
refetch,
|
|
2423
2438
|
dataSource,
|
|
2424
2439
|
pagination,
|
|
2440
|
+
variables,
|
|
2425
2441
|
changePagination,
|
|
2426
2442
|
addTask,
|
|
2427
2443
|
editTask,
|
|
@@ -2429,14 +2445,14 @@ var __vue2_script$4 = defineComponent({
|
|
|
2429
2445
|
} = useTaskTemplateTableData(props, emit);
|
|
2430
2446
|
return {
|
|
2431
2447
|
loading,
|
|
2432
|
-
refetch,
|
|
2433
2448
|
dataSource,
|
|
2434
2449
|
pagination,
|
|
2435
2450
|
AssigneeTypesText,
|
|
2436
2451
|
changePagination,
|
|
2437
2452
|
addTask,
|
|
2438
2453
|
editTask,
|
|
2439
|
-
removeTask
|
|
2454
|
+
removeTask,
|
|
2455
|
+
variables
|
|
2440
2456
|
};
|
|
2441
2457
|
}
|
|
2442
2458
|
});
|
|
@@ -2451,7 +2467,7 @@ var render$4 = function() {
|
|
|
2451
2467
|
var staticRenderFns$4 = [];
|
|
2452
2468
|
var TaskTable_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
2453
2469
|
const __cssModules$4 = {};
|
|
2454
|
-
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);
|
|
2455
2471
|
function __vue2_injectStyles$4(context) {
|
|
2456
2472
|
for (let o in __cssModules$4) {
|
|
2457
2473
|
this[o] = __cssModules$4[o];
|
|
@@ -2489,17 +2505,23 @@ var __vue2_script$3 = defineComponent({
|
|
|
2489
2505
|
},
|
|
2490
2506
|
pageSize: {
|
|
2491
2507
|
type: Number
|
|
2508
|
+
},
|
|
2509
|
+
openReviewButtonText: {
|
|
2510
|
+
type: String,
|
|
2511
|
+
default: "Review and add to template"
|
|
2492
2512
|
}
|
|
2493
2513
|
},
|
|
2494
2514
|
setup(props, { emit }) {
|
|
2495
|
-
const taskTable = ref$1(
|
|
2515
|
+
const taskTable = ref$1();
|
|
2496
2516
|
const conditions = useSearchTaskConditions();
|
|
2497
2517
|
const currentComponent = shallowRef(props.showPage ? Card : Modal);
|
|
2498
2518
|
const editAction = (record) => {
|
|
2499
|
-
emit("
|
|
2519
|
+
emit("editTask", record);
|
|
2500
2520
|
};
|
|
2521
|
+
const getVariables = () => taskTable.value.variables;
|
|
2501
2522
|
return {
|
|
2502
2523
|
editAction,
|
|
2524
|
+
getVariables,
|
|
2503
2525
|
taskTable,
|
|
2504
2526
|
conditions,
|
|
2505
2527
|
AssigneeTypes,
|
|
@@ -2518,17 +2540,15 @@ var render$3 = function() {
|
|
|
2518
2540
|
return _vm.$emit("update:visible", false);
|
|
2519
2541
|
} } }, [_vm._v("Cancel ")]), _c("ant-badge", { attrs: { "count": _vm.addedTasks.length } }, [_c("ant-button", { attrs: { "disabled": _vm.addedTasks.length === 0, "type": "primary" }, on: { "click": function($event) {
|
|
2520
2542
|
return _vm.$emit("update:reviewModalVisible", true);
|
|
2521
|
-
} } }, [_vm._v(" " + _vm._s(_vm
|
|
2543
|
+
} } }, [_vm._v(" " + _vm._s(_vm.openReviewButtonText) + " ")])], 1)];
|
|
2522
2544
|
}, proxy: true }]) }, [_c("task-template-filter", { attrs: { "show-task-home-page-link": true, "task-setting-page-url": _vm.taskSettingPageUrl, "conditions": _vm.conditions, "inline": !!_vm.showPage }, on: { "update:conditions": function($event) {
|
|
2523
2545
|
_vm.conditions = $event;
|
|
2524
2546
|
}, "update:newTaskVisible": function($event) {
|
|
2525
2547
|
return _vm.$emit("update:newTaskVisible", true);
|
|
2526
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) {
|
|
2527
2549
|
return _vm.$emit("update:addedTasks", $event);
|
|
2528
|
-
}, "
|
|
2529
|
-
return _vm.$emit("
|
|
2530
|
-
}, "update:newTaskVisible": function($event) {
|
|
2531
|
-
return _vm.$emit("update:newTaskVisible", $event);
|
|
2550
|
+
}, "editTask": function($event) {
|
|
2551
|
+
return _vm.$emit("editTask", $event);
|
|
2532
2552
|
} }, scopedSlots: _vm._u([{ key: "default", fn: function(ref2) {
|
|
2533
2553
|
var loading = ref2.loading;
|
|
2534
2554
|
var dataSource = ref2.dataSource;
|
|
@@ -2540,7 +2560,7 @@ var render$3 = function() {
|
|
|
2540
2560
|
var staticRenderFns$3 = [];
|
|
2541
2561
|
var MainModal_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
2542
2562
|
const __cssModules$3 = {};
|
|
2543
|
-
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);
|
|
2544
2564
|
function __vue2_injectStyles$3(context) {
|
|
2545
2565
|
for (let o in __cssModules$3) {
|
|
2546
2566
|
this[o] = __cssModules$3[o];
|
|
@@ -2592,7 +2612,7 @@ var __vue2_script$2 = defineComponent({
|
|
|
2592
2612
|
const pagination = ref$1({
|
|
2593
2613
|
total: addedTasks.value.length,
|
|
2594
2614
|
current: 1,
|
|
2595
|
-
pageSize:
|
|
2615
|
+
pageSize: 10
|
|
2596
2616
|
});
|
|
2597
2617
|
const changePagination = (newPagination) => {
|
|
2598
2618
|
pagination.value = newPagination;
|
|
@@ -2631,7 +2651,7 @@ var render$2 = function() {
|
|
|
2631
2651
|
var staticRenderFns$2 = [];
|
|
2632
2652
|
var ReviewModal_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
2633
2653
|
const __cssModules$2 = {};
|
|
2634
|
-
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);
|
|
2635
2655
|
function __vue2_injectStyles$2(context) {
|
|
2636
2656
|
for (let o in __cssModules$2) {
|
|
2637
2657
|
this[o] = __cssModules$2[o];
|
|
@@ -2747,6 +2767,10 @@ var __vue2_script$1 = defineComponent({
|
|
|
2747
2767
|
type: String,
|
|
2748
2768
|
default: "Add"
|
|
2749
2769
|
},
|
|
2770
|
+
openReviewButtonText: {
|
|
2771
|
+
type: String,
|
|
2772
|
+
default: "Review and add to template"
|
|
2773
|
+
},
|
|
2750
2774
|
showSendEmail: {
|
|
2751
2775
|
type: Boolean,
|
|
2752
2776
|
default: false
|
|
@@ -2771,6 +2795,7 @@ var __vue2_script$1 = defineComponent({
|
|
|
2771
2795
|
}
|
|
2772
2796
|
},
|
|
2773
2797
|
setup(props, { emit }) {
|
|
2798
|
+
const { client } = useApolloClient();
|
|
2774
2799
|
const mainModal = ref$1();
|
|
2775
2800
|
const reviewModal = ref$1();
|
|
2776
2801
|
const newTaskVisible = ref$1(false);
|
|
@@ -2779,60 +2804,74 @@ var __vue2_script$1 = defineComponent({
|
|
|
2779
2804
|
const updateTemplate = useMutateTaskTemplate();
|
|
2780
2805
|
const createTemplate = useCreateTaskTemplate();
|
|
2781
2806
|
const addedTasks = ref$1([]);
|
|
2782
|
-
onMounted(() => {
|
|
2783
|
-
const { value, lawFirmId } = props;
|
|
2784
|
-
if (!value.length)
|
|
2785
|
-
return;
|
|
2786
|
-
const conditions = ref$1({
|
|
2787
|
-
taskTemplateId: value
|
|
2788
|
-
});
|
|
2789
|
-
const { result } = useSearchTaskTemplates(ref$1({ current: 1, pageSize: 1e3, total: 0 }), conditions, lawFirmId);
|
|
2790
|
-
watch(() => result.value, () => {
|
|
2791
|
-
var _a, _b;
|
|
2792
|
-
addedTasks.value = ((_b = (_a = result.value) == null ? void 0 : _a.taskTemplateSearch) == null ? void 0 : _b.taskTemplateList) || [];
|
|
2793
|
-
});
|
|
2794
|
-
});
|
|
2795
2807
|
watch(() => newTaskVisible.value, (visible) => {
|
|
2796
2808
|
if (!visible) {
|
|
2797
2809
|
tempTask.value = defaultTaskTemplate;
|
|
2798
2810
|
}
|
|
2799
2811
|
});
|
|
2812
|
+
const updateReviewModalContent = (record, newRecord) => {
|
|
2813
|
+
if (reviewModalVisible.value) {
|
|
2814
|
+
const newValue = addedTasks.value.map((originTask) => {
|
|
2815
|
+
if (originTask.id === record.taskTemplateId) {
|
|
2816
|
+
return newRecord;
|
|
2817
|
+
}
|
|
2818
|
+
return originTask;
|
|
2819
|
+
});
|
|
2820
|
+
emit("update:value", newValue.map(({ id }) => id));
|
|
2821
|
+
}
|
|
2822
|
+
};
|
|
2823
|
+
const writeQuery = (id, newRecord) => {
|
|
2824
|
+
const variables = mainModal.value.getVariables();
|
|
2825
|
+
const existed = client.readQuery({
|
|
2826
|
+
query: SearchTaskTemplatesQuery,
|
|
2827
|
+
variables
|
|
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
|
+
};
|
|
2800
2846
|
const _submit = async (record) => {
|
|
2801
2847
|
const {
|
|
2802
2848
|
newRecord,
|
|
2803
|
-
success
|
|
2849
|
+
success,
|
|
2850
|
+
isUpdate
|
|
2804
2851
|
} = await submit(record, updateTemplate, createTemplate);
|
|
2805
2852
|
if (success) {
|
|
2853
|
+
if (!isUpdate)
|
|
2854
|
+
writeQuery(record.taskTemplateId, newRecord);
|
|
2806
2855
|
newTaskVisible.value = false;
|
|
2807
|
-
|
|
2808
|
-
if (reviewModalVisible.value) {
|
|
2809
|
-
const newValue = addedTasks.value.map((originTask) => {
|
|
2810
|
-
if (originTask.id === record.taskTemplateId) {
|
|
2811
|
-
return newRecord;
|
|
2812
|
-
}
|
|
2813
|
-
return originTask;
|
|
2814
|
-
});
|
|
2815
|
-
emit("update:value", newValue.map(({ id }) => id));
|
|
2816
|
-
}
|
|
2856
|
+
updateReviewModalContent(record, newRecord);
|
|
2817
2857
|
}
|
|
2818
2858
|
};
|
|
2819
2859
|
const submitting = computed(() => updateTemplate.loading.value || createTemplate.loading.value);
|
|
2820
|
-
const
|
|
2860
|
+
const editTask = (record) => {
|
|
2821
2861
|
newTaskVisible.value = true;
|
|
2822
|
-
tempTask.value = {
|
|
2823
|
-
taskTemplateObj: __spreadValues({}, record)
|
|
2824
|
-
};
|
|
2862
|
+
tempTask.value = __spreadValues({}, record);
|
|
2825
2863
|
};
|
|
2826
2864
|
return {
|
|
2827
|
-
showEdit,
|
|
2828
2865
|
mainModal,
|
|
2829
2866
|
reviewModal,
|
|
2830
|
-
_submit,
|
|
2831
2867
|
newTaskVisible,
|
|
2832
2868
|
tempTask,
|
|
2833
2869
|
reviewModalVisible,
|
|
2834
2870
|
submitting,
|
|
2835
|
-
addedTasks
|
|
2871
|
+
addedTasks,
|
|
2872
|
+
writeQuery,
|
|
2873
|
+
editTask,
|
|
2874
|
+
_submit
|
|
2836
2875
|
};
|
|
2837
2876
|
}
|
|
2838
2877
|
});
|
|
@@ -2840,10 +2879,14 @@ var render$1 = function() {
|
|
|
2840
2879
|
var _vm = this;
|
|
2841
2880
|
var _h = _vm.$createElement;
|
|
2842
2881
|
var _c = _vm._self._c || _h;
|
|
2843
|
-
return _c("div", { attrs: { "id": "venus-component-task-cart" } }, [_c("main-modal", { ref: "mainModal", attrs: { "
|
|
2882
|
+
return _c("div", { attrs: { "id": "venus-component-task-cart" } }, [_c("main-modal", { ref: "mainModal", attrs: { "visible": _vm.visible, "show-page": _vm.pageMode, "page-size": _vm.pageSize, "law-firm-id": _vm.lawFirmId, "tempTask": _vm.tempTask, "added-tasks": _vm.addedTasks, "newTaskVisible": _vm.newTaskVisible, "task-setting-page-url": _vm.taskSettingPageUrl, "reviewModalVisible": _vm.reviewModalVisible, "open-review-button-text": _vm.openReviewButtonText }, on: { "update:tempTask": function($event) {
|
|
2844
2883
|
_vm.tempTask = $event;
|
|
2845
2884
|
}, "update:temp-task": function($event) {
|
|
2846
2885
|
_vm.tempTask = $event;
|
|
2886
|
+
}, "update:addedTasks": function($event) {
|
|
2887
|
+
_vm.addedTasks = $event;
|
|
2888
|
+
}, "update:added-tasks": function($event) {
|
|
2889
|
+
_vm.addedTasks = $event;
|
|
2847
2890
|
}, "update:newTaskVisible": function($event) {
|
|
2848
2891
|
_vm.newTaskVisible = $event;
|
|
2849
2892
|
}, "update:new-task-visible": function($event) {
|
|
@@ -2852,37 +2895,33 @@ var render$1 = function() {
|
|
|
2852
2895
|
_vm.reviewModalVisible = $event;
|
|
2853
2896
|
}, "update:review-modal-visible": function($event) {
|
|
2854
2897
|
_vm.reviewModalVisible = $event;
|
|
2855
|
-
}, "update:
|
|
2856
|
-
_vm.addedTasks = $event;
|
|
2857
|
-
}, "update:added-tasks": function($event) {
|
|
2858
|
-
_vm.addedTasks = $event;
|
|
2859
|
-
}, "update:visible": function($event) {
|
|
2898
|
+
}, "editTask": _vm.editTask, "update:visible": function($event) {
|
|
2860
2899
|
return _vm.$emit("update:visible", $event);
|
|
2861
|
-
}
|
|
2900
|
+
} }, scopedSlots: _vm._u([{ key: "default", fn: function(ref2) {
|
|
2862
2901
|
var loading = ref2.loading;
|
|
2863
2902
|
var dataSource = ref2.dataSource;
|
|
2864
2903
|
var pagination = ref2.pagination;
|
|
2865
2904
|
var changePagination = ref2.changePagination;
|
|
2866
2905
|
return [_vm._t("table", null, { "loading": loading, "dataSource": dataSource, "pagination": pagination, "changePagination": changePagination })];
|
|
2867
|
-
} }], null, true) }), _c("review-modal", { ref: "reviewModal", attrs: { "
|
|
2906
|
+
} }], null, true) }), _c("review-modal", { ref: "reviewModal", attrs: { "sendEmail": _vm.sendEmail, "allow-clear": _vm.allowClear, "tempTask": _vm.tempTask, "review-text": _vm.reviewText, "added-tasks": _vm.addedTasks, "showSendEmail": _vm.showSendEmail, "visible": _vm.reviewModalVisible, "newTaskVisible": _vm.newTaskVisible }, on: { "update:tempTask": function($event) {
|
|
2868
2907
|
_vm.tempTask = $event;
|
|
2869
2908
|
}, "update:temp-task": function($event) {
|
|
2870
2909
|
_vm.tempTask = $event;
|
|
2910
|
+
}, "update:addedTasks": function($event) {
|
|
2911
|
+
_vm.addedTasks = $event;
|
|
2912
|
+
}, "update:added-tasks": function($event) {
|
|
2913
|
+
_vm.addedTasks = $event;
|
|
2871
2914
|
}, "update:visible": function($event) {
|
|
2872
2915
|
_vm.reviewModalVisible = $event;
|
|
2873
2916
|
}, "update:newTaskVisible": function($event) {
|
|
2874
2917
|
_vm.newTaskVisible = $event;
|
|
2875
2918
|
}, "update:new-task-visible": function($event) {
|
|
2876
2919
|
_vm.newTaskVisible = $event;
|
|
2877
|
-
}, "update:addedTasks": function($event) {
|
|
2878
|
-
_vm.addedTasks = $event;
|
|
2879
|
-
}, "update:added-tasks": function($event) {
|
|
2880
|
-
_vm.addedTasks = $event;
|
|
2881
|
-
}, "update:sendEmail": function($event) {
|
|
2882
|
-
return _vm.$emit("update:sendEmail", $event);
|
|
2883
2920
|
}, "submit": function($event) {
|
|
2884
2921
|
return _vm.$emit("submit", $event);
|
|
2885
|
-
}
|
|
2922
|
+
}, "update:sendEmail": function($event) {
|
|
2923
|
+
return _vm.$emit("update:sendEmail", $event);
|
|
2924
|
+
} } }), _c("new-task", { attrs: { "user-id": _vm.userId, "loading": _vm.submitting, "value": _vm.tempTask, "law-firm-id": _vm.lawFirmId, "visible": _vm.newTaskVisible, "upload-files-func": _vm.uploadFilesFunc }, on: { "update:value": function($event) {
|
|
2886
2925
|
_vm.tempTask = $event;
|
|
2887
2926
|
}, "update:visible": function($event) {
|
|
2888
2927
|
_vm.newTaskVisible = $event;
|
|
@@ -2891,7 +2930,7 @@ var render$1 = function() {
|
|
|
2891
2930
|
var staticRenderFns$1 = [];
|
|
2892
2931
|
var index_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
2893
2932
|
const __cssModules$1 = {};
|
|
2894
|
-
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);
|
|
2895
2934
|
function __vue2_injectStyles$1(context) {
|
|
2896
2935
|
for (let o in __cssModules$1) {
|
|
2897
2936
|
this[o] = __cssModules$1[o];
|