@ailaw/venus 0.3.7 → 0.3.11
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 +93 -70
- 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-d2a7dbe0]{border:1px solid #cccccc;border-radius:6px;padding:0 4px;min-height:30px;cursor:pointer}.taskTemplateInline[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-d2a7dbe0]{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
|
@@ -1083,7 +1083,7 @@ var __vue2_script$7 = defineComponent({
|
|
|
1083
1083
|
const nameError = ref$1(false);
|
|
1084
1084
|
const typeError = ref$1(false);
|
|
1085
1085
|
const changeVal = useChangeVal(props, emit);
|
|
1086
|
-
const
|
|
1086
|
+
const submit2 = () => {
|
|
1087
1087
|
taskForm.value.validFields((passed, ts) => {
|
|
1088
1088
|
if (passed) {
|
|
1089
1089
|
const data = {
|
|
@@ -1112,7 +1112,7 @@ var __vue2_script$7 = defineComponent({
|
|
|
1112
1112
|
emit("update:value", data);
|
|
1113
1113
|
};
|
|
1114
1114
|
return {
|
|
1115
|
-
submit,
|
|
1115
|
+
submit: submit2,
|
|
1116
1116
|
taskForm,
|
|
1117
1117
|
changeVisible,
|
|
1118
1118
|
changeVal,
|
|
@@ -1171,6 +1171,10 @@ var __vue2_script$6 = defineComponent({
|
|
|
1171
1171
|
inline: {
|
|
1172
1172
|
type: Boolean,
|
|
1173
1173
|
default: false
|
|
1174
|
+
},
|
|
1175
|
+
width: {
|
|
1176
|
+
type: Number,
|
|
1177
|
+
default: 300
|
|
1174
1178
|
}
|
|
1175
1179
|
},
|
|
1176
1180
|
setup(props, { emit }) {
|
|
@@ -1193,7 +1197,7 @@ var render$6 = function() {
|
|
|
1193
1197
|
var _vm = this;
|
|
1194
1198
|
var _h = _vm.$createElement;
|
|
1195
1199
|
var _c = _vm._self._c || _h;
|
|
1196
|
-
return _c("div", { staticClass: "filter mb-5" }, [_c("ant-input", {
|
|
1200
|
+
return _c("div", { staticClass: "filter mb-5" }, [_c("ant-input", { style: "width:" + _vm.width + "px", attrs: { "value": _vm.conditions.keywords }, on: { "input": function($event) {
|
|
1197
1201
|
return _vm.changeVal("keywords", $event.target.value);
|
|
1198
1202
|
} }, scopedSlots: _vm._u([{ key: "suffix", fn: function() {
|
|
1199
1203
|
return void 0;
|
|
@@ -1206,7 +1210,7 @@ var render$6 = function() {
|
|
|
1206
1210
|
var staticRenderFns$6 = [];
|
|
1207
1211
|
var index_vue_vue_type_style_index_0_scoped_true_lang$1 = "";
|
|
1208
1212
|
const __cssModules$6 = {};
|
|
1209
|
-
var __component__$6 = /* @__PURE__ */ normalizeComponent(__vue2_script$6, render$6, staticRenderFns$6, false, __vue2_injectStyles$6, "
|
|
1213
|
+
var __component__$6 = /* @__PURE__ */ normalizeComponent(__vue2_script$6, render$6, staticRenderFns$6, false, __vue2_injectStyles$6, "5128ec2c", null, null);
|
|
1210
1214
|
function __vue2_injectStyles$6(context) {
|
|
1211
1215
|
for (let o in __cssModules$6) {
|
|
1212
1216
|
this[o] = __cssModules$6[o];
|
|
@@ -2351,13 +2355,21 @@ var useTaskActions = (addedTasks, emit) => {
|
|
|
2351
2355
|
removeTask
|
|
2352
2356
|
};
|
|
2353
2357
|
};
|
|
2358
|
+
var useSearchTaskConditions = () => ref$1({
|
|
2359
|
+
keywords: "",
|
|
2360
|
+
isEmployee: [
|
|
2361
|
+
AssigneeTypes.ATTORNEY,
|
|
2362
|
+
AssigneeTypes.PETITIONER,
|
|
2363
|
+
AssigneeTypes.BENEFICIARY
|
|
2364
|
+
]
|
|
2365
|
+
});
|
|
2354
2366
|
var useTaskTemplateTableData = (props, emit) => {
|
|
2355
2367
|
const initialPagination = ref$1({
|
|
2356
2368
|
current: 1,
|
|
2357
2369
|
pageSize: 6,
|
|
2358
2370
|
total: 0
|
|
2359
2371
|
});
|
|
2360
|
-
const { conditions, addedTasks = ref$1([]) } = toRefs$1(props);
|
|
2372
|
+
const { conditions = useSearchTaskConditions(), addedTasks = ref$1([]) } = toRefs$1(props);
|
|
2361
2373
|
const { result, loading, refetch } = useSearchTaskTemplates(initialPagination, conditions, props.lawFirmId);
|
|
2362
2374
|
const dataSource = computed(() => {
|
|
2363
2375
|
var _a2;
|
|
@@ -2400,7 +2412,8 @@ var __vue2_script$4 = defineComponent({
|
|
|
2400
2412
|
},
|
|
2401
2413
|
addedTasks: {
|
|
2402
2414
|
type: Array,
|
|
2403
|
-
required: true
|
|
2415
|
+
required: true,
|
|
2416
|
+
default: () => []
|
|
2404
2417
|
},
|
|
2405
2418
|
lawFirmId: {
|
|
2406
2419
|
type: Number,
|
|
@@ -2435,12 +2448,14 @@ var render$4 = function() {
|
|
|
2435
2448
|
var _vm = this;
|
|
2436
2449
|
var _h = _vm.$createElement;
|
|
2437
2450
|
var _c = _vm._self._c || _h;
|
|
2438
|
-
return _c("
|
|
2451
|
+
return _c("div", [_vm._t("default", function() {
|
|
2452
|
+
return [_c("task-table-pure", { attrs: { "loading": _vm.loading, "data-source": _vm.dataSource, "pagination": _vm.pagination, "added-tasks": _vm.addedTasks }, on: { "editTask": _vm.editTask, "addTask": _vm.addTask, "removeTask": _vm.removeTask, "changePagination": _vm.changePagination } })];
|
|
2453
|
+
}, { "refetch": _vm.refetch, "loading": _vm.loading, "dataSource": _vm.dataSource, "pagination": _vm.pagination, "AssigneeTypesText": _vm.AssigneeTypesText, "changePagination": _vm.changePagination })], 2);
|
|
2439
2454
|
};
|
|
2440
2455
|
var staticRenderFns$4 = [];
|
|
2441
2456
|
var TaskTable_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
2442
2457
|
const __cssModules$4 = {};
|
|
2443
|
-
var __component__$4 = /* @__PURE__ */ normalizeComponent(__vue2_script$4, render$4, staticRenderFns$4, false, __vue2_injectStyles$4, "
|
|
2458
|
+
var __component__$4 = /* @__PURE__ */ normalizeComponent(__vue2_script$4, render$4, staticRenderFns$4, false, __vue2_injectStyles$4, "e6659ace", null, null);
|
|
2444
2459
|
function __vue2_injectStyles$4(context) {
|
|
2445
2460
|
for (let o in __cssModules$4) {
|
|
2446
2461
|
this[o] = __cssModules$4[o];
|
|
@@ -2449,14 +2464,6 @@ function __vue2_injectStyles$4(context) {
|
|
|
2449
2464
|
var TaskTable = /* @__PURE__ */ function() {
|
|
2450
2465
|
return __component__$4.exports;
|
|
2451
2466
|
}();
|
|
2452
|
-
var useSearchTaskConditions = () => ref$1({
|
|
2453
|
-
keywords: "",
|
|
2454
|
-
isEmployee: [
|
|
2455
|
-
AssigneeTypes.ATTORNEY,
|
|
2456
|
-
AssigneeTypes.PETITIONER,
|
|
2457
|
-
AssigneeTypes.BENEFICIARY
|
|
2458
|
-
]
|
|
2459
|
-
});
|
|
2460
2467
|
var __vue2_script$3 = defineComponent({
|
|
2461
2468
|
name: "MainModal",
|
|
2462
2469
|
components: {
|
|
@@ -2521,7 +2528,7 @@ var render$3 = function() {
|
|
|
2521
2528
|
var staticRenderFns$3 = [];
|
|
2522
2529
|
var MainModal_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
2523
2530
|
const __cssModules$3 = {};
|
|
2524
|
-
var __component__$3 = /* @__PURE__ */ normalizeComponent(__vue2_script$3, render$3, staticRenderFns$3, false, __vue2_injectStyles$3, "
|
|
2531
|
+
var __component__$3 = /* @__PURE__ */ normalizeComponent(__vue2_script$3, render$3, staticRenderFns$3, false, __vue2_injectStyles$3, "2c7f2404", null, null);
|
|
2525
2532
|
function __vue2_injectStyles$3(context) {
|
|
2526
2533
|
for (let o in __cssModules$3) {
|
|
2527
2534
|
this[o] = __cssModules$3[o];
|
|
@@ -2623,47 +2630,73 @@ var ReviewModal = /* @__PURE__ */ function() {
|
|
|
2623
2630
|
}();
|
|
2624
2631
|
const useMutateTaskTemplate = () => useMutation(UpdateTaskTemplateMutation);
|
|
2625
2632
|
const useCreateTaskTemplate = () => useMutation(CreateTaskTemplateMutation);
|
|
2633
|
+
const submit = async (record, updateTemplate, createTemplate) => {
|
|
2634
|
+
var _a2, _b, _c, _d;
|
|
2635
|
+
let newRecord = {};
|
|
2636
|
+
let res;
|
|
2637
|
+
let success;
|
|
2638
|
+
const isUpdate = !!record.taskTemplateId;
|
|
2639
|
+
if (isUpdate) {
|
|
2640
|
+
res = await updateTemplate.mutate(record);
|
|
2641
|
+
newRecord = ((_a2 = res == null ? void 0 : res.data) == null ? void 0 : _a2.updateTaskTemplate.updatedTaskTemplate) || {};
|
|
2642
|
+
success = ((_b = res == null ? void 0 : res.data) == null ? void 0 : _b.updateTaskTemplate.code) === ResponseCode.success;
|
|
2643
|
+
} else {
|
|
2644
|
+
res = await createTemplate.mutate(record);
|
|
2645
|
+
newRecord = ((_c = res == null ? void 0 : res.data) == null ? void 0 : _c.createTaskTemplate.newTaskTemplate) || {};
|
|
2646
|
+
success = ((_d = res == null ? void 0 : res.data) == null ? void 0 : _d.createTaskTemplate.code) === ResponseCode.success;
|
|
2647
|
+
}
|
|
2648
|
+
if (success) {
|
|
2649
|
+
message.success("Success!");
|
|
2650
|
+
} else {
|
|
2651
|
+
message.error("Failed!");
|
|
2652
|
+
}
|
|
2653
|
+
return {
|
|
2654
|
+
isUpdate,
|
|
2655
|
+
newRecord,
|
|
2656
|
+
success
|
|
2657
|
+
};
|
|
2658
|
+
};
|
|
2626
2659
|
const UpdateTaskTemplateMutation = gql`
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
) {
|
|
2633
|
-
updateTaskTemplate(
|
|
2634
|
-
selfUserId: $selfUserId
|
|
2635
|
-
selfLawFirmId: $selfLawFirmId
|
|
2636
|
-
taskTemplateObj: $taskTemplateObj
|
|
2637
|
-
taskTemplateId: $taskTemplateId
|
|
2660
|
+
mutation updateTaskTemplate(
|
|
2661
|
+
$selfUserId: Int!
|
|
2662
|
+
$selfLawFirmId: Int!
|
|
2663
|
+
$taskTemplateObj: TaskTemplateInput!
|
|
2664
|
+
$taskTemplateId: Int!
|
|
2638
2665
|
) {
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2666
|
+
updateTaskTemplate(
|
|
2667
|
+
selfUserId: $selfUserId
|
|
2668
|
+
selfLawFirmId: $selfLawFirmId
|
|
2669
|
+
taskTemplateObj: $taskTemplateObj
|
|
2670
|
+
taskTemplateId: $taskTemplateId
|
|
2671
|
+
) {
|
|
2672
|
+
code
|
|
2673
|
+
message
|
|
2674
|
+
updatedTaskTemplate {
|
|
2675
|
+
...taskTemplate
|
|
2676
|
+
}
|
|
2677
|
+
}
|
|
2644
2678
|
}
|
|
2645
|
-
|
|
2646
|
-
${taskTemplateFragment}
|
|
2679
|
+
${taskTemplateFragment}
|
|
2647
2680
|
`;
|
|
2648
2681
|
const CreateTaskTemplateMutation = gql`
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
) {
|
|
2654
|
-
createTaskTemplate(
|
|
2655
|
-
selfUserId: $selfUserId
|
|
2656
|
-
selfLawFirmId: $selfLawFirmId
|
|
2657
|
-
taskTemplateObj: $taskTemplateObj
|
|
2682
|
+
mutation createTaskTemplate(
|
|
2683
|
+
$selfUserId: Int!
|
|
2684
|
+
$selfLawFirmId: Int!
|
|
2685
|
+
$taskTemplateObj: TaskTemplateInput!
|
|
2658
2686
|
) {
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2687
|
+
createTaskTemplate(
|
|
2688
|
+
selfUserId: $selfUserId
|
|
2689
|
+
selfLawFirmId: $selfLawFirmId
|
|
2690
|
+
taskTemplateObj: $taskTemplateObj
|
|
2691
|
+
) {
|
|
2692
|
+
code
|
|
2693
|
+
message
|
|
2694
|
+
newTaskTemplate {
|
|
2695
|
+
...taskTemplate
|
|
2696
|
+
}
|
|
2697
|
+
}
|
|
2664
2698
|
}
|
|
2665
|
-
|
|
2666
|
-
${taskTemplateFragment}
|
|
2699
|
+
${taskTemplateFragment}
|
|
2667
2700
|
`;
|
|
2668
2701
|
/*! *****************************************************************************
|
|
2669
2702
|
Copyright (c) Microsoft Corporation.
|
|
@@ -6353,21 +6386,11 @@ var __vue2_script$1 = defineComponent({
|
|
|
6353
6386
|
tempTask.value = defaultTaskTemplate;
|
|
6354
6387
|
}
|
|
6355
6388
|
});
|
|
6356
|
-
const
|
|
6357
|
-
|
|
6358
|
-
|
|
6359
|
-
|
|
6360
|
-
|
|
6361
|
-
let success;
|
|
6362
|
-
if (record.taskTemplateId) {
|
|
6363
|
-
res = await updateTemplate.mutate(record);
|
|
6364
|
-
newRecord = ((_a2 = res == null ? void 0 : res.data) == null ? void 0 : _a2.updateTaskTemplate.updatedTaskTemplate) || {};
|
|
6365
|
-
success = ((_b = res == null ? void 0 : res.data) == null ? void 0 : _b.updateTaskTemplate.code) === ResponseCode.success;
|
|
6366
|
-
} else {
|
|
6367
|
-
res = await createTemplate.mutate(record);
|
|
6368
|
-
newRecord = ((_c = res == null ? void 0 : res.data) == null ? void 0 : _c.createTaskTemplate.newTaskTemplate) || {};
|
|
6369
|
-
success = ((_d = res == null ? void 0 : res.data) == null ? void 0 : _d.createTaskTemplate.code) === ResponseCode.success;
|
|
6370
|
-
}
|
|
6389
|
+
const _submit = async (record) => {
|
|
6390
|
+
const {
|
|
6391
|
+
newRecord,
|
|
6392
|
+
success
|
|
6393
|
+
} = await submit(record, updateTemplate, createTemplate);
|
|
6371
6394
|
if (success) {
|
|
6372
6395
|
newTaskVisible.value = false;
|
|
6373
6396
|
message.success("Success!");
|
|
@@ -6389,7 +6412,7 @@ var __vue2_script$1 = defineComponent({
|
|
|
6389
6412
|
return {
|
|
6390
6413
|
mainModal,
|
|
6391
6414
|
reviewModal,
|
|
6392
|
-
|
|
6415
|
+
_submit,
|
|
6393
6416
|
newTaskVisible,
|
|
6394
6417
|
tempTask,
|
|
6395
6418
|
reviewModalVisible,
|
|
@@ -6442,12 +6465,12 @@ var render$1 = function() {
|
|
|
6442
6465
|
_vm.tempTask = $event;
|
|
6443
6466
|
}, "update:visible": function($event) {
|
|
6444
6467
|
_vm.newTaskVisible = $event;
|
|
6445
|
-
}, "submit": _vm.
|
|
6468
|
+
}, "submit": _vm._submit } })], 1);
|
|
6446
6469
|
};
|
|
6447
6470
|
var staticRenderFns$1 = [];
|
|
6448
6471
|
var index_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
6449
6472
|
const __cssModules$1 = {};
|
|
6450
|
-
var __component__$1 = /* @__PURE__ */ normalizeComponent(__vue2_script$1, render$1, staticRenderFns$1, false, __vue2_injectStyles$1, "
|
|
6473
|
+
var __component__$1 = /* @__PURE__ */ normalizeComponent(__vue2_script$1, render$1, staticRenderFns$1, false, __vue2_injectStyles$1, "87f9c22a", null, null);
|
|
6451
6474
|
function __vue2_injectStyles$1(context) {
|
|
6452
6475
|
for (let o in __cssModules$1) {
|
|
6453
6476
|
this[o] = __cssModules$1[o];
|
|
@@ -6485,4 +6508,4 @@ function __vue2_injectStyles(context) {
|
|
|
6485
6508
|
var index = /* @__PURE__ */ function() {
|
|
6486
6509
|
return __component__.exports;
|
|
6487
6510
|
}();
|
|
6488
|
-
export { AssigneeTag, NewTask, index$3 as ProfileSelect, TagsWithTooltip, index$1 as TaskCart, TaskForm, TaskTable, TaskTemplateFilter, index as TestComponent, index$2 as forms, getLanguageMessage, refactorParams as refactorTaskTemplateParams, useSearchTaskConditions, useSearchTaskTemplates };
|
|
6511
|
+
export { AssigneeTag, NewTask, index$3 as ProfileSelect, TagsWithTooltip, index$1 as TaskCart, TaskForm, TaskTable, TaskTemplateFilter, index as TestComponent, index$2 as forms, getLanguageMessage, refactorParams as refactorTaskTemplateParams, submit as submitTaskTemplate, useCreateTaskTemplate, useMutateTaskTemplate, useSearchTaskConditions, useSearchTaskTemplates };
|