@ailaw/venus 0.6.1 → 0.6.5

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.
@@ -6,7 +6,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
6
6
  clickItem: (item: any, event: any) => void;
7
7
  changeVal: (k: string, v: any) => void;
8
8
  remove: (id: number) => void;
9
- beforeUpload: (file: File) => boolean;
9
+ beforeUpload: (file: File, files: File[]) => boolean;
10
10
  loading: import("@vue/composition-api").Ref<boolean>;
11
11
  acceptableFormats: string[];
12
12
  }> & import("@vue/composition-api").Data, {}, {}, {
@@ -40,7 +40,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
40
40
  clickItem: (item: any, event: any) => void;
41
41
  changeVal: (k: string, v: any) => void;
42
42
  remove: (id: number) => void;
43
- beforeUpload: (file: File) => boolean;
43
+ beforeUpload: (file: File, files: File[]) => boolean;
44
44
  loading: import("@vue/composition-api").Ref<boolean>;
45
45
  acceptableFormats: string[];
46
46
  }>, import("@vue/composition-api").Data, {}, {}, {}, {}, {}, {
package/dist/en3.js CHANGED
@@ -878,6 +878,9 @@ var lang3 = {
878
878
  taskManagement: "Task Management",
879
879
  addFromList: "Add from list",
880
880
  createANewTask: "Create a new task",
881
+ moreThan150: "Should not be longer than 150 chars.",
882
+ confirmDeleteTask: "This task will be permanently deleted. Existing cases won't be affected.",
883
+ updateTaskConfirm: "Changes will be saved. Existing cases will not be affected.",
881
884
  choosePreparer: "Choose a preparer",
882
885
  choosePetitioner: "Choose a petitioner",
883
886
  chooseIndividual: "Choose an individual"
@@ -1,7 +1,7 @@
1
1
  import { SearchTaskTemplateParams, SearchTaskTemplateResp, TaskTemplateSearchInput } from '@/types/task';
2
2
  import { Pagination } from '@/types/common';
3
3
  import { Ref } from 'vue-demi';
4
- declare const _default: (pagination: Ref<Pagination>, conditions: Ref<TaskTemplateSearchInput> | undefined, lawFirmId: number) => import("@vue/apollo-composable").UseQueryReturn<SearchTaskTemplateResp, SearchTaskTemplateParams>;
4
+ declare const _default: (pagination: Ref<Pagination>, conditions: Ref<TaskTemplateSearchInput> | undefined, lawFirmId: number, withGallery?: boolean) => import("@vue/apollo-composable").UseQueryReturn<SearchTaskTemplateResp, SearchTaskTemplateParams>;
5
5
  export default _default;
6
6
  export declare const taskTemplateFragment: import("graphql").DocumentNode;
7
7
  export declare const SearchTaskTemplatesQuery: import("graphql").DocumentNode;
@@ -10,7 +10,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
10
10
  clickItem: (item: any, event: any) => void;
11
11
  changeVal: (k: string, v: any) => void;
12
12
  remove: (id: number) => void;
13
- beforeUpload: (file: File) => boolean;
13
+ beforeUpload: (file: File, files: File[]) => boolean;
14
14
  loading: import("@vue/composition-api").Ref<boolean>;
15
15
  acceptableFormats: string[];
16
16
  }> & import("@vue/composition-api").Data, {}, {}, {
@@ -44,7 +44,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
44
44
  clickItem: (item: any, event: any) => void;
45
45
  changeVal: (k: string, v: any) => void;
46
46
  remove: (id: number) => void;
47
- beforeUpload: (file: File) => boolean;
47
+ beforeUpload: (file: File, files: File[]) => boolean;
48
48
  loading: import("@vue/composition-api").Ref<boolean>;
49
49
  acceptableFormats: string[];
50
50
  }>, import("@vue/composition-api").Data, {}, {}, {}, {}, {}, {
@@ -93,6 +93,10 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
93
93
  type: BooleanConstructor;
94
94
  default: boolean;
95
95
  };
96
+ hasDoubleConfirm: {
97
+ type: BooleanConstructor;
98
+ default: boolean;
99
+ };
96
100
  }, {
97
101
  lawFirmId: number;
98
102
  loading: boolean;
@@ -102,6 +106,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
102
106
  showSendEmail: boolean;
103
107
  showAddToList: boolean;
104
108
  userId: string;
109
+ hasDoubleConfirm: boolean;
105
110
  } & {}> & Pick<import("vue").VueConstructor<import("vue").default>, "filter" | "extend" | "nextTick" | "set" | "delete" | "directive" | "component" | "use" | "mixin" | "compile" | "observable" | "util" | "config" | "version"> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
106
111
  lawFirmId: number;
107
112
  loading: boolean;
@@ -111,6 +116,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
111
116
  showSendEmail: boolean;
112
117
  showAddToList: boolean;
113
118
  userId: string;
119
+ hasDoubleConfirm: boolean;
114
120
  } & {}, import("@vue/composition-api").ShallowUnwrapRef<{
115
121
  submit: () => void;
116
122
  taskForm: import("@vue/composition-api").Ref<any>;
@@ -121,7 +127,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
121
127
  clickItem: (item: any, event: any) => void;
122
128
  changeVal: (k: string, v: any) => void;
123
129
  remove: (id: number) => void;
124
- beforeUpload: (file: File) => boolean;
130
+ beforeUpload: (file: File, files: File[]) => boolean;
125
131
  loading: import("@vue/composition-api").Ref<boolean>;
126
132
  acceptableFormats: string[];
127
133
  }> & import("@vue/composition-api").Data, {}, {}, {
@@ -155,7 +161,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
155
161
  clickItem: (item: any, event: any) => void;
156
162
  changeVal: (k: string, v: any) => void;
157
163
  remove: (id: number) => void;
158
- beforeUpload: (file: File) => boolean;
164
+ beforeUpload: (file: File, files: File[]) => boolean;
159
165
  loading: import("@vue/composition-api").Ref<boolean>;
160
166
  acceptableFormats: string[];
161
167
  }>, import("@vue/composition-api").Data, {}, {}, {}, {}, {}, {
@@ -180,10 +186,12 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
180
186
  showSendEmail: boolean;
181
187
  showAddToList: boolean;
182
188
  userId: string;
189
+ hasDoubleConfirm: boolean;
183
190
  } & {}, {
184
191
  loading: boolean;
185
192
  visible: boolean;
186
193
  showSendEmail: boolean;
187
194
  showAddToList: boolean;
195
+ hasDoubleConfirm: boolean;
188
196
  }, true>);
189
197
  export default _default;
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-5ca33108]{min-width:320px}.container[data-v-38dac57e]{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-c3a26010]{float:right}a.taskTemplateInline[data-v-c3a26010]{margin-left:10px}div.taskTemplateInline[data-v-c3a26010]{margin-top:5px!important}
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-5ca33108]{min-width:320px}.container[data-v-36120c70]{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}
@@ -21,8 +21,9 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
21
21
  type: NumberConstructor;
22
22
  required: true;
23
23
  };
24
- taskSettingPageUrl: {
25
- type: StringConstructor;
24
+ showTaskSettingLink: {
25
+ type: BooleanConstructor;
26
+ default: boolean;
26
27
  };
27
28
  showPage: {
28
29
  type: BooleanConstructor;
@@ -35,22 +36,34 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
35
36
  type: StringConstructor;
36
37
  default: string;
37
38
  };
39
+ withGallery: {
40
+ type: BooleanConstructor;
41
+ default: boolean;
42
+ };
43
+ showNewBtn: {
44
+ type: BooleanConstructor;
45
+ default: boolean;
46
+ };
38
47
  }, {
39
48
  lawFirmId: number;
40
49
  visible: boolean;
50
+ showTaskSettingLink: boolean;
51
+ showNewBtn: boolean;
52
+ withGallery: boolean;
41
53
  showPage: boolean;
42
54
  openReviewButtonText: string;
43
55
  } & {
44
- taskSettingPageUrl?: string | undefined;
45
56
  addedTasks?: TaskTemplate[] | undefined;
46
57
  pageSize?: number | undefined;
47
58
  }> & Pick<import("vue").VueConstructor<import("vue").default>, "filter" | "extend" | "nextTick" | "set" | "delete" | "directive" | "component" | "use" | "mixin" | "compile" | "observable" | "util" | "config" | "version"> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
48
59
  lawFirmId: number;
49
60
  visible: boolean;
61
+ showTaskSettingLink: boolean;
62
+ showNewBtn: boolean;
63
+ withGallery: boolean;
50
64
  showPage: boolean;
51
65
  openReviewButtonText: string;
52
66
  } & {
53
- taskSettingPageUrl?: string | undefined;
54
67
  addedTasks?: TaskTemplate[] | undefined;
55
68
  pageSize?: number | undefined;
56
69
  }, import("@vue/composition-api").ShallowUnwrapRef<{
@@ -63,14 +76,19 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
63
76
  }>, import("@vue/composition-api").Data, {}, {}, {}, {}, {}, {
64
77
  lawFirmId: number;
65
78
  visible: boolean;
79
+ showTaskSettingLink: boolean;
80
+ showNewBtn: boolean;
81
+ withGallery: boolean;
66
82
  showPage: boolean;
67
83
  openReviewButtonText: string;
68
84
  } & {
69
- taskSettingPageUrl?: string | undefined;
70
85
  addedTasks?: TaskTemplate[] | undefined;
71
86
  pageSize?: number | undefined;
72
87
  }, {
73
88
  visible: boolean;
89
+ showTaskSettingLink: boolean;
90
+ showNewBtn: boolean;
91
+ withGallery: boolean;
74
92
  showPage: boolean;
75
93
  openReviewButtonText: string;
76
94
  }, true>);
@@ -27,16 +27,22 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
27
27
  pageSize: {
28
28
  type: NumberConstructor;
29
29
  };
30
+ withGallery: {
31
+ type: BooleanConstructor;
32
+ default: boolean;
33
+ };
30
34
  }, {
31
35
  lawFirmId: number;
32
36
  conditions: TaskTemplateSearchInput;
33
37
  addedTasks: TaskTemplate[];
38
+ withGallery: boolean;
34
39
  } & {
35
40
  pageSize?: number | undefined;
36
41
  }> & Pick<import("vue").VueConstructor<import("vue").default>, "filter" | "extend" | "nextTick" | "set" | "delete" | "directive" | "component" | "use" | "mixin" | "compile" | "observable" | "util" | "config" | "version"> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
37
42
  lawFirmId: number;
38
43
  conditions: TaskTemplateSearchInput;
39
44
  addedTasks: TaskTemplate[];
45
+ withGallery: boolean;
40
46
  } & {
41
47
  pageSize?: number | undefined;
42
48
  }, import("@vue/composition-api").ShallowUnwrapRef<{
@@ -53,9 +59,11 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
53
59
  lawFirmId: number;
54
60
  conditions: TaskTemplateSearchInput;
55
61
  addedTasks: TaskTemplate[];
62
+ withGallery: boolean;
56
63
  } & {
57
64
  pageSize?: number | undefined;
58
65
  }, {
59
66
  addedTasks: TaskTemplate[];
67
+ withGallery: boolean;
60
68
  }, true>);
61
69
  export default _default;
@@ -7,8 +7,10 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
7
7
  title: any;
8
8
  dataIndex: string;
9
9
  key: string;
10
+ scopedSlots: {
11
+ customRender: string;
12
+ };
10
13
  width?: undefined;
11
- scopedSlots?: undefined;
12
14
  } | {
13
15
  title: any;
14
16
  dataIndex: string;
@@ -63,8 +65,10 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
63
65
  title: any;
64
66
  dataIndex: string;
65
67
  key: string;
68
+ scopedSlots: {
69
+ customRender: string;
70
+ };
66
71
  width?: undefined;
67
- scopedSlots?: undefined;
68
72
  } | {
69
73
  title: any;
70
74
  dataIndex: string;
@@ -14,6 +14,8 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
14
14
  name: string;
15
15
  link: string;
16
16
  }[] | undefined;
17
+ taskType?: import("../types/task").StepType | undefined;
18
+ sampleDocList?: number[] | undefined;
17
19
  lawFirmId?: number | undefined;
18
20
  isGallery?: boolean | undefined;
19
21
  taskName?: string | undefined;
@@ -35,6 +37,8 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
35
37
  name: string;
36
38
  link: string;
37
39
  }[] | undefined;
40
+ taskType?: import("../types/task").StepType | undefined;
41
+ sampleDocList?: number[] | undefined;
38
42
  lawFirmId?: number | undefined;
39
43
  isGallery?: boolean | undefined;
40
44
  taskName?: string | undefined;
@@ -45,7 +49,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
45
49
  }[]>;
46
50
  userId: import("@vue/composition-api").ComputedRef<string | undefined>;
47
51
  lawFirmId: import("@vue/composition-api").ComputedRef<number | undefined>;
48
- writeQuery: (id: number, newRecord: TaskTemplate) => void;
52
+ writeQuery: (id: number, newRecord: TaskTemplate, isUpdate?: boolean) => void;
49
53
  editTask: (record: TaskTemplateComponentData) => void;
50
54
  _submit: (record: TaskTemplateMutateData) => Promise<void>;
51
55
  endReviewing: (result: any) => void;
@@ -78,8 +82,9 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
78
82
  type: BooleanConstructor;
79
83
  default: boolean;
80
84
  };
81
- taskSettingPageUrl: {
82
- type: StringConstructor;
85
+ showTaskSettingLink: {
86
+ type: BooleanConstructor;
87
+ default: boolean;
83
88
  };
84
89
  allowClear: {
85
90
  type: BooleanConstructor;
@@ -100,12 +105,23 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
100
105
  type: BooleanConstructor;
101
106
  default: boolean;
102
107
  };
108
+ withGallery: {
109
+ type: BooleanConstructor;
110
+ default: boolean;
111
+ };
112
+ showNewBtn: {
113
+ type: BooleanConstructor;
114
+ default: boolean;
115
+ };
103
116
  }, {
104
117
  value: number[];
105
118
  sendEmail: boolean;
106
119
  uploadFilesFunc: UploadFileFunction;
107
120
  visible: boolean;
108
121
  showSendEmail: boolean;
122
+ showTaskSettingLink: boolean;
123
+ showNewBtn: boolean;
124
+ withGallery: boolean;
109
125
  openReviewButtonText: string;
110
126
  reviewText: string;
111
127
  allowClear: boolean;
@@ -113,7 +129,6 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
113
129
  pageMode: boolean;
114
130
  closeAfterAdd: boolean;
115
131
  } & {
116
- taskSettingPageUrl?: string | undefined;
117
132
  pageSize?: number | undefined;
118
133
  }> & Pick<import("vue").VueConstructor<import("vue").default>, "filter" | "extend" | "nextTick" | "set" | "delete" | "directive" | "component" | "use" | "mixin" | "compile" | "observable" | "util" | "config" | "version"> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
119
134
  value: number[];
@@ -121,6 +136,9 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
121
136
  uploadFilesFunc: UploadFileFunction;
122
137
  visible: boolean;
123
138
  showSendEmail: boolean;
139
+ showTaskSettingLink: boolean;
140
+ showNewBtn: boolean;
141
+ withGallery: boolean;
124
142
  openReviewButtonText: string;
125
143
  reviewText: string;
126
144
  allowClear: boolean;
@@ -128,7 +146,6 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
128
146
  pageMode: boolean;
129
147
  closeAfterAdd: boolean;
130
148
  } & {
131
- taskSettingPageUrl?: string | undefined;
132
149
  pageSize?: number | undefined;
133
150
  }, import("@vue/composition-api").ShallowUnwrapRef<{
134
151
  mainModal: import("@vue/composition-api").Ref<any>;
@@ -144,6 +161,8 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
144
161
  name: string;
145
162
  link: string;
146
163
  }[] | undefined;
164
+ taskType?: import("../types/task").StepType | undefined;
165
+ sampleDocList?: number[] | undefined;
147
166
  lawFirmId?: number | undefined;
148
167
  isGallery?: boolean | undefined;
149
168
  taskName?: string | undefined;
@@ -165,6 +184,8 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
165
184
  name: string;
166
185
  link: string;
167
186
  }[] | undefined;
187
+ taskType?: import("../types/task").StepType | undefined;
188
+ sampleDocList?: number[] | undefined;
168
189
  lawFirmId?: number | undefined;
169
190
  isGallery?: boolean | undefined;
170
191
  taskName?: string | undefined;
@@ -175,7 +196,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
175
196
  }[]>;
176
197
  userId: import("@vue/composition-api").ComputedRef<string | undefined>;
177
198
  lawFirmId: import("@vue/composition-api").ComputedRef<number | undefined>;
178
- writeQuery: (id: number, newRecord: TaskTemplate) => void;
199
+ writeQuery: (id: number, newRecord: TaskTemplate, isUpdate?: boolean) => void;
179
200
  editTask: (record: TaskTemplateComponentData) => void;
180
201
  _submit: (record: TaskTemplateMutateData) => Promise<void>;
181
202
  endReviewing: (result: any) => void;
@@ -185,6 +206,9 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
185
206
  uploadFilesFunc: UploadFileFunction;
186
207
  visible: boolean;
187
208
  showSendEmail: boolean;
209
+ showTaskSettingLink: boolean;
210
+ showNewBtn: boolean;
211
+ withGallery: boolean;
188
212
  openReviewButtonText: string;
189
213
  reviewText: string;
190
214
  allowClear: boolean;
@@ -192,13 +216,15 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
192
216
  pageMode: boolean;
193
217
  closeAfterAdd: boolean;
194
218
  } & {
195
- taskSettingPageUrl?: string | undefined;
196
219
  pageSize?: number | undefined;
197
220
  }, {
198
221
  value: number[];
199
222
  sendEmail: boolean;
200
223
  visible: boolean;
201
224
  showSendEmail: boolean;
225
+ showTaskSettingLink: boolean;
226
+ showNewBtn: boolean;
227
+ withGallery: boolean;
202
228
  openReviewButtonText: string;
203
229
  reviewText: string;
204
230
  allowClear: boolean;
@@ -9,6 +9,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
9
9
  TaskTypes: typeof TaskTypes;
10
10
  roles: Role[];
11
11
  isAttorneySelected: import("@vue/composition-api").ComputedRef<boolean>;
12
+ nameErrorContent: import("@vue/composition-api").Ref<string>;
12
13
  }> & import("@vue/composition-api").Data, {}, {}, {
13
14
  value: {
14
15
  type: PropType<TaskTemplate>;
@@ -37,6 +38,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
37
38
  TaskTypes: typeof TaskTypes;
38
39
  roles: Role[];
39
40
  isAttorneySelected: import("@vue/composition-api").ComputedRef<boolean>;
41
+ nameErrorContent: import("@vue/composition-api").Ref<string>;
40
42
  }>, import("@vue/composition-api").Data, {}, {}, {}, {}, {}, {
41
43
  value: TaskTemplate;
42
44
  uploadFilesFunc: UploadFileFunction;
@@ -9,8 +9,9 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
9
9
  type: PropType<TaskTemplateSearchInput>;
10
10
  required: true;
11
11
  };
12
- taskSettingPageUrl: {
13
- type: StringConstructor;
12
+ showTaskSettingLink: {
13
+ type: BooleanConstructor;
14
+ default: boolean;
14
15
  };
15
16
  inline: {
16
17
  type: BooleanConstructor;
@@ -20,29 +21,35 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
20
21
  type: NumberConstructor;
21
22
  default: number;
22
23
  };
24
+ showNewBtn: {
25
+ type: BooleanConstructor;
26
+ default: boolean;
27
+ };
23
28
  }, {
24
29
  conditions: TaskTemplateSearchInput;
30
+ showTaskSettingLink: boolean;
25
31
  inline: boolean;
26
32
  width: number;
27
- } & {
28
- taskSettingPageUrl?: string | undefined;
29
- }> & Pick<import("vue").VueConstructor<import("vue").default>, "filter" | "extend" | "nextTick" | "set" | "delete" | "directive" | "component" | "use" | "mixin" | "compile" | "observable" | "util" | "config" | "version"> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
33
+ showNewBtn: boolean;
34
+ } & {}> & Pick<import("vue").VueConstructor<import("vue").default>, "filter" | "extend" | "nextTick" | "set" | "delete" | "directive" | "component" | "use" | "mixin" | "compile" | "observable" | "util" | "config" | "version"> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
30
35
  conditions: TaskTemplateSearchInput;
36
+ showTaskSettingLink: boolean;
31
37
  inline: boolean;
32
38
  width: number;
33
- } & {
34
- taskSettingPageUrl?: string | undefined;
35
- }, import("@vue/composition-api").ShallowUnwrapRef<{
39
+ showNewBtn: boolean;
40
+ } & {}, import("@vue/composition-api").ShallowUnwrapRef<{
36
41
  AssigneeTypes: typeof AssigneeTypes;
37
42
  changeVal: (key: string, val: string | string[] | number[]) => void;
38
43
  }>, import("@vue/composition-api").Data, {}, {}, {}, {}, {}, {
39
44
  conditions: TaskTemplateSearchInput;
45
+ showTaskSettingLink: boolean;
40
46
  inline: boolean;
41
47
  width: number;
42
- } & {
43
- taskSettingPageUrl?: string | undefined;
44
- }, {
48
+ showNewBtn: boolean;
49
+ } & {}, {
50
+ showTaskSettingLink: boolean;
45
51
  inline: boolean;
46
52
  width: number;
53
+ showNewBtn: boolean;
47
54
  }, true>);
48
55
  export default _default;
@@ -4,6 +4,17 @@ export declare enum TaskTypes {
4
4
  clientReview = "For Client Review",
5
5
  worksheet = "Worksheet"
6
6
  }
7
+ export declare enum StepType {
8
+ worksheetForEmployeeEmployer = "WORKSHEET_FOR_EMPLOYEE_EMPLOYER",
9
+ beneficiary = "BENEFICIARY",
10
+ petitioner = "PETITIONER",
11
+ billing = "BILLING",
12
+ overseas = "OVERSEAS",
13
+ supplement = "SUPPLEMENT",
14
+ worksheetForAttorney = "WORKSHEET_FOR_ATTORNEY",
15
+ counterReviewAndSign = "COUNTER_REVIEW_AND_SIGN",
16
+ attorney = "ATTORNEY"
17
+ }
7
18
  interface BaseTaskTemplate {
8
19
  id?: number;
9
20
  taskName?: string;
@@ -28,6 +39,8 @@ export interface TaskTemplate extends BaseTaskTemplate {
28
39
  id?: number;
29
40
  isEmployee?: AssigneeTypeKeys;
30
41
  sampleDocs?: Document[];
42
+ taskType?: StepType;
43
+ sampleDocList?: number[];
31
44
  lawFirmId?: number;
32
45
  isGallery?: boolean;
33
46
  }
@@ -37,14 +50,15 @@ export interface TaskTemplateComponentData {
37
50
  isNotified?: boolean;
38
51
  [key: string]: any;
39
52
  }
40
- declare type UploadFileStatus = 'fulfilled';
53
+ declare type UploadFileStatus = 'fulfilled' | string;
54
+ export interface UploadRes {
55
+ status: UploadFileStatus;
56
+ value: Document;
57
+ }
41
58
  export declare type UploadFileFunction = (files: File[], params: {
42
59
  office_id: number;
43
60
  user_id: string;
44
- }) => Promise<{
45
- status: UploadFileStatus;
46
- value: Document;
47
- }[]>;
61
+ }) => Promise<UploadRes[]>;
48
62
  export declare enum TaskTemplateSortBy {
49
63
  default = "DEFAULT",
50
64
  id = "TASKTEMPLATEID",
package/dist/venus.es.js CHANGED
@@ -909,28 +909,23 @@ var __vue2_script$b = defineComponent({
909
909
  const remove = (id) => {
910
910
  emit("change", props.value.filter((v) => v.id !== id));
911
911
  };
912
- const beforeUpload = (file) => {
912
+ const beforeUpload = (file, files) => {
913
913
  var _a, _b;
914
914
  if (loading.value)
915
915
  return false;
916
916
  loading.value = true;
917
- props.uploadFilesFunc([file], {
917
+ props.uploadFilesFunc(files, {
918
918
  office_id: (_a = me.value) == null ? void 0 : _a.lawFirmId,
919
919
  user_id: (_b = me.value) == null ? void 0 : _b.id
920
- }).then(([
921
- {
922
- status,
923
- value: { id, name, link }
924
- }
925
- ]) => {
920
+ }).then((res) => {
926
921
  if (status === "fulfilled") {
927
922
  emit("change", [
928
923
  ...props.value,
929
- {
930
- id,
931
- name,
932
- link
933
- }
924
+ res.map(({ status: status2, value }) => {
925
+ if (status2 === "fulfilled") {
926
+ return value;
927
+ }
928
+ }).filter((v) => v)
934
929
  ]);
935
930
  }
936
931
  }).finally(() => {
@@ -974,10 +969,11 @@ var render$b = function() {
974
969
  var _c = _vm._self._c || _h;
975
970
  return _c("div", { class: { container: !_vm.previewMode } }, [_c("ant-modal", { attrs: { "visible": !!_vm.previewImage, "footer": null }, on: { "cancel": function($event) {
976
971
  _vm.previewImage = null;
977
- } } }, [_c("img", { staticStyle: { "width": "100%" }, attrs: { "src": _vm.previewImage } })]), _c("ant-upload", { staticStyle: { "display": "inline" }, attrs: { "disabled": _vm.disabled || _vm.loading, "before-upload": _vm.beforeUpload, "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) {
972
+ } } }, [_c("img", { staticStyle: { "width": "100%" }, attrs: { "src": _vm.previewImage } })]), _c("ant-upload", { staticStyle: { "display": "inline" }, attrs: { "multiple": "", "disabled": _vm.disabled || _vm.loading, "before-upload": _vm.beforeUpload, "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) {
978
973
  return _c("ant-tag", { key: file.id, attrs: { "closable": !_vm.previewMode && !_vm.disabled }, on: { "close": function($event) {
979
974
  return _vm.remove(file.id);
980
975
  } } }, [_c("a", { staticStyle: { "color": "#111" }, attrs: { "href": file.link, "target": "_blank" }, on: { "click": function($event) {
976
+ $event.stopPropagation();
981
977
  return _vm.clickItem(file, $event);
982
978
  } } }, [_vm._v(" " + _vm._s(file.name) + " ")])]);
983
979
  }), 1) : !_vm.previewMode ? _c("span", { staticStyle: { "color": "#ccc" } }, [_vm._v(_vm._s(_vm.acceptableFormats.join(" ")))]) : _vm._e()], 1)], 1);
@@ -985,7 +981,7 @@ var render$b = function() {
985
981
  var staticRenderFns$b = [];
986
982
  var index_vue_vue_type_style_index_0_scoped_true_lang$6 = "";
987
983
  const __cssModules$b = {};
988
- var __component__$b = /* @__PURE__ */ normalizeComponent(__vue2_script$b, render$b, staticRenderFns$b, false, __vue2_injectStyles$b, "38dac57e", null, null);
984
+ var __component__$b = /* @__PURE__ */ normalizeComponent(__vue2_script$b, render$b, staticRenderFns$b, false, __vue2_injectStyles$b, "36120c70", null, null);
989
985
  function __vue2_injectStyles$b(context) {
990
986
  for (let o in __cssModules$b) {
991
987
  this[o] = __cssModules$b[o];
@@ -1040,12 +1036,12 @@ var render$a = function() {
1040
1036
  var _vm = this;
1041
1037
  var _h = _vm.$createElement;
1042
1038
  var _c = _vm._self._c || _h;
1043
- return _c("ant-tag", { attrs: { "color": _vm.tagColor(_vm.assigneeType) } }, [_vm._v(" " + _vm._s(_vm.$t(_vm.AssigneeTypesText[_vm.assigneeType])) + " ")]);
1039
+ return _c("ant-tag", { attrs: { "color": _vm.tagColor(_vm.assigneeType || "EMPTY_DEFAULT") } }, [_vm._v(" " + _vm._s(_vm.$t(_vm.AssigneeTypesText[_vm.assigneeType])) + " ")]);
1044
1040
  };
1045
1041
  var staticRenderFns$a = [];
1046
1042
  var index_vue_vue_type_style_index_0_scoped_true_lang$5 = "";
1047
1043
  const __cssModules$a = {};
1048
- var __component__$a = /* @__PURE__ */ normalizeComponent(__vue2_script$a, render$a, staticRenderFns$a, false, __vue2_injectStyles$a, "145c1099", null, null);
1044
+ var __component__$a = /* @__PURE__ */ normalizeComponent(__vue2_script$a, render$a, staticRenderFns$a, false, __vue2_injectStyles$a, "3f69c61c", null, null);
1049
1045
  function __vue2_injectStyles$a(context) {
1050
1046
  for (let o in __cssModules$a) {
1051
1047
  this[o] = __cssModules$a[o];
@@ -1097,6 +1093,18 @@ var TaskTypes;
1097
1093
  TaskTypes2["clientReview"] = "For Client Review";
1098
1094
  TaskTypes2["worksheet"] = "Worksheet";
1099
1095
  })(TaskTypes || (TaskTypes = {}));
1096
+ var StepType;
1097
+ (function(StepType2) {
1098
+ StepType2["worksheetForEmployeeEmployer"] = "WORKSHEET_FOR_EMPLOYEE_EMPLOYER";
1099
+ StepType2["beneficiary"] = "BENEFICIARY";
1100
+ StepType2["petitioner"] = "PETITIONER";
1101
+ StepType2["billing"] = "BILLING";
1102
+ StepType2["overseas"] = "OVERSEAS";
1103
+ StepType2["supplement"] = "SUPPLEMENT";
1104
+ StepType2["worksheetForAttorney"] = "WORKSHEET_FOR_ATTORNEY";
1105
+ StepType2["counterReviewAndSign"] = "COUNTER_REVIEW_AND_SIGN";
1106
+ StepType2["attorney"] = "ATTORNEY";
1107
+ })(StepType || (StepType = {}));
1100
1108
  var TaskTemplateSortBy;
1101
1109
  (function(TaskTemplateSortBy2) {
1102
1110
  TaskTemplateSortBy2["default"] = "DEFAULT";
@@ -1176,10 +1184,18 @@ var __vue2_script$8 = defineComponent({
1176
1184
  setup(props, { emit }) {
1177
1185
  const nameError = ref(false);
1178
1186
  const typeError = ref(false);
1187
+ const nameErrorContent = ref("message.Required");
1179
1188
  const changeVal = useChangeVal(props, emit);
1180
1189
  const validFields = (callback) => {
1190
+ var _a;
1181
1191
  const data = refactorParams(props.value);
1182
- nameError.value = !data.taskName;
1192
+ if (!data.taskName) {
1193
+ nameError.value = true;
1194
+ nameErrorContent.value = "message.required";
1195
+ } else if (((_a = data.taskName) == null ? void 0 : _a.length) > 150) {
1196
+ nameError.value = true;
1197
+ nameErrorContent.value = "message.moreThan150";
1198
+ }
1183
1199
  typeError.value = !data.generalTaskType;
1184
1200
  callback(!nameError.value && !typeError.value, data, {
1185
1201
  nameError,
@@ -1204,7 +1220,8 @@ var __vue2_script$8 = defineComponent({
1204
1220
  validFields,
1205
1221
  TaskTypes,
1206
1222
  roles,
1207
- isAttorneySelected
1223
+ isAttorneySelected,
1224
+ nameErrorContent
1208
1225
  };
1209
1226
  }
1210
1227
  });
@@ -1214,7 +1231,7 @@ var render$8 = function() {
1214
1231
  var _c = _vm._self._c || _h;
1215
1232
  return _c("ant-form", { staticClass: "add-edit-task-modal", on: { "submit": function(e) {
1216
1233
  return e.preventDefault();
1217
- } } }, [_c("ant-row", { attrs: { "gutter": 20 } }, [_c("ant-col", { attrs: { "span": 12 } }, [_c("ant-form-item", { attrs: { "required": "", "name": "taskName", "label": _vm.$t("message.taskName"), "help": _vm.nameError ? _vm.$t("message.required") : void 0, "validate-status": _vm.nameError ? "error" : void 0 } }, [_c("ant-input", { attrs: { "disabled": _vm.disabled, "value": _vm.value.taskName }, on: { "input": function($event) {
1234
+ } } }, [_c("ant-row", { attrs: { "gutter": 20 } }, [_c("ant-col", { attrs: { "span": 12 } }, [_c("ant-form-item", { attrs: { "required": "", "name": "taskName", "label": _vm.$t("message.taskName"), "help": _vm.nameError ? _vm.$t(_vm.nameErrorContent) : void 0, "validate-status": _vm.nameError ? "error" : void 0 } }, [_c("ant-input", { attrs: { "disabled": _vm.disabled, "value": _vm.value.taskName }, on: { "input": function($event) {
1218
1235
  return _vm.changeVal("taskName", $event.target.value);
1219
1236
  } } })], 1)], 1), _c("ant-col", { attrs: { "span": 12 } }, [_c("ant-form-item", { attrs: { "label": "" + _vm.$t("message.assignee") + " (" + _vm.$t("message.optional") + ")" } }, [_c("ant-select", { staticStyle: { "min-width": "170px" }, attrs: { "disabled": _vm.disabled, "value": _vm.value.isEmployee, "allowClear": true }, on: { "change": function($event) {
1220
1237
  return _vm.changeVal("isEmployee", $event);
@@ -1233,7 +1250,7 @@ var render$8 = function() {
1233
1250
  var staticRenderFns$8 = [];
1234
1251
  var index_vue_vue_type_style_index_0_scoped_true_lang$3 = "";
1235
1252
  const __cssModules$8 = {};
1236
- var __component__$8 = /* @__PURE__ */ normalizeComponent(__vue2_script$8, render$8, staticRenderFns$8, false, __vue2_injectStyles$8, "58dbc3e8", null, null);
1253
+ var __component__$8 = /* @__PURE__ */ normalizeComponent(__vue2_script$8, render$8, staticRenderFns$8, false, __vue2_injectStyles$8, "5b530226", null, null);
1237
1254
  function __vue2_injectStyles$8(context) {
1238
1255
  for (let o in __cssModules$8) {
1239
1256
  this[o] = __cssModules$8[o];
@@ -1284,6 +1301,10 @@ var __vue2_script$7 = defineComponent({
1284
1301
  loading: {
1285
1302
  type: Boolean,
1286
1303
  default: false
1304
+ },
1305
+ hasDoubleConfirm: {
1306
+ type: Boolean,
1307
+ default: true
1287
1308
  }
1288
1309
  },
1289
1310
  setup(props, { emit }) {
@@ -1302,8 +1323,8 @@ var __vue2_script$7 = defineComponent({
1302
1323
  selfUserId: props.userId,
1303
1324
  selfLawFirmId: props.lawFirmId,
1304
1325
  taskTemplateId: ts.id,
1305
- isAddedToTask: props.value.isAddedToTask,
1306
- isNotified: props.value.isNotified
1326
+ isAddedToTask: props.value.isAddedToTask || false,
1327
+ isNotified: props.value.isNotified || false
1307
1328
  };
1308
1329
  emit("submit", data);
1309
1330
  }
@@ -1344,7 +1365,7 @@ var render$7 = function() {
1344
1365
  } }, scopedSlots: _vm._u([{ key: "footer", fn: function() {
1345
1366
  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) {
1346
1367
  return _vm.changeVal("isNotified", $event.target.checked);
1347
- } } }, [_vm._v(" " + _vm._s(_vm.$t("message.sendEmail")) + " ")])], 1) : _vm._e(), _c("div", [_c("ant-popconfirm", { attrs: { "title": "\u6587\u6848\u7F3A\u5931", "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", { on: { "click": function($event) {
1368
+ } } }, [_vm._v(" " + _vm._s(_vm.$t("message.sendEmail")) + " ")])], 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) {
1348
1369
  return _vm.changeVisible(false);
1349
1370
  } } }, [_vm._v(_vm._s(_vm.$t("message.cancel")) + " ")])], 1)])];
1350
1371
  }, 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) {
@@ -1354,7 +1375,7 @@ var render$7 = function() {
1354
1375
  var staticRenderFns$7 = [];
1355
1376
  var index_vue_vue_type_style_index_0_scoped_true_lang$2 = "";
1356
1377
  const __cssModules$7 = {};
1357
- var __component__$7 = /* @__PURE__ */ normalizeComponent(__vue2_script$7, render$7, staticRenderFns$7, false, __vue2_injectStyles$7, "2617d5ac", null, null);
1378
+ var __component__$7 = /* @__PURE__ */ normalizeComponent(__vue2_script$7, render$7, staticRenderFns$7, false, __vue2_injectStyles$7, "f0709198", null, null);
1358
1379
  function __vue2_injectStyles$7(context) {
1359
1380
  for (let o in __cssModules$7) {
1360
1381
  this[o] = __cssModules$7[o];
@@ -1376,8 +1397,9 @@ var __vue2_script$6 = defineComponent({
1376
1397
  type: Object,
1377
1398
  required: true
1378
1399
  },
1379
- taskSettingPageUrl: {
1380
- type: String
1400
+ showTaskSettingLink: {
1401
+ type: Boolean,
1402
+ default: true
1381
1403
  },
1382
1404
  inline: {
1383
1405
  type: Boolean,
@@ -1386,6 +1408,10 @@ var __vue2_script$6 = defineComponent({
1386
1408
  width: {
1387
1409
  type: Number,
1388
1410
  default: 300
1411
+ },
1412
+ showNewBtn: {
1413
+ type: Boolean,
1414
+ default: true
1389
1415
  }
1390
1416
  },
1391
1417
  setup(props, { emit }) {
@@ -1412,16 +1438,16 @@ var render$6 = function() {
1412
1438
  return _vm.changeVal("keywords", $event.target.value);
1413
1439
  } }, scopedSlots: _vm._u([{ key: "suffix", fn: function() {
1414
1440
  return void 0;
1415
- }, proxy: true }]) }), _c("ant-button", { class: { taskTemplateInline: _vm.inline }, staticStyle: { "margin-left": "20px", "float": "right" }, on: { "click": function($event) {
1441
+ }, proxy: true }]) }), _vm.showNewBtn ? _c("ant-button", { class: { taskTemplateInline: _vm.inline }, staticStyle: { "margin-left": "20px", "float": "right" }, on: { "click": function($event) {
1416
1442
  return _vm.$emit("update:newTaskVisible", true);
1417
- } } }, [_vm._v(" " + _vm._s(_vm.$t("message.newTask")) + " ")]), _vm.taskSettingPageUrl ? _c("a", { class: { taskTemplateInline: _vm.inline }, staticStyle: { "float": "right", "margin-top": "5px", "color": "dodgerblue !important" }, attrs: { "href": _vm.taskSettingPageUrl, "target": "_blank" } }, [_vm._v(" " + _vm._s(_vm.$t("message.taskSetting")) + " ")]) : _vm._e(), _c("div", { class: { taskTemplateInline: _vm.inline }, staticStyle: { "margin-top": "20px" } }, [_c("ant-checkbox-group", { attrs: { "value": _vm.conditions.isEmployee }, on: { "change": function($event) {
1443
+ } } }, [_vm._v(" " + _vm._s(_vm.$t("message.newTask")) + " ")]) : _vm._e(), _vm.showTaskSettingLink ? _c("a", { class: { taskTemplateInline: _vm.inline }, staticStyle: { "float": "right", "margin-top": "5px", "color": "dodgerblue !important" }, attrs: { "href": "/task-templates", "target": "_blank" } }, [_vm._v(" " + _vm._s(_vm.$t("message.taskSetting")) + " ")]) : _vm._e(), _c("div", { class: { taskTemplateInline: _vm.inline }, staticStyle: { "margin-top": "20px" } }, [_c("ant-checkbox-group", { attrs: { "value": _vm.conditions.isEmployee }, on: { "change": function($event) {
1418
1444
  return _vm.changeVal("isEmployee", $event);
1419
- } } }, [_c("ant-checkbox", { attrs: { "value": _vm.AssigneeTypes.ATTORNEY } }, [_vm._v(_vm._s(_vm.$t("message.attorney")) + " ")]), _c("ant-checkbox", { attrs: { "value": _vm.AssigneeTypes.BENEFICIARY } }, [_vm._v(_vm._s(_vm.$t("message.beneficiary")) + " ")]), _c("ant-checkbox", { attrs: { "value": _vm.AssigneeTypes.PETITIONER } }, [_vm._v(_vm._s(_vm.$t("message.petitioner")) + " ")])], 1)], 1)], 1);
1445
+ } } }, [_c("ant-checkbox", { attrs: { "value": _vm.AssigneeTypes.ATTORNEY } }, [_vm._v(_vm._s(_vm.$t("message.attorney")) + " ")]), _c("ant-checkbox", { attrs: { "value": _vm.AssigneeTypes.BENEFICIARY } }, [_vm._v(_vm._s(_vm.$t("message.beneficiary")) + " ")]), _c("ant-checkbox", { attrs: { "value": _vm.AssigneeTypes.PETITIONER } }, [_vm._v(_vm._s(_vm.$t("message.petitioner")) + " ")]), _c("ant-checkbox", { attrs: { "value": _vm.AssigneeTypes.EMPTY_DEFAULT } }, [_vm._v(_vm._s(_vm.$t("message.none")) + " ")])], 1)], 1)], 1);
1420
1446
  };
1421
1447
  var staticRenderFns$6 = [];
1422
1448
  var index_vue_vue_type_style_index_0_scoped_true_lang$1 = "";
1423
1449
  const __cssModules$6 = {};
1424
- var __component__$6 = /* @__PURE__ */ normalizeComponent(__vue2_script$6, render$6, staticRenderFns$6, false, __vue2_injectStyles$6, "c3a26010", null, null);
1450
+ var __component__$6 = /* @__PURE__ */ normalizeComponent(__vue2_script$6, render$6, staticRenderFns$6, false, __vue2_injectStyles$6, "c5d917d8", null, null);
1425
1451
  function __vue2_injectStyles$6(context) {
1426
1452
  for (let o in __cssModules$6) {
1427
1453
  this[o] = __cssModules$6[o];
@@ -1475,7 +1501,8 @@ var __vue2_script$5 = defineComponent({
1475
1501
  {
1476
1502
  title: t("message.taskName"),
1477
1503
  dataIndex: "taskName",
1478
- key: "taskName"
1504
+ key: "taskName",
1505
+ scopedSlots: { customRender: "taskName" }
1479
1506
  },
1480
1507
  {
1481
1508
  title: t("message.assignee"),
@@ -1514,6 +1541,8 @@ var render$5 = function() {
1514
1541
  return _vm.$emit("changePagination", $event);
1515
1542
  } }, scopedSlots: _vm._u([{ key: "isEmployee", fn: function(isEmployee) {
1516
1543
  return _c("span", {}, [_c("assignee-tag", { attrs: { "assignee-type": isEmployee } })], 1);
1544
+ } }, { key: "taskName", fn: function(taskName) {
1545
+ return _c("span", {}, [_c("span", { staticStyle: { "word-break": "break-word" } }, [_vm._v(_vm._s(taskName))])]);
1517
1546
  } }, { key: "tagList", fn: function(tags) {
1518
1547
  return [_c("tags-with-tooltip", { attrs: { "tags": tags } })];
1519
1548
  } }, { key: "operation", fn: function(_, record) {
@@ -1529,7 +1558,7 @@ var render$5 = function() {
1529
1558
  var staticRenderFns$5 = [];
1530
1559
  var TaskTablePure_vue_vue_type_style_index_0_scoped_true_lang = "";
1531
1560
  const __cssModules$5 = {};
1532
- var __component__$5 = /* @__PURE__ */ normalizeComponent(__vue2_script$5, render$5, staticRenderFns$5, false, __vue2_injectStyles$5, "2e685386", null, null);
1561
+ var __component__$5 = /* @__PURE__ */ normalizeComponent(__vue2_script$5, render$5, staticRenderFns$5, false, __vue2_injectStyles$5, "565e42da", null, null);
1533
1562
  function __vue2_injectStyles$5(context) {
1534
1563
  for (let o in __cssModules$5) {
1535
1564
  this[o] = __cssModules$5[o];
@@ -1538,7 +1567,7 @@ function __vue2_injectStyles$5(context) {
1538
1567
  var TaskTablePure = /* @__PURE__ */ function() {
1539
1568
  return __component__$5.exports;
1540
1569
  }();
1541
- var useSearchTaskTemplates = (pagination, conditions = ref({}), lawFirmId) => {
1570
+ var useSearchTaskTemplates = (pagination, conditions = ref({}), lawFirmId, withGallery = true) => {
1542
1571
  const startIndex = computed(() => (pagination.value.current - 1) * pagination.value.pageSize);
1543
1572
  const endIndex = computed(() => startIndex.value + pagination.value.pageSize);
1544
1573
  watch(() => conditions.value, () => {
@@ -1547,7 +1576,7 @@ var useSearchTaskTemplates = (pagination, conditions = ref({}), lawFirmId) => {
1547
1576
  });
1548
1577
  return useQuery(SearchTaskTemplatesQuery, () => ({
1549
1578
  query: {
1550
- includeGallery: true,
1579
+ includeGallery: withGallery,
1551
1580
  keywords: conditions.value.keywords || "",
1552
1581
  isEmployee: conditions.value.isEmployee,
1553
1582
  taskTemplateId: conditions.value.taskTemplateId,
@@ -1565,6 +1594,7 @@ const taskTemplateFragment = gql`
1565
1594
  taskName
1566
1595
  tagList
1567
1596
  isEmployee
1597
+ taskType
1568
1598
  generalTaskType
1569
1599
  descriptions
1570
1600
  sampleDocs {
@@ -1572,6 +1602,7 @@ const taskTemplateFragment = gql`
1572
1602
  name
1573
1603
  link
1574
1604
  }
1605
+ sampleDocList
1575
1606
  updatedUser{
1576
1607
  id
1577
1608
  name
@@ -1626,7 +1657,7 @@ var useTaskTemplateTableData = (props, emit) => {
1626
1657
  total: 0
1627
1658
  });
1628
1659
  const { conditions = useSearchTaskConditions(), addedTasks = ref([]) } = toRefs(props);
1629
- const { result, loading, variables } = useSearchTaskTemplates(initialPagination, conditions, props.lawFirmId);
1660
+ const { result, loading, variables } = useSearchTaskTemplates(initialPagination, conditions, props.lawFirmId, props.withGallery);
1630
1661
  const dataSource = computed(() => {
1631
1662
  var _a;
1632
1663
  return ((_a = result.value) == null ? void 0 : _a.taskTemplateSearch.taskTemplateList) || [];
@@ -1676,6 +1707,10 @@ var __vue2_script$4 = defineComponent({
1676
1707
  },
1677
1708
  pageSize: {
1678
1709
  type: Number
1710
+ },
1711
+ withGallery: {
1712
+ type: Boolean,
1713
+ default: true
1679
1714
  }
1680
1715
  },
1681
1716
  setup(props, { emit }) {
@@ -1713,7 +1748,7 @@ var render$4 = function() {
1713
1748
  var staticRenderFns$4 = [];
1714
1749
  var TaskTable_vue_vue_type_style_index_0_scoped_true_lang = "";
1715
1750
  const __cssModules$4 = {};
1716
- var __component__$4 = /* @__PURE__ */ normalizeComponent(__vue2_script$4, render$4, staticRenderFns$4, false, __vue2_injectStyles$4, "7b828978", null, null);
1751
+ var __component__$4 = /* @__PURE__ */ normalizeComponent(__vue2_script$4, render$4, staticRenderFns$4, false, __vue2_injectStyles$4, "6662fabb", null, null);
1717
1752
  function __vue2_injectStyles$4(context) {
1718
1753
  for (let o in __cssModules$4) {
1719
1754
  this[o] = __cssModules$4[o];
@@ -1742,8 +1777,9 @@ var __vue2_script$3 = defineComponent({
1742
1777
  type: Number,
1743
1778
  required: true
1744
1779
  },
1745
- taskSettingPageUrl: {
1746
- type: String
1780
+ showTaskSettingLink: {
1781
+ type: Boolean,
1782
+ default: true
1747
1783
  },
1748
1784
  showPage: {
1749
1785
  type: Boolean,
@@ -1755,6 +1791,14 @@ var __vue2_script$3 = defineComponent({
1755
1791
  openReviewButtonText: {
1756
1792
  type: String,
1757
1793
  default: "Review and add to template"
1794
+ },
1795
+ withGallery: {
1796
+ type: Boolean,
1797
+ default: true
1798
+ },
1799
+ showNewBtn: {
1800
+ type: Boolean,
1801
+ default: true
1758
1802
  }
1759
1803
  },
1760
1804
  setup(props, { emit }) {
@@ -1787,11 +1831,11 @@ var render$3 = function() {
1787
1831
  } } }, [_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) {
1788
1832
  return _vm.$emit("update:reviewModalVisible", true);
1789
1833
  } } }, [_vm._v(" " + _vm._s(_vm.openReviewButtonText) + " ")])], 1)];
1790
- }, 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) {
1834
+ }, proxy: true }]) }, [_c("task-template-filter", { attrs: { "show-task-home-page-link": true, "show-task-setting-link": _vm.showTaskSettingLink, "conditions": _vm.conditions, "inline": !!_vm.showPage, "show-new-btn": _vm.showNewBtn }, on: { "update:conditions": function($event) {
1791
1835
  _vm.conditions = $event;
1792
1836
  }, "update:newTaskVisible": function($event) {
1793
1837
  return _vm.$emit("update:newTaskVisible", true);
1794
- } } }), _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) {
1838
+ } } }), _c("task-table", { ref: "taskTable", attrs: { "conditions": _vm.conditions, "added-tasks": _vm.addedTasks, "law-firm-id": _vm.lawFirmId, "page-size": _vm.pageSize, "with-gallery": _vm.withGallery }, on: { "update:addedTasks": function($event) {
1795
1839
  return _vm.$emit("update:addedTasks", $event);
1796
1840
  }, "editTask": function($event) {
1797
1841
  return _vm.$emit("editTask", $event);
@@ -1806,7 +1850,7 @@ var render$3 = function() {
1806
1850
  var staticRenderFns$3 = [];
1807
1851
  var MainModal_vue_vue_type_style_index_0_scoped_true_lang = "";
1808
1852
  const __cssModules$3 = {};
1809
- var __component__$3 = /* @__PURE__ */ normalizeComponent(__vue2_script$3, render$3, staticRenderFns$3, false, __vue2_injectStyles$3, "b2f78f98", null, null);
1853
+ var __component__$3 = /* @__PURE__ */ normalizeComponent(__vue2_script$3, render$3, staticRenderFns$3, false, __vue2_injectStyles$3, "68bc0589", null, null);
1810
1854
  function __vue2_injectStyles$3(context) {
1811
1855
  for (let o in __cssModules$3) {
1812
1856
  this[o] = __cssModules$3[o];
@@ -2019,8 +2063,9 @@ var __vue2_script$1 = defineComponent({
2019
2063
  type: Boolean,
2020
2064
  default: false
2021
2065
  },
2022
- taskSettingPageUrl: {
2023
- type: String
2066
+ showTaskSettingLink: {
2067
+ type: Boolean,
2068
+ default: true
2024
2069
  },
2025
2070
  allowClear: {
2026
2071
  type: Boolean,
@@ -2040,6 +2085,14 @@ var __vue2_script$1 = defineComponent({
2040
2085
  adding: {
2041
2086
  type: Boolean,
2042
2087
  default: false
2088
+ },
2089
+ withGallery: {
2090
+ type: Boolean,
2091
+ default: true
2092
+ },
2093
+ showNewBtn: {
2094
+ type: Boolean,
2095
+ default: true
2043
2096
  }
2044
2097
  },
2045
2098
  setup(props, { emit }) {
@@ -2083,24 +2136,30 @@ var __vue2_script$1 = defineComponent({
2083
2136
  emit("update:value", newValue.map(({ id }) => id));
2084
2137
  }
2085
2138
  };
2086
- const writeQuery = (id, newRecord) => {
2139
+ const writeQuery = (id, newRecord, isUpdate = true) => {
2140
+ console.log(id, newRecord);
2087
2141
  const variables = mainModal.value.getVariables();
2088
2142
  const existed = client.readQuery({
2089
2143
  query: SearchTaskTemplatesQuery,
2090
2144
  variables
2091
2145
  });
2146
+ console.log(variables);
2147
+ const newTasks = isUpdate ? existed.taskTemplateSearch.taskTemplateList.map((record) => {
2148
+ if (record.id === id) {
2149
+ return newRecord && __spreadProps(__spreadValues({}, newRecord), {
2150
+ isGallery: record.isGallery
2151
+ });
2152
+ }
2153
+ return record;
2154
+ }).filter((record) => !!record) : [
2155
+ __spreadProps(__spreadValues({}, newRecord), { isGallery: false }),
2156
+ ...existed.taskTemplateSearch.taskTemplateList
2157
+ ];
2092
2158
  client.writeQuery({
2093
2159
  query: SearchTaskTemplatesQuery,
2094
2160
  data: {
2095
2161
  taskTemplateSearch: __spreadProps(__spreadValues({}, existed.taskTemplateSearch), {
2096
- taskTemplateList: existed.taskTemplateSearch.taskTemplateList.map((record) => {
2097
- if (record.id === id) {
2098
- return newRecord && __spreadProps(__spreadValues({}, newRecord), {
2099
- isGallery: record.isGallery
2100
- });
2101
- }
2102
- return record;
2103
- }).filter((record) => !!record)
2162
+ taskTemplateList: newTasks
2104
2163
  })
2105
2164
  },
2106
2165
  variables
@@ -2109,8 +2168,7 @@ var __vue2_script$1 = defineComponent({
2109
2168
  const _submit = async (record) => {
2110
2169
  const { newRecord, success, isUpdate } = await submit(record, updateTemplate, createTemplate);
2111
2170
  if (success) {
2112
- if (!isUpdate)
2113
- writeQuery(record.taskTemplateId, newRecord);
2171
+ writeQuery(record.taskTemplateId, newRecord, isUpdate);
2114
2172
  newTaskVisible.value = false;
2115
2173
  updateReviewModalContent(record, newRecord);
2116
2174
  emit("task-added", newRecord);
@@ -2149,7 +2207,7 @@ var render$1 = function() {
2149
2207
  var _vm = this;
2150
2208
  var _h = _vm.$createElement;
2151
2209
  var _c = _vm._self._c || _h;
2152
- return _vm.lawFirmId != null ? _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) {
2210
+ return _vm.lawFirmId != null ? _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, "show-new-btn": _vm.showNewBtn, "with-gallery": _vm.withGallery, "added-tasks": _vm.addedTasks, "newTaskVisible": _vm.newTaskVisible, "show-task-setting-link": _vm.showTaskSettingLink, "reviewModalVisible": _vm.reviewModalVisible, "open-review-button-text": _vm.openReviewButtonText }, on: { "update:tempTask": function($event) {
2153
2211
  _vm.tempTask = $event;
2154
2212
  }, "update:temp-task": function($event) {
2155
2213
  _vm.tempTask = $event;
@@ -2189,7 +2247,7 @@ var render$1 = function() {
2189
2247
  _vm.newTaskVisible = $event;
2190
2248
  }, "submit": _vm.endReviewing, "update:sendEmail": function($event) {
2191
2249
  return _vm.$emit("update:sendEmail", $event);
2192
- } } }), _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) {
2250
+ } } }), _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, "has-double-confirm": !!_vm.tempTask.taskTemplateObj.id }, on: { "update:value": function($event) {
2193
2251
  _vm.tempTask = $event;
2194
2252
  }, "update:visible": function($event) {
2195
2253
  _vm.newTaskVisible = $event;
@@ -2198,7 +2256,7 @@ var render$1 = function() {
2198
2256
  var staticRenderFns$1 = [];
2199
2257
  var index_vue_vue_type_style_index_0_scoped_true_lang = "";
2200
2258
  const __cssModules$1 = {};
2201
- var __component__$1 = /* @__PURE__ */ normalizeComponent(__vue2_script$1, render$1, staticRenderFns$1, false, __vue2_injectStyles$1, "5099cd32", null, null);
2259
+ var __component__$1 = /* @__PURE__ */ normalizeComponent(__vue2_script$1, render$1, staticRenderFns$1, false, __vue2_injectStyles$1, "2f41d51a", null, null);
2202
2260
  function __vue2_injectStyles$1(context) {
2203
2261
  for (let o in __cssModules$1) {
2204
2262
  this[o] = __cssModules$1[o];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ailaw/venus",
3
- "version": "0.6.1",
3
+ "version": "0.6.5",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -16,16 +16,16 @@
16
16
  "dependencies": {
17
17
  "@apollo/client": "^3.5.7",
18
18
  "@vue/apollo-composable": "^4.0.0-alpha.16",
19
+ "@vue/composition-api": "^1.4.5",
19
20
  "ant-design-vue": "^1.7.8",
20
21
  "graphql": "^15.8.0",
21
22
  "graphql-tag": "^2.12.6",
22
23
  "ramda": "^0.27.1",
24
+ "vue": "^2.0.0 || >=3.0.0",
23
25
  "vue-demi": "^0.12.1",
24
26
  "vue-i18n": "^8.11.2",
25
27
  "vxe-table": "^3.4.13",
26
- "whatwg-fetch": "^3.6.2",
27
- "vue": "^2.0.0 || >=3.0.0",
28
- "@vue/composition-api": "^1.4.5"
28
+ "whatwg-fetch": "^3.6.2"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@tailwindcss/postcss7-compat": "^2.2.17",