@ailaw/venus 0.6.3 → 0.6.7
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CaseTemplateList } from '../types';
|
|
2
2
|
export default function useCaseTemplates(): {
|
|
3
|
-
templates: Readonly<import("@vue/composition-api").Ref<Readonly<CaseTemplateList
|
|
3
|
+
templates: Readonly<import("@vue/composition-api").Ref<Readonly<CaseTemplateList>>>;
|
|
4
4
|
loading: import("@vue/composition-api").Ref<boolean>;
|
|
5
5
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { PropType } from 'vue-demi';
|
|
1
|
+
import { PropType, VNode } from 'vue-demi';
|
|
2
2
|
import { CaseTemplate } from './types';
|
|
3
3
|
declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
4
4
|
customTemplates: import("@vue/composition-api").ComputedRef<CaseTemplate[]>;
|
|
5
5
|
galleryTemplates: import("@vue/composition-api").ComputedRef<CaseTemplate[]>;
|
|
6
6
|
selectedId: import("@vue/composition-api").ComputedRef<number | undefined>;
|
|
7
7
|
onChange: (value: number) => void;
|
|
8
|
+
onFilter: (keywords: string, node: VNode) => any;
|
|
8
9
|
}> & import("@vue/composition-api").Data, {}, {}, {
|
|
9
10
|
value: {
|
|
10
11
|
type: PropType<CaseTemplate>;
|
|
@@ -18,6 +19,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
18
19
|
galleryTemplates: import("@vue/composition-api").ComputedRef<CaseTemplate[]>;
|
|
19
20
|
selectedId: import("@vue/composition-api").ComputedRef<number | undefined>;
|
|
20
21
|
onChange: (value: number) => void;
|
|
22
|
+
onFilter: (keywords: string, node: VNode) => any;
|
|
21
23
|
}>, import("@vue/composition-api").Data, {}, {}, {}, {}, {}, {} & {
|
|
22
24
|
value?: CaseTemplate | undefined;
|
|
23
25
|
}, {}, true>);
|
package/dist/en3.js
CHANGED
|
@@ -881,6 +881,7 @@ var lang3 = {
|
|
|
881
881
|
moreThan150: "Should not be longer than 150 chars.",
|
|
882
882
|
confirmDeleteTask: "This task will be permanently deleted. Existing cases won't be affected.",
|
|
883
883
|
updateTaskConfirm: "Changes will be saved. Existing cases will not be affected.",
|
|
884
|
+
reviewAndAddToCase: "Review and add to case",
|
|
884
885
|
choosePreparer: "Choose a preparer",
|
|
885
886
|
choosePetitioner: "Choose a petitioner",
|
|
886
887
|
chooseIndividual: "Choose an individual"
|
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)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.rounded{border-radius:.25rem}.border{border-width:1px}.border-solid{border-style:solid}.border-light-purple{--tw-border-opacity: 1;border-color:rgba(192,150,250,var(--tw-border-opacity))}.border-light-blue{--tw-border-opacity: 1;border-color:rgba(145,213,255,var(--tw-border-opacity))}.bg-purple{--tw-bg-opacity: 1;background-color:rgba(249,240,255,var(--tw-bg-opacity))}.bg-blue{--tw-bg-opacity: 1;background-color:rgba(230,247,255,var(--tw-bg-opacity))}.p-4{padding:1rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.capitalize{text-transform:capitalize}.leading-5{line-height:1.25rem}.text-secondary{--tw-text-opacity: 1;color:rgba(102,102,102,var(--tw-text-opacity))}.text-smart{--tw-text-opacity: 1;color:rgba(114,46,209,var(--tw-text-opacity))}.text-classic{--tw-text-opacity: 1;color:rgba(24,144,255,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)}.min-w-80[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)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.rounded{border-radius:.25rem}.border{border-width:1px}.border-solid{border-style:solid}.border-light-purple{--tw-border-opacity: 1;border-color:rgba(192,150,250,var(--tw-border-opacity))}.border-light-blue{--tw-border-opacity: 1;border-color:rgba(145,213,255,var(--tw-border-opacity))}.bg-purple{--tw-bg-opacity: 1;background-color:rgba(249,240,255,var(--tw-bg-opacity))}.bg-blue{--tw-bg-opacity: 1;background-color:rgba(230,247,255,var(--tw-bg-opacity))}.p-4{padding:1rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.capitalize{text-transform:capitalize}.leading-5{line-height:1.25rem}.text-secondary{--tw-text-opacity: 1;color:rgba(102,102,102,var(--tw-text-opacity))}.text-smart{--tw-text-opacity: 1;color:rgba(114,46,209,var(--tw-text-opacity))}.text-classic{--tw-text-opacity: 1;color:rgba(24,144,255,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)}.min-w-80[data-v-0eaae435]{min-width:320px}.container[data-v-3031f8a5]{border:1px solid #cccccc;border-radius:6px;padding:0 4px;min-height:30px;cursor:pointer}.tags-container[data-v-18554545]{word-break:keep-all;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}.taskTemplateInline[data-v-c5d917d8]{float:right}a.taskTemplateInline[data-v-c5d917d8]{margin-left:10px}div.taskTemplateInline[data-v-c5d917d8]{margin-top:5px!important}
|
|
@@ -49,7 +49,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
49
49
|
}[]>;
|
|
50
50
|
userId: import("@vue/composition-api").ComputedRef<string | undefined>;
|
|
51
51
|
lawFirmId: import("@vue/composition-api").ComputedRef<number | undefined>;
|
|
52
|
-
writeQuery: (id: number, newRecord: TaskTemplate) => void;
|
|
52
|
+
writeQuery: (id: number, newRecord: TaskTemplate, isUpdate?: boolean) => void;
|
|
53
53
|
editTask: (record: TaskTemplateComponentData) => void;
|
|
54
54
|
_submit: (record: TaskTemplateMutateData) => Promise<void>;
|
|
55
55
|
endReviewing: (result: any) => void;
|
|
@@ -196,7 +196,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
196
196
|
}[]>;
|
|
197
197
|
userId: import("@vue/composition-api").ComputedRef<string | undefined>;
|
|
198
198
|
lawFirmId: import("@vue/composition-api").ComputedRef<number | undefined>;
|
|
199
|
-
writeQuery: (id: number, newRecord: TaskTemplate) => void;
|
|
199
|
+
writeQuery: (id: number, newRecord: TaskTemplate, isUpdate?: boolean) => void;
|
|
200
200
|
editTask: (record: TaskTemplateComponentData) => void;
|
|
201
201
|
_submit: (record: TaskTemplateMutateData) => Promise<void>;
|
|
202
202
|
endReviewing: (result: any) => void;
|
package/dist/venus.es.js
CHANGED
|
@@ -21,7 +21,7 @@ import { defineComponent, ref, watch, reactive, computed, toRefs, getCurrentScop
|
|
|
21
21
|
import { Select, Modal, Form, Input, Checkbox, Divider, Button, Upload, Tag, Tooltip, Row, Col, Radio, Popconfirm, Table, Badge, Card, message } from "ant-design-vue";
|
|
22
22
|
import { useQuery, useResult, useMutation, useApolloClient } from "@vue/apollo-composable";
|
|
23
23
|
import gql from "graphql-tag";
|
|
24
|
-
import { path, uniqBy, prop } from "ramda";
|
|
24
|
+
import { path, uniqBy, prop, sort } from "ramda";
|
|
25
25
|
var index$5 = "";
|
|
26
26
|
function __variableDynamicImportRuntime0__$1(path2) {
|
|
27
27
|
switch (path2) {
|
|
@@ -519,15 +519,27 @@ const queryAllCaseTemplates = gql`
|
|
|
519
519
|
id
|
|
520
520
|
isSmart
|
|
521
521
|
templateName
|
|
522
|
+
isCompanyRelated
|
|
523
|
+
isIndividualRelated
|
|
522
524
|
}
|
|
523
525
|
|
|
524
526
|
custom: customCaseTemplateList(selfLawFirmId: $lawFirmId) {
|
|
525
527
|
id
|
|
526
528
|
isSmart
|
|
527
529
|
templateName
|
|
530
|
+
isCompanyRelated
|
|
531
|
+
isIndividualRelated
|
|
528
532
|
}
|
|
529
533
|
}
|
|
530
534
|
`;
|
|
535
|
+
const compare = (a, b) => {
|
|
536
|
+
if (a.templateName === b.templateName) {
|
|
537
|
+
if (a.isSmart && b.isSmart)
|
|
538
|
+
return 0;
|
|
539
|
+
return a.isSmart ? 1 : -1;
|
|
540
|
+
}
|
|
541
|
+
return a.templateName > b.templateName ? 1 : -1;
|
|
542
|
+
};
|
|
531
543
|
function useCaseTemplates() {
|
|
532
544
|
const me = useMe();
|
|
533
545
|
const { result, loading } = useQuery(queryAllCaseTemplates, () => {
|
|
@@ -538,7 +550,13 @@ function useCaseTemplates() {
|
|
|
538
550
|
}, () => ({
|
|
539
551
|
enabled: me.value != null
|
|
540
552
|
}));
|
|
541
|
-
const templates = useResult(result
|
|
553
|
+
const templates = useResult(result, {
|
|
554
|
+
gallery: [],
|
|
555
|
+
custom: []
|
|
556
|
+
}, (data) => ({
|
|
557
|
+
gallery: sort(compare, data.gallery),
|
|
558
|
+
custom: sort(compare, data.custom)
|
|
559
|
+
}));
|
|
542
560
|
return { templates, loading };
|
|
543
561
|
}
|
|
544
562
|
var __vue2_script$e = defineComponent({
|
|
@@ -632,23 +650,27 @@ var __vue2_script$c = defineComponent({
|
|
|
632
650
|
const result = allTemplates.value.find((v) => v.id === value);
|
|
633
651
|
emit("update:value", result);
|
|
634
652
|
};
|
|
635
|
-
|
|
653
|
+
const onFilter = (keywords, node) => {
|
|
654
|
+
var _a, _b, _c, _d;
|
|
655
|
+
return (_d = (_c = (_b = (_a = node.data) == null ? void 0 : _a.attrs) == null ? void 0 : _b.name) == null ? void 0 : _c.toLowerCase()) == null ? void 0 : _d.includes(keywords.toLowerCase());
|
|
656
|
+
};
|
|
657
|
+
return { customTemplates, galleryTemplates, selectedId, onChange, onFilter };
|
|
636
658
|
}
|
|
637
659
|
});
|
|
638
660
|
var render$c = function() {
|
|
639
661
|
var _vm = this;
|
|
640
662
|
var _h = _vm.$createElement;
|
|
641
663
|
var _c = _vm._self._c || _h;
|
|
642
|
-
return _c("a-select", _vm._b({ staticClass: "min-w-80", attrs: { "value": _vm.selectedId }, on: { "change": _vm.onChange } }, "a-select", _vm.$attrs, false), [_c("a-option-group", { attrs: { "label": [_vm.$t("message.custom"), _vm.$t("message.templates")].join(" ") } }, _vm._l(_vm.customTemplates, function(v) {
|
|
643
|
-
return _c("a-option", { key: v.id, attrs: { "value": v.id } }, [_c("CaseTemplateOption", { attrs: { "source": v } })], 1);
|
|
664
|
+
return _c("a-select", _vm._b({ staticClass: "min-w-80", attrs: { "allowClear": "", "showSearch": "", "filter-option": _vm.onFilter, "value": _vm.selectedId }, on: { "change": _vm.onChange } }, "a-select", _vm.$attrs, false), [_c("a-option-group", { attrs: { "label": [_vm.$t("message.custom"), _vm.$t("message.templates")].join(" ") } }, _vm._l(_vm.customTemplates, function(v) {
|
|
665
|
+
return _c("a-option", { key: v.id, attrs: { "value": v.id, "name": v.templateName } }, [_c("CaseTemplateOption", { attrs: { "source": v } })], 1);
|
|
644
666
|
}), 1), _c("a-option-group", { attrs: { "label": [_vm.$t("message.gallery"), _vm.$t("message.templates")].join(" ") } }, _vm._l(_vm.galleryTemplates, function(v) {
|
|
645
|
-
return _c("a-option", { key: v.id, attrs: { "value": v.id } }, [_c("CaseTemplateOption", { attrs: { "source": v } })], 1);
|
|
667
|
+
return _c("a-option", { key: v.id, attrs: { "value": v.id, "name": v.templateName } }, [_c("CaseTemplateOption", { attrs: { "source": v } })], 1);
|
|
646
668
|
}), 1)], 1);
|
|
647
669
|
};
|
|
648
670
|
var staticRenderFns$c = [];
|
|
649
671
|
var index_vue_vue_type_style_index_0_scoped_true_lang$7 = "";
|
|
650
672
|
const __cssModules$c = {};
|
|
651
|
-
var __component__$c = /* @__PURE__ */ normalizeComponent(__vue2_script$c, render$c, staticRenderFns$c, false, __vue2_injectStyles$c, "
|
|
673
|
+
var __component__$c = /* @__PURE__ */ normalizeComponent(__vue2_script$c, render$c, staticRenderFns$c, false, __vue2_injectStyles$c, "0eaae435", null, null);
|
|
652
674
|
function __vue2_injectStyles$c(context) {
|
|
653
675
|
for (let o in __cssModules$c) {
|
|
654
676
|
this[o] = __cssModules$c[o];
|
|
@@ -931,7 +953,6 @@ var __vue2_script$b = defineComponent({
|
|
|
931
953
|
}).finally(() => {
|
|
932
954
|
loading.value = false;
|
|
933
955
|
});
|
|
934
|
-
loading.value = false;
|
|
935
956
|
return false;
|
|
936
957
|
};
|
|
937
958
|
const previewImage = ref();
|
|
@@ -969,7 +990,7 @@ var render$b = function() {
|
|
|
969
990
|
var _c = _vm._self._c || _h;
|
|
970
991
|
return _c("div", { class: { container: !_vm.previewMode } }, [_c("ant-modal", { attrs: { "visible": !!_vm.previewImage, "footer": null }, on: { "cancel": function($event) {
|
|
971
992
|
_vm.previewImage = null;
|
|
972
|
-
} } }, [_c("img", { staticStyle: { "width": "100%" }, attrs: { "src": _vm.previewImage } })]), _c("ant-upload", { staticStyle: { "display": "inline" }, attrs: { "multiple": "", "disabled": _vm.disabled || _vm.loading, "
|
|
993
|
+
} } }, [_c("img", { staticStyle: { "width": "100%" }, attrs: { "src": _vm.previewImage } })]), _c("ant-upload", { staticStyle: { "display": "inline" }, attrs: { "multiple": "", "before-upload": _vm.beforeUpload, "disabled": _vm.disabled || _vm.loading, "action": "javascript:;", "fileList": [], "accept": _vm.acceptableFormats.join(",") } }, [!_vm.previewMode ? _c("ant-tag", [_vm._v(" " + _vm._s(_vm.$t("message.selectFile")) + " ")]) : _vm._e(), _vm.value.length ? _c("div", { staticStyle: { "display": "inline-block" } }, _vm._l(_vm.value, function(file) {
|
|
973
994
|
return _c("ant-tag", { key: file.id, attrs: { "closable": !_vm.previewMode && !_vm.disabled }, on: { "close": function($event) {
|
|
974
995
|
return _vm.remove(file.id);
|
|
975
996
|
} } }, [_c("a", { staticStyle: { "color": "#111" }, attrs: { "href": file.link, "target": "_blank" }, on: { "click": function($event) {
|
|
@@ -981,7 +1002,7 @@ var render$b = function() {
|
|
|
981
1002
|
var staticRenderFns$b = [];
|
|
982
1003
|
var index_vue_vue_type_style_index_0_scoped_true_lang$6 = "";
|
|
983
1004
|
const __cssModules$b = {};
|
|
984
|
-
var __component__$b = /* @__PURE__ */ normalizeComponent(__vue2_script$b, render$b, staticRenderFns$b, false, __vue2_injectStyles$b, "
|
|
1005
|
+
var __component__$b = /* @__PURE__ */ normalizeComponent(__vue2_script$b, render$b, staticRenderFns$b, false, __vue2_injectStyles$b, "3031f8a5", null, null);
|
|
985
1006
|
function __vue2_injectStyles$b(context) {
|
|
986
1007
|
for (let o in __cssModules$b) {
|
|
987
1008
|
this[o] = __cssModules$b[o];
|
|
@@ -1036,12 +1057,12 @@ var render$a = function() {
|
|
|
1036
1057
|
var _vm = this;
|
|
1037
1058
|
var _h = _vm.$createElement;
|
|
1038
1059
|
var _c = _vm._self._c || _h;
|
|
1039
|
-
return _c("ant-tag", { attrs: { "color": _vm.tagColor(_vm.assigneeType) } }, [_vm._v(" " + _vm._s(_vm.$t(_vm.AssigneeTypesText[_vm.assigneeType])) + " ")]);
|
|
1060
|
+
return _c("ant-tag", { attrs: { "color": _vm.tagColor(_vm.assigneeType || "EMPTY_DEFAULT") } }, [_vm._v(" " + _vm._s(_vm.$t(_vm.AssigneeTypesText[_vm.assigneeType])) + " ")]);
|
|
1040
1061
|
};
|
|
1041
1062
|
var staticRenderFns$a = [];
|
|
1042
1063
|
var index_vue_vue_type_style_index_0_scoped_true_lang$5 = "";
|
|
1043
1064
|
const __cssModules$a = {};
|
|
1044
|
-
var __component__$a = /* @__PURE__ */ normalizeComponent(__vue2_script$a, render$a, staticRenderFns$a, false, __vue2_injectStyles$a, "
|
|
1065
|
+
var __component__$a = /* @__PURE__ */ normalizeComponent(__vue2_script$a, render$a, staticRenderFns$a, false, __vue2_injectStyles$a, "3f69c61c", null, null);
|
|
1045
1066
|
function __vue2_injectStyles$a(context) {
|
|
1046
1067
|
for (let o in __cssModules$a) {
|
|
1047
1068
|
this[o] = __cssModules$a[o];
|
|
@@ -1184,7 +1205,7 @@ var __vue2_script$8 = defineComponent({
|
|
|
1184
1205
|
setup(props, { emit }) {
|
|
1185
1206
|
const nameError = ref(false);
|
|
1186
1207
|
const typeError = ref(false);
|
|
1187
|
-
const nameErrorContent = ref("message.
|
|
1208
|
+
const nameErrorContent = ref("message.required");
|
|
1188
1209
|
const changeVal = useChangeVal(props, emit);
|
|
1189
1210
|
const validFields = (callback) => {
|
|
1190
1211
|
var _a;
|
|
@@ -1250,7 +1271,7 @@ var render$8 = function() {
|
|
|
1250
1271
|
var staticRenderFns$8 = [];
|
|
1251
1272
|
var index_vue_vue_type_style_index_0_scoped_true_lang$3 = "";
|
|
1252
1273
|
const __cssModules$8 = {};
|
|
1253
|
-
var __component__$8 = /* @__PURE__ */ normalizeComponent(__vue2_script$8, render$8, staticRenderFns$8, false, __vue2_injectStyles$8, "
|
|
1274
|
+
var __component__$8 = /* @__PURE__ */ normalizeComponent(__vue2_script$8, render$8, staticRenderFns$8, false, __vue2_injectStyles$8, "667a3a46", null, null);
|
|
1254
1275
|
function __vue2_injectStyles$8(context) {
|
|
1255
1276
|
for (let o in __cssModules$8) {
|
|
1256
1277
|
this[o] = __cssModules$8[o];
|
|
@@ -1365,7 +1386,7 @@ var render$7 = function() {
|
|
|
1365
1386
|
} }, scopedSlots: _vm._u([{ key: "footer", fn: function() {
|
|
1366
1387
|
return [_c("div", { staticClass: "footer" }, [_vm.showSendEmail ? _c("div", { staticStyle: { "float": "left", "padding-top": "5px", "padding-left": "10px" } }, [_c("ant-checkbox", { attrs: { "checked": _vm.value.isNotified }, on: { "change": function($event) {
|
|
1367
1388
|
return _vm.changeVal("isNotified", $event.target.checked);
|
|
1368
|
-
} } }, [_vm._v(" " + _vm._s(_vm.$t("message.
|
|
1389
|
+
} } }, [_vm._v(" " + _vm._s(_vm.$t("message.sendTaskEmail")) + " ")])], 1) : _vm._e(), _c("div", [_vm.hasDoubleConfirm ? _c("ant-popconfirm", { attrs: { "title": _vm.$t("message.updateTaskConfirm"), "placement": "top" }, on: { "confirm": _vm.submit } }, [_c("ant-button", { attrs: { "loading": _vm.loading, "type": "primary" } }, [_vm._v(_vm._s(_vm.$t("message.submit")) + " ")])], 1) : _c("ant-button", { attrs: { "loading": _vm.loading, "type": "primary" }, on: { "click": _vm.submit } }, [_vm._v(_vm._s(_vm.$t("message.submit")) + " ")]), _c("ant-button", { on: { "click": function($event) {
|
|
1369
1390
|
return _vm.changeVisible(false);
|
|
1370
1391
|
} } }, [_vm._v(_vm._s(_vm.$t("message.cancel")) + " ")])], 1)])];
|
|
1371
1392
|
}, proxy: true }]) }, [_c("task-form", { ref: "taskForm", attrs: { "upload-files-func": _vm.uploadFilesFunc, "law-firm-id": _vm.lawFirmId, "user-id": _vm.userId, "value": _vm.value.taskTemplateObj }, on: { "update:value": _vm.updateFormValue } }), _vm.showAddToList ? _c("ant-checkbox", { attrs: { "checked": _vm.value.isAddedToTask }, on: { "change": function($event) {
|
|
@@ -1375,7 +1396,7 @@ var render$7 = function() {
|
|
|
1375
1396
|
var staticRenderFns$7 = [];
|
|
1376
1397
|
var index_vue_vue_type_style_index_0_scoped_true_lang$2 = "";
|
|
1377
1398
|
const __cssModules$7 = {};
|
|
1378
|
-
var __component__$7 = /* @__PURE__ */ normalizeComponent(__vue2_script$7, render$7, staticRenderFns$7, false, __vue2_injectStyles$7, "
|
|
1399
|
+
var __component__$7 = /* @__PURE__ */ normalizeComponent(__vue2_script$7, render$7, staticRenderFns$7, false, __vue2_injectStyles$7, "5e21102f", null, null);
|
|
1379
1400
|
function __vue2_injectStyles$7(context) {
|
|
1380
1401
|
for (let o in __cssModules$7) {
|
|
1381
1402
|
this[o] = __cssModules$7[o];
|
|
@@ -1546,7 +1567,7 @@ var render$5 = function() {
|
|
|
1546
1567
|
} }, { key: "tagList", fn: function(tags) {
|
|
1547
1568
|
return [_c("tags-with-tooltip", { attrs: { "tags": tags } })];
|
|
1548
1569
|
} }, { key: "operation", fn: function(_, record) {
|
|
1549
|
-
return [_vm.showEdit ? _c("ant-button", { staticClass: "mr-2", attrs: { "disabled": _vm.isTemplateAdded(record)
|
|
1570
|
+
return [record.isGallery ? _c("span", { staticStyle: { "width": "82px", "display": "inline-block", "color": "#999" } }, [_vm._v(" Preset ")]) : _vm.showEdit ? _c("ant-button", { staticClass: "mr-2", attrs: { "disabled": _vm.isTemplateAdded(record), "size": "small" }, on: { "click": function($event) {
|
|
1550
1571
|
return _vm.$emit("editTask", record);
|
|
1551
1572
|
} } }, [_vm._v(" " + _vm._s(_vm.$t("message.editTask")) + " ")]) : _vm._e(), _vm.isTemplateAdded(record) ? _c("ant-button", { staticStyle: { "width": "70px" }, attrs: { "size": "small", "type": "danger" }, on: { "click": function($event) {
|
|
1552
1573
|
return _vm.$emit("removeTask", record);
|
|
@@ -1558,7 +1579,7 @@ var render$5 = function() {
|
|
|
1558
1579
|
var staticRenderFns$5 = [];
|
|
1559
1580
|
var TaskTablePure_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
1560
1581
|
const __cssModules$5 = {};
|
|
1561
|
-
var __component__$5 = /* @__PURE__ */ normalizeComponent(__vue2_script$5, render$5, staticRenderFns$5, false, __vue2_injectStyles$5, "
|
|
1582
|
+
var __component__$5 = /* @__PURE__ */ normalizeComponent(__vue2_script$5, render$5, staticRenderFns$5, false, __vue2_injectStyles$5, "3272d34e", null, null);
|
|
1562
1583
|
function __vue2_injectStyles$5(context) {
|
|
1563
1584
|
for (let o in __cssModules$5) {
|
|
1564
1585
|
this[o] = __cssModules$5[o];
|
|
@@ -1647,7 +1668,8 @@ var useSearchTaskConditions = () => ref({
|
|
|
1647
1668
|
isEmployee: [
|
|
1648
1669
|
AssigneeTypes.ATTORNEY,
|
|
1649
1670
|
AssigneeTypes.PETITIONER,
|
|
1650
|
-
AssigneeTypes.BENEFICIARY
|
|
1671
|
+
AssigneeTypes.BENEFICIARY,
|
|
1672
|
+
AssigneeTypes.EMPTY_DEFAULT
|
|
1651
1673
|
]
|
|
1652
1674
|
});
|
|
1653
1675
|
var useTaskTemplateTableData = (props, emit) => {
|
|
@@ -2126,7 +2148,7 @@ var __vue2_script$1 = defineComponent({
|
|
|
2126
2148
|
}
|
|
2127
2149
|
});
|
|
2128
2150
|
const updateReviewModalContent = (record, newRecord) => {
|
|
2129
|
-
if (
|
|
2151
|
+
if (addedTasks.value.some(({ id }) => id === newRecord.id)) {
|
|
2130
2152
|
const newValue = addedTasks.value.map((originTask) => {
|
|
2131
2153
|
if (originTask.id === record.taskTemplateId) {
|
|
2132
2154
|
return newRecord;
|
|
@@ -2134,26 +2156,33 @@ var __vue2_script$1 = defineComponent({
|
|
|
2134
2156
|
return originTask;
|
|
2135
2157
|
});
|
|
2136
2158
|
emit("update:value", newValue.map(({ id }) => id));
|
|
2159
|
+
} else {
|
|
2160
|
+
addedTasks.value.push(newRecord);
|
|
2161
|
+
emit("update:value", [...addedTasks.value.map(({ id }) => id), newRecord.id]);
|
|
2137
2162
|
}
|
|
2138
2163
|
};
|
|
2139
|
-
const writeQuery = (id, newRecord) => {
|
|
2164
|
+
const writeQuery = (id, newRecord, isUpdate = true) => {
|
|
2140
2165
|
const variables = mainModal.value.getVariables();
|
|
2141
2166
|
const existed = client.readQuery({
|
|
2142
2167
|
query: SearchTaskTemplatesQuery,
|
|
2143
2168
|
variables
|
|
2144
2169
|
});
|
|
2170
|
+
const newTasks = isUpdate ? existed.taskTemplateSearch.taskTemplateList.map((record) => {
|
|
2171
|
+
if (record.id === id) {
|
|
2172
|
+
return newRecord && __spreadProps(__spreadValues({}, newRecord), {
|
|
2173
|
+
isGallery: record.isGallery
|
|
2174
|
+
});
|
|
2175
|
+
}
|
|
2176
|
+
return record;
|
|
2177
|
+
}).filter((record) => !!record) : [
|
|
2178
|
+
__spreadProps(__spreadValues({}, newRecord), { isGallery: false }),
|
|
2179
|
+
...existed.taskTemplateSearch.taskTemplateList
|
|
2180
|
+
];
|
|
2145
2181
|
client.writeQuery({
|
|
2146
2182
|
query: SearchTaskTemplatesQuery,
|
|
2147
2183
|
data: {
|
|
2148
2184
|
taskTemplateSearch: __spreadProps(__spreadValues({}, existed.taskTemplateSearch), {
|
|
2149
|
-
taskTemplateList:
|
|
2150
|
-
if (record.id === id) {
|
|
2151
|
-
return newRecord && __spreadProps(__spreadValues({}, newRecord), {
|
|
2152
|
-
isGallery: record.isGallery
|
|
2153
|
-
});
|
|
2154
|
-
}
|
|
2155
|
-
return record;
|
|
2156
|
-
}).filter((record) => !!record)
|
|
2185
|
+
taskTemplateList: newTasks
|
|
2157
2186
|
})
|
|
2158
2187
|
},
|
|
2159
2188
|
variables
|
|
@@ -2161,9 +2190,9 @@ var __vue2_script$1 = defineComponent({
|
|
|
2161
2190
|
};
|
|
2162
2191
|
const _submit = async (record) => {
|
|
2163
2192
|
const { newRecord, success, isUpdate } = await submit(record, updateTemplate, createTemplate);
|
|
2193
|
+
console.log(0);
|
|
2164
2194
|
if (success) {
|
|
2165
|
-
|
|
2166
|
-
writeQuery(record.taskTemplateId, newRecord);
|
|
2195
|
+
writeQuery(record.taskTemplateId, newRecord, isUpdate);
|
|
2167
2196
|
newTaskVisible.value = false;
|
|
2168
2197
|
updateReviewModalContent(record, newRecord);
|
|
2169
2198
|
emit("task-added", newRecord);
|
|
@@ -2251,7 +2280,7 @@ var render$1 = function() {
|
|
|
2251
2280
|
var staticRenderFns$1 = [];
|
|
2252
2281
|
var index_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
2253
2282
|
const __cssModules$1 = {};
|
|
2254
|
-
var __component__$1 = /* @__PURE__ */ normalizeComponent(__vue2_script$1, render$1, staticRenderFns$1, false, __vue2_injectStyles$1, "
|
|
2283
|
+
var __component__$1 = /* @__PURE__ */ normalizeComponent(__vue2_script$1, render$1, staticRenderFns$1, false, __vue2_injectStyles$1, "0d797664", null, null);
|
|
2255
2284
|
function __vue2_injectStyles$1(context) {
|
|
2256
2285
|
for (let o in __cssModules$1) {
|
|
2257
2286
|
this[o] = __cssModules$1[o];
|