@ailaw/venus 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hooks/useT.d.ts +1 -0
- package/dist/index.d.ts +1 -2
- package/dist/languages/en.d.ts +38 -0
- package/dist/languages/index.d.ts +3 -0
- package/dist/new-task/aFileUploader.vue.d.ts +37 -0
- package/dist/style.css +1 -1
- package/dist/task-form/index.vue.d.ts +55 -0
- package/dist/task-form/useChangeVal.d.ts +2 -0
- package/dist/types/common.d.ts +31 -0
- package/dist/types/task.d.ts +93 -0
- package/dist/venus.cjs.js +4 -4
- package/dist/venus.es.js +385 -64
- package/package.json +6 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function useT(): (key: string) => import("vue-i18n").default.TranslateResult;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import './index.css';
|
|
2
|
-
export { default as useMe } from './hooks/useMe';
|
|
3
2
|
export { default as ProfileSelect } from './profile-select/index.vue';
|
|
4
|
-
export { default as
|
|
3
|
+
export { default as TaskForm } from './task-form/index.vue';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
message: {
|
|
3
|
+
taskName: string;
|
|
4
|
+
assignee: string;
|
|
5
|
+
descriptions: string;
|
|
6
|
+
tags: string;
|
|
7
|
+
clientUpload: string;
|
|
8
|
+
clientReview: string;
|
|
9
|
+
newTask: string;
|
|
10
|
+
editTask: string;
|
|
11
|
+
attachment: string;
|
|
12
|
+
selectFile: string;
|
|
13
|
+
addToTaskList: string;
|
|
14
|
+
required: string;
|
|
15
|
+
optional: string;
|
|
16
|
+
submit: string;
|
|
17
|
+
cancel: string;
|
|
18
|
+
beneficiary: string;
|
|
19
|
+
petitioner: string;
|
|
20
|
+
attorney: string;
|
|
21
|
+
type: string;
|
|
22
|
+
sendEmail: string;
|
|
23
|
+
addTask: string;
|
|
24
|
+
clickToEdit: string;
|
|
25
|
+
tag: string;
|
|
26
|
+
reviewTasks: string;
|
|
27
|
+
reviewTasksTitle: string;
|
|
28
|
+
add: string;
|
|
29
|
+
remove: string;
|
|
30
|
+
success: string;
|
|
31
|
+
tasks: string;
|
|
32
|
+
sendTaskEmail: string;
|
|
33
|
+
none: string;
|
|
34
|
+
default: string;
|
|
35
|
+
taskSetting: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
export default _default;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { PropType } from 'vue-demi';
|
|
2
|
+
import { UploadFileFunction } from '@/types/task';
|
|
3
|
+
import { Document } from '@/types/common';
|
|
4
|
+
declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
5
|
+
changeVal: (k: string, v: any) => void;
|
|
6
|
+
remove: (id: string) => void;
|
|
7
|
+
beforeUpload: (file: File) => boolean;
|
|
8
|
+
loading: import("@vue/composition-api").Ref<boolean>;
|
|
9
|
+
allowFiles: string[];
|
|
10
|
+
}> & import("@vue/composition-api").Data, {}, {}, {
|
|
11
|
+
value: {
|
|
12
|
+
type: PropType<Document[]>;
|
|
13
|
+
default: () => never[];
|
|
14
|
+
};
|
|
15
|
+
uploadFilesFunc: {
|
|
16
|
+
type: PropType<UploadFileFunction>;
|
|
17
|
+
required: true;
|
|
18
|
+
};
|
|
19
|
+
}, {
|
|
20
|
+
value: Document[];
|
|
21
|
+
uploadFilesFunc: UploadFileFunction;
|
|
22
|
+
} & {}> & 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<{
|
|
23
|
+
value: Document[];
|
|
24
|
+
uploadFilesFunc: UploadFileFunction;
|
|
25
|
+
} & {}, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
26
|
+
changeVal: (k: string, v: any) => void;
|
|
27
|
+
remove: (id: string) => void;
|
|
28
|
+
beforeUpload: (file: File) => boolean;
|
|
29
|
+
loading: import("@vue/composition-api").Ref<boolean>;
|
|
30
|
+
allowFiles: string[];
|
|
31
|
+
}>, import("@vue/composition-api").Data, {}, {}, {}, {}, {}, {
|
|
32
|
+
value: Document[];
|
|
33
|
+
uploadFilesFunc: UploadFileFunction;
|
|
34
|
+
} & {}, {
|
|
35
|
+
value: Document[];
|
|
36
|
+
}, true>);
|
|
37
|
+
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=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}::-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}.my-1{margin-top:.25rem;margin-bottom:.25rem}.mr-2{margin-right:.5rem}.mb-5{margin-bottom:1.25rem}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.table{display:table}.h-6{height:1.5rem}.h-screen{height:100vh}.w-6{width:1.5rem}.w-60{width:15rem}.w-72{width:18rem}.flex-1{flex:1 1 0%}@-webkit-keyframes spin{to{transform:rotate(360deg)}}@keyframes spin{to{transform:rotate(360deg)}}@-webkit-keyframes ping{75%,to{transform:scale(2);opacity:0}}@keyframes ping{75%,to{transform:scale(2);opacity:0}}@-webkit-keyframes pulse{50%{opacity:.5}}@keyframes pulse{50%{opacity:.5}}@-webkit-keyframes bounce{0%,to{transform:translateY(-25%);-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1)}}@keyframes bounce{0%,to{transform:translateY(-25%);-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1)}}.items-center{align-items:center}.justify-end{justify-content:flex-end}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.border{border-width:1px}.p-4{padding:1rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.capitalize{text-transform:capitalize}.text-secondary{--tw-text-opacity: 1;color:rgba(102,102,102,var(--tw-text-opacity))}*,:before,:after{--tw-shadow: 0 0 #0000}*,:before,:after{--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgba(59, 130, 246, .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000}.filter{--tw-blur: var(--tw-empty, );--tw-brightness: var(--tw-empty, );--tw-contrast: var(--tw-empty, );--tw-grayscale: var(--tw-empty, );--tw-hue-rotate: var(--tw-empty, );--tw-invert: var(--tw-empty, );--tw-saturate: var(--tw-empty, );--tw-sepia: var(--tw-empty, );--tw-drop-shadow: var(--tw-empty, );filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur{--tw-blur: blur(8px)}
|
|
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=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}::-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}.my-1{margin-top:.25rem;margin-bottom:.25rem}.mr-2{margin-right:.5rem}.mb-5{margin-bottom:1.25rem}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.table{display:table}.h-6{height:1.5rem}.h-screen{height:100vh}.w-6{width:1.5rem}.w-60{width:15rem}.w-72{width:18rem}.flex-1{flex:1 1 0%}@-webkit-keyframes spin{to{transform:rotate(360deg)}}@keyframes spin{to{transform:rotate(360deg)}}@-webkit-keyframes ping{75%,to{transform:scale(2);opacity:0}}@keyframes ping{75%,to{transform:scale(2);opacity:0}}@-webkit-keyframes pulse{50%{opacity:.5}}@keyframes pulse{50%{opacity:.5}}@-webkit-keyframes bounce{0%,to{transform:translateY(-25%);-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1)}}@keyframes bounce{0%,to{transform:translateY(-25%);-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1)}}.items-center{align-items:center}.justify-end{justify-content:flex-end}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.border{border-width:1px}.p-4{padding:1rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.capitalize{text-transform:capitalize}.text-secondary{--tw-text-opacity: 1;color:rgba(102,102,102,var(--tw-text-opacity))}*,:before,:after{--tw-shadow: 0 0 #0000}*,:before,:after{--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgba(59, 130, 246, .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000}.filter{--tw-blur: var(--tw-empty, );--tw-brightness: var(--tw-empty, );--tw-contrast: var(--tw-empty, );--tw-grayscale: var(--tw-empty, );--tw-hue-rotate: var(--tw-empty, );--tw-invert: var(--tw-empty, );--tw-saturate: var(--tw-empty, );--tw-sepia: var(--tw-empty, );--tw-drop-shadow: var(--tw-empty, );filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur{--tw-blur: blur(8px)}.container[data-v-9fae2c5a]{border:1px solid #cccccc;border-radius:6px;padding:0 4px;min-height:30px;cursor:pointer}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { PropType } from 'vue-demi';
|
|
2
|
+
import { Role, TaskTemplate, TaskTemplateGraphData, UploadFileFunction } from '@/types/task';
|
|
3
|
+
import { TaskTypes } from '@/types/task';
|
|
4
|
+
declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
5
|
+
typeError: import("@vue/composition-api").Ref<boolean>;
|
|
6
|
+
nameError: import("@vue/composition-api").Ref<boolean>;
|
|
7
|
+
changeVal: (k: string, v: any) => void;
|
|
8
|
+
validFields: (callback: (passed: boolean, data: TaskTemplateGraphData, errors: Object) => void) => void;
|
|
9
|
+
TaskTypes: typeof TaskTypes;
|
|
10
|
+
roles: Role[];
|
|
11
|
+
isAttorneySelected: import("@vue/composition-api").ComputedRef<boolean>;
|
|
12
|
+
$t: (key: string) => import("vue-i18n").default.TranslateResult;
|
|
13
|
+
}> & import("@vue/composition-api").Data, {}, {}, {
|
|
14
|
+
value: {
|
|
15
|
+
type: PropType<TaskTemplate>;
|
|
16
|
+
required: true;
|
|
17
|
+
};
|
|
18
|
+
userId: {
|
|
19
|
+
type: StringConstructor;
|
|
20
|
+
required: true;
|
|
21
|
+
};
|
|
22
|
+
lawFirmId: {
|
|
23
|
+
type: NumberConstructor;
|
|
24
|
+
required: true;
|
|
25
|
+
};
|
|
26
|
+
uploadFilesFunc: {
|
|
27
|
+
type: PropType<UploadFileFunction>;
|
|
28
|
+
required: true;
|
|
29
|
+
};
|
|
30
|
+
}, {
|
|
31
|
+
lawFirmId: number;
|
|
32
|
+
value: TaskTemplate;
|
|
33
|
+
uploadFilesFunc: UploadFileFunction;
|
|
34
|
+
userId: string;
|
|
35
|
+
} & {}> & 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<{
|
|
36
|
+
lawFirmId: number;
|
|
37
|
+
value: TaskTemplate;
|
|
38
|
+
uploadFilesFunc: UploadFileFunction;
|
|
39
|
+
userId: string;
|
|
40
|
+
} & {}, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
41
|
+
typeError: import("@vue/composition-api").Ref<boolean>;
|
|
42
|
+
nameError: import("@vue/composition-api").Ref<boolean>;
|
|
43
|
+
changeVal: (k: string, v: any) => void;
|
|
44
|
+
validFields: (callback: (passed: boolean, data: TaskTemplateGraphData, errors: Object) => void) => void;
|
|
45
|
+
TaskTypes: typeof TaskTypes;
|
|
46
|
+
roles: Role[];
|
|
47
|
+
isAttorneySelected: import("@vue/composition-api").ComputedRef<boolean>;
|
|
48
|
+
$t: (key: string) => import("vue-i18n").default.TranslateResult;
|
|
49
|
+
}>, import("@vue/composition-api").Data, {}, {}, {}, {}, {}, {
|
|
50
|
+
lawFirmId: number;
|
|
51
|
+
value: TaskTemplate;
|
|
52
|
+
uploadFilesFunc: UploadFileFunction;
|
|
53
|
+
userId: string;
|
|
54
|
+
} & {}, {}, true>);
|
|
55
|
+
export default _default;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export declare enum AssigneeTypes {
|
|
2
|
+
EMPTY_DEFAULT = 4,
|
|
3
|
+
BENEFICIARY = 1,
|
|
4
|
+
PETITIONER = 2,
|
|
5
|
+
ATTORNEY = 3
|
|
6
|
+
}
|
|
7
|
+
export declare enum AssigneeTypesText {
|
|
8
|
+
EMPTY_DEFAULT = "message.default",
|
|
9
|
+
BENEFICIARY = "message.beneficiary",
|
|
10
|
+
PETITIONER = "message.petitioner",
|
|
11
|
+
ATTORNEY = "message.attorney"
|
|
12
|
+
}
|
|
13
|
+
export interface Document {
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
link: string;
|
|
17
|
+
}
|
|
18
|
+
export declare enum SortOrder {
|
|
19
|
+
default = "DEFAULT",
|
|
20
|
+
desc = "DESC",
|
|
21
|
+
asc = "ASC"
|
|
22
|
+
}
|
|
23
|
+
export interface Pagination {
|
|
24
|
+
current: number;
|
|
25
|
+
pageSize: number;
|
|
26
|
+
total: number;
|
|
27
|
+
}
|
|
28
|
+
export declare enum ResponseCode {
|
|
29
|
+
success = "SUCCESS",
|
|
30
|
+
failed = "FAILED"
|
|
31
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { AssigneeTypes, SortOrder, Document } from '@/types/common';
|
|
2
|
+
export declare enum TaskTypes {
|
|
3
|
+
clientUpload = "Client Upload",
|
|
4
|
+
clientReview = "For Client Review",
|
|
5
|
+
worksheet = "Worksheet"
|
|
6
|
+
}
|
|
7
|
+
interface BaseTaskTemplate {
|
|
8
|
+
id?: number;
|
|
9
|
+
taskName?: string;
|
|
10
|
+
isEmployeeInt?: AssigneeTypes;
|
|
11
|
+
generalTaskType?: TaskTypes;
|
|
12
|
+
descriptions?: string;
|
|
13
|
+
tagList?: string[];
|
|
14
|
+
}
|
|
15
|
+
export interface TaskTemplateGraphData extends BaseTaskTemplate {
|
|
16
|
+
sampleDocList?: Document[];
|
|
17
|
+
isEmployeeInt: number;
|
|
18
|
+
}
|
|
19
|
+
export interface TaskTemplateMutateData {
|
|
20
|
+
selfUserId: string;
|
|
21
|
+
selfLawFirmId: number;
|
|
22
|
+
taskTemplateId: number;
|
|
23
|
+
isAddedToTask?: boolean;
|
|
24
|
+
isNotified?: boolean;
|
|
25
|
+
taskTemplateObj: TaskTemplateGraphData;
|
|
26
|
+
}
|
|
27
|
+
export interface TaskTemplate extends BaseTaskTemplate {
|
|
28
|
+
id?: number;
|
|
29
|
+
isEmployee?: keyof typeof AssigneeTypes;
|
|
30
|
+
sampleDocs?: Document[];
|
|
31
|
+
lawFirmId?: number;
|
|
32
|
+
isGallery?: boolean;
|
|
33
|
+
}
|
|
34
|
+
export interface TaskTemplateComponentData {
|
|
35
|
+
taskTemplateObj: TaskTemplate;
|
|
36
|
+
isAddedToTask?: boolean;
|
|
37
|
+
isNotified?: boolean;
|
|
38
|
+
[key: string]: any;
|
|
39
|
+
}
|
|
40
|
+
declare type UploadFileStatus = 'fulfilled';
|
|
41
|
+
export declare type UploadFileFunction = (files: File[]) => Promise<{
|
|
42
|
+
status: UploadFileStatus;
|
|
43
|
+
value: Document;
|
|
44
|
+
}[]>;
|
|
45
|
+
declare enum TaskTemplateSortBy {
|
|
46
|
+
default = "DEFAULT",
|
|
47
|
+
id = "TASKTEMPLATEID",
|
|
48
|
+
name = "TASKNAME",
|
|
49
|
+
type = "TASKTYPE",
|
|
50
|
+
isEmployee = "ISEMPLOYEE"
|
|
51
|
+
}
|
|
52
|
+
export interface TaskTemplateSearchInput {
|
|
53
|
+
taskTemplateId?: number[];
|
|
54
|
+
keywords?: string;
|
|
55
|
+
lawFirmId?: number;
|
|
56
|
+
isEmployee?: AssigneeTypes[];
|
|
57
|
+
taskType?: number[];
|
|
58
|
+
includeGallery?: boolean;
|
|
59
|
+
sortBy?: TaskTemplateSortBy;
|
|
60
|
+
sortOrder?: SortOrder;
|
|
61
|
+
}
|
|
62
|
+
export interface SearchTaskTemplateParams {
|
|
63
|
+
query: TaskTemplateSearchInput;
|
|
64
|
+
startIndex: number;
|
|
65
|
+
endIndex: number;
|
|
66
|
+
}
|
|
67
|
+
export interface SearchTaskTemplateResp {
|
|
68
|
+
taskTemplateSearch: {
|
|
69
|
+
numResult: number;
|
|
70
|
+
taskTemplateList: TaskTemplate[];
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
export interface UpdateTaskTemplateResp {
|
|
74
|
+
updateTaskTemplate: {
|
|
75
|
+
code: string;
|
|
76
|
+
message?: string;
|
|
77
|
+
updatedTaskTemplate: TaskTemplate;
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
export interface CreateTaskTemplateResp {
|
|
81
|
+
createTaskTemplate: {
|
|
82
|
+
code: string;
|
|
83
|
+
message?: string;
|
|
84
|
+
newTaskTemplate: TaskTemplate;
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
export interface Role {
|
|
88
|
+
id: AssigneeTypes;
|
|
89
|
+
key: keyof typeof AssigneeTypes;
|
|
90
|
+
i18nKey: string;
|
|
91
|
+
hide?: boolean;
|
|
92
|
+
}
|
|
93
|
+
export {};
|
package/dist/venus.cjs.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports[Symbol.toStringTag]="Module";var
|
|
1
|
+
"use strict";var j=Object.defineProperty,Y=Object.defineProperties;var K=Object.getOwnPropertyDescriptors;var S=Object.getOwnPropertySymbols;var B=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable;var I=(e,a,t)=>a in e?j(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,h=(e,a)=>{for(var t in a||(a={}))B.call(a,t)&&I(e,t,a[t]);if(S)for(var t of S(a))z.call(a,t)&&I(e,t,a[t]);return e},E=(e,a)=>Y(e,K(a));Object.defineProperty(exports,"__esModule",{value:!0});exports[Symbol.toStringTag]="Module";var l=require("vue-demi"),f=require("ant-design-vue"),y=require("@vue/apollo-composable"),Q=require("graphql-tag"),W=require("ramda"),X=require("vue-i18n");function F(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var $=F(Q),G=F(X);function H(e){switch(e){case"./icons/attorney.svg":return Promise.resolve().then(function(){return require("./attorney.js")});case"./icons/company.svg":return Promise.resolve().then(function(){return require("./company.js")});case"./icons/individual.svg":return Promise.resolve().then(function(){return require("./individual.js")});default:return new Promise(function(a,t){(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(t.bind(null,new Error("Unknown variable dynamic import: "+e)))})}}var J=l.defineComponent({props:{type:{type:String,required:!0}},setup(e){const a=l.ref();return l.watch(()=>e.type,t=>{let n="";switch(t){case"USERPROFILE":n="individual";break;case"CLIENTPROFILE":n="company";break;default:n="attorney";break}H(`./icons/${n}.svg`).then(o=>a.value=o.default)},{immediate:!0}),{iconUrl:a}}}),Z=function(){var e=this,a=e.$createElement,t=e._self._c||a;return t("img",{staticClass:"w-6 h-6",attrs:{src:e.iconUrl,alt:e.type}})},ee=[];function v(e,a,t,n,o,r,u,c){var i=typeof e=="function"?e.options:e;a&&(i.render=a,i.staticRenderFns=t,i._compiled=!0),n&&(i.functional=!0),r&&(i._scopeId="data-v-"+r);var s;if(u?(s=function(p){p=p||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!p&&typeof __VUE_SSR_CONTEXT__!="undefined"&&(p=__VUE_SSR_CONTEXT__),o&&o.call(this,p),p&&p._registeredComponents&&p._registeredComponents.add(u)},i._ssrRegister=s):o&&(s=c?function(){o.call(this,(i.functional?this.parent:this).$root.$options.shadowRoot)}:o),s)if(i.functional){i._injectStyles=s;var _=i.render;i.render=function(D,T){return s.call(T),_(D,T)}}else{var d=i.beforeCreate;i.beforeCreate=d?[].concat(d,s):[s]}return{exports:e,options:i}}const P={};var te=v(J,Z,ee,!1,ae,null,null,null);function ae(e){for(let a in P)this[a]=P[a]}var k=function(){return te.exports}(),ne=l.defineComponent({props:{source:{type:Object,required:!0}},components:{ProfileTypeIcon:k}}),re=function(){var e=this,a=e.$createElement,t=e._self._c||a;return t("div",{staticClass:"flex space-x-1 items-center"},[t("ProfileTypeIcon",{attrs:{type:e.source.profileType}}),t("div",{staticClass:"text-secondary"},[e._v(e._s(e.source.profileName))])],1)},le=[];const b={};var oe=v(ne,re,le,!1,ie,null,null,null);function ie(e){for(let a in b)this[a]=b[a]}var se=function(){return oe.exports}();const ue=$.default`
|
|
2
2
|
query Me {
|
|
3
3
|
me {
|
|
4
4
|
id
|
|
5
5
|
lawFirmId
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
|
-
`;function
|
|
8
|
+
`;function C(){const{result:e}=y.useQuery(ue);return y.useResult(e)}const ce=$.default`
|
|
9
9
|
query ProfileSearch(
|
|
10
10
|
$lawFirmId: Int!
|
|
11
11
|
$keywords: String
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
`,
|
|
29
|
+
`,de=$.default`
|
|
30
30
|
mutation addProfileUser(
|
|
31
31
|
$email: String
|
|
32
32
|
$name: String
|
|
@@ -46,4 +46,4 @@
|
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
`;function W(){const e=h(),{mutate:r,loading:t}=m.useMutation(X);return{createProfile:async l=>{var f;const o={email:l.email,lawFirmId:(f=e.value)==null?void 0:f.lawFirmId};l.profileType==="USERPROFILE"?o.name=l.profileName:o.petitionerProfileName=l.profileName;const d=await r(o);return T.path(["data","addProfileUserNoNotify","profile"],d)},loading:t}}const G={USERPROFILE:"Individual",CLIENTPROFILE:"Company",PREPARERPROFILE:"Attorney"};var H=i.defineComponent({props:{value:{type:String},enabledTypes:{type:Array,default:["USERPROFILE","CLIENTPROFILE","PREPARERPROFILE"]}},components:{Select:c.Select,Option:c.Select.Option,ProfileTypeIcon:$},setup(e,{emit:r}){return{profileTypes:G,handleChange:n=>r("input",n)}}}),J=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("Select",{attrs:{value:e.value},on:{change:e.handleChange}},e._l(e.enabledTypes,function(n){return t("Option",{key:n,attrs:{value:n}},[t("div",{staticClass:"flex items-center space-x-1"},[t("ProfileTypeIcon",{attrs:{type:n}}),t("div",{staticClass:"text-secondary"},[e._v(e._s(e.profileTypes[n]))])],1)])}),1)},K=[];const I={};var Y=v(H,J,K,!1,Z,null,null,null);function Z(e){for(let r in I)this[r]=I[r]}var ee=function(){return Y.exports}(),te=i.defineComponent({components:{Modal:c.Modal,Form:c.Form,FormItem:c.Form.Item,ProfileTypeSelect:ee,Input:c.Input,Checkbox:c.Checkbox},setup(e,{emit:r}){const t=i.ref({}),n=i.ref(!1),l=i.computed(()=>t.value.profileName&&t.value.profileType),o={profileType:{required:!0},profileName:{required:!0},email:{type:"email"}},d=()=>t.value={},{createProfile:f,loading:a}=W(),s=()=>r("cancel");return{value:t,rules:o,shouldSendPassword:n,clearValue:d,loading:a,canSubmit:l,handleSubmit:async()=>{const u=await f(t.value);s(),r("profile-created",u)}}}}),re=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("modal",e._g(e._b({attrs:{closable:!1,"ok-text":"Create",width:320,okButtonProps:{props:{disabled:!e.canSubmit,loading:e.loading}}},on:{cancel:e.clearValue,ok:e.handleSubmit}},"modal",e.$attrs,!1),e.$listeners),[t("Form",{attrs:{layout:"vertical","validate-trigger":"blur",model:e.value,rules:e.rules}},[t("form-item",{attrs:{label:"Profile type",name:"profileType"}},[t("profile-type-select",{attrs:{enabledTypes:["USERPROFILE","CLIENTPROFILE"]},model:{value:e.value.profileType,callback:function(n){e.$set(e.value,"profileType",n)},expression:"value.profileType"}})],1),t("form-item",{attrs:{label:"Name",name:"profileName"}},[t("Input",{model:{value:e.value.profileName,callback:function(n){e.$set(e.value,"profileName",n)},expression:"value.profileName"}})],1),t("form-item",{attrs:{label:"Email"}},[t("Input",{model:{value:e.value.email,callback:function(n){e.$set(e.value,"email",n)},expression:"value.email"}})],1),t("form-item",[t("checkbox",{model:{value:e.shouldSendPassword,callback:function(n){e.shouldSendPassword=n},expression:"shouldSendPassword"}},[e._v("Send client portal login password (System will email client a login password)")])],1)],1)],1)},ne=[];const b={};var oe=v(te,re,ne,!1,le,null,null,null);function le(e){for(let r in b)this[r]=b[r]}var C=function(){return oe.exports}(),ae=i.defineComponent({props:{value:{type:Object},keywords:{type:String,required:!0},source:{type:Array,required:!0}},components:{Select:c.Select,Option:c.Select.Option,Divider:c.Divider,Button:c.Button,ProfileSelectItem:Q,ProfileCreateModal:C,VNodes:{functional:!0,render:(e,r)=>r.props.vnodes}},setup(e,{emit:r}){return{selectedId:i.computed(()=>{var o;return(o=e.value)==null?void 0:o.id}),handleSelect:o=>r("input",e.source.find(d=>String(d.id)==o)),handleProfileCreate:()=>r("create-profile"),menu:{}}}}),ie=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("Select",e._g(e._b({staticClass:"w-72",attrs:{allowClear:"",showSearch:"",optionFilterProp:"name",value:e.selectedId},on:{select:e.handleSelect},scopedSlots:e._u([{key:"dropdownRender",fn:function(n){return t("div",{},[t("v-nodes",{attrs:{vnodes:n}}),t("Divider",{staticClass:"my-1"}),t("div",{staticClass:"flex justify-end px-3 py-1"},[t("Button",{attrs:{size:"small"},on:{click:e.handleProfileCreate}},[e._v("Create new profile")])],1)],1)}}])},"Select",e.$attrs,!1),e.$listeners),e._l(e.source,function(n){return t("Option",{key:n.id,attrs:{value:n.id}},[t("ProfileSelectItem",{attrs:{source:n}})],1)}),1)},se=[];const w={};var ue=v(ae,ie,se,!1,ce,null,null,null);function ce(e){for(let r in w)this[r]=w[r]}var de=function(){return ue.exports}();function fe(e){const r=h(),{result:t,loading:n}=m.useQuery(z,()=>{var o;return{lawFirmId:(o=r.value)==null?void 0:o.lawFirmId,keywords:e.value}},()=>({enabled:r.value!=null}));return{profiles:m.useResult(t,[],o=>o.profileSearch.profileList),loading:n}}var pe=i.defineComponent({components:{ProfileSelector:de,ProfileCreateModal:C},props:{value:{type:Object}},setup(e,{emit:r}){const t=i.ref(""),n=u=>t.value=u,{profiles:l}=fe(t),o=i.ref(),d=i.computed(()=>o.value?[o.value,...l.value]:l.value),f=i.ref(!1),a=u=>f.value=u,s=u=>r("input",u);return{profiles:d,isModalVisible:f,toggleModal:a,updateValue:s,handleProfileCreated:u=>{o.value=u,s(u)},keywords:t,handleSearch:n}}}),ve=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("div",[t("profile-selector",e._g(e._b({attrs:{source:e.profiles,value:e.value,keywords:e.keywords},on:{search:e.handleSearch,"create-profile":function(n){return e.toggleModal(!0)},input:e.updateValue}},"profile-selector",e.$attrs,!1),e.$listeners)),t("profile-create-modal",{attrs:{visible:e.isModalVisible},on:{cancel:function(n){return e.toggleModal(!1)},"profile-created":e.handleProfileCreated}})],1)},me=[];const R={};var _e=v(pe,ve,me,!1,ye,null,null,null);function ye(e){for(let r in R)this[r]=R[r]}var he=function(){return _e.exports}();exports.ProfileSelect=he;exports.ProfileTypeIcon=$;exports.useMe=h;
|
|
49
|
+
`;function fe(){const e=C(),{mutate:a,loading:t}=y.useMutation(de);return{createProfile:async o=>{var c;const r={email:o.email,lawFirmId:(c=e.value)==null?void 0:c.lawFirmId};o.profileType==="USERPROFILE"?r.name=o.profileName:r.petitionerProfileName=o.profileName;const u=await a(r);return W.path(["data","addProfileUserNoNotify","profile"],u)},loading:t}}const pe={USERPROFILE:"Individual",CLIENTPROFILE:"Company",PREPARERPROFILE:"Attorney"};var ve=l.defineComponent({props:{value:{type:String},enabledTypes:{type:Array,default:["USERPROFILE","CLIENTPROFILE","PREPARERPROFILE"]}},components:{Select:f.Select,Option:f.Select.Option,ProfileTypeIcon:k},setup(e,{emit:a}){return{profileTypes:pe,handleChange:n=>a("input",n)}}}),me=function(){var e=this,a=e.$createElement,t=e._self._c||a;return t("Select",{attrs:{value:e.value},on:{change:e.handleChange}},e._l(e.enabledTypes,function(n){return t("Option",{key:n,attrs:{value:n}},[t("div",{staticClass:"flex items-center space-x-1"},[t("ProfileTypeIcon",{attrs:{type:n}}),t("div",{staticClass:"text-secondary"},[e._v(e._s(e.profileTypes[n]))])],1)])}),1)},_e=[];const w={};var ye=v(ve,me,_e,!1,ge,null,null,null);function ge(e){for(let a in w)this[a]=w[a]}var he=function(){return ye.exports}(),Ee=l.defineComponent({components:{Modal:f.Modal,Form:f.Form,FormItem:f.Form.Item,ProfileTypeSelect:he,Input:f.Input,Checkbox:f.Checkbox},setup(e,{emit:a}){const t=l.ref({}),n=l.ref(!1),o=l.computed(()=>t.value.profileName&&t.value.profileType),r={profileType:{required:!0},profileName:{required:!0},email:{type:"email"}},u=()=>t.value={},{createProfile:c,loading:i}=fe(),s=()=>a("cancel");return{value:t,rules:r,shouldSendPassword:n,clearValue:u,loading:i,canSubmit:o,handleSubmit:async()=>{const d=await c(t.value);s(),a("profile-created",d)}}}}),$e=function(){var e=this,a=e.$createElement,t=e._self._c||a;return t("modal",e._g(e._b({attrs:{closable:!1,"ok-text":"Create",width:320,okButtonProps:{props:{disabled:!e.canSubmit,loading:e.loading}}},on:{cancel:e.clearValue,ok:e.handleSubmit}},"modal",e.$attrs,!1),e.$listeners),[t("Form",{attrs:{layout:"vertical","validate-trigger":"blur",model:e.value,rules:e.rules}},[t("form-item",{attrs:{label:"Profile type",name:"profileType"}},[t("profile-type-select",{attrs:{enabledTypes:["USERPROFILE","CLIENTPROFILE"]},model:{value:e.value.profileType,callback:function(n){e.$set(e.value,"profileType",n)},expression:"value.profileType"}})],1),t("form-item",{attrs:{label:"Name",name:"profileName"}},[t("Input",{model:{value:e.value.profileName,callback:function(n){e.$set(e.value,"profileName",n)},expression:"value.profileName"}})],1),t("form-item",{attrs:{label:"Email"}},[t("Input",{model:{value:e.value.email,callback:function(n){e.$set(e.value,"email",n)},expression:"value.email"}})],1),t("form-item",[t("checkbox",{model:{value:e.shouldSendPassword,callback:function(n){e.shouldSendPassword=n},expression:"shouldSendPassword"}},[e._v("Send client portal login password (System will email client a login password)")])],1)],1)],1)},Te=[];const R={};var Se=v(Ee,$e,Te,!1,Ie,null,null,null);function Ie(e){for(let a in R)this[a]=R[a]}var N=function(){return Se.exports}(),Fe=l.defineComponent({props:{value:{type:Object},keywords:{type:String,required:!0},source:{type:Array,required:!0}},components:{Select:f.Select,Option:f.Select.Option,Divider:f.Divider,Button:f.Button,ProfileSelectItem:se,ProfileCreateModal:N,VNodes:{functional:!0,render:(e,a)=>a.props.vnodes}},setup(e,{emit:a}){return{selectedId:l.computed(()=>{var r;return(r=e.value)==null?void 0:r.id}),handleSelect:r=>a("input",e.source.find(u=>String(u.id)==r)),handleProfileCreate:()=>a("create-profile"),menu:{}}}}),Pe=function(){var e=this,a=e.$createElement,t=e._self._c||a;return t("Select",e._g(e._b({staticClass:"w-72",attrs:{allowClear:"",showSearch:"",optionFilterProp:"name",value:e.selectedId},on:{select:e.handleSelect},scopedSlots:e._u([{key:"dropdownRender",fn:function(n){return t("div",{},[t("v-nodes",{attrs:{vnodes:n}}),t("Divider",{staticClass:"my-1"}),t("div",{staticClass:"flex justify-end px-3 py-1"},[t("Button",{attrs:{size:"small"},on:{click:e.handleProfileCreate}},[e._v("Create new profile")])],1)],1)}}])},"Select",e.$attrs,!1),e.$listeners),e._l(e.source,function(n){return t("Option",{key:n.id,attrs:{value:n.id}},[t("ProfileSelectItem",{attrs:{source:n}})],1)}),1)},ke=[];const L={};var be=v(Fe,Pe,ke,!1,Ce,null,null,null);function Ce(e){for(let a in L)this[a]=L[a]}var we=function(){return be.exports}();function Re(e){const a=C(),{result:t,loading:n}=y.useQuery(ce,()=>{var r;return{lawFirmId:(r=a.value)==null?void 0:r.lawFirmId,keywords:e.value}},()=>({enabled:a.value!=null}));return{profiles:y.useResult(t,[],r=>r.profileSearch.profileList),loading:n}}var Ne=l.defineComponent({components:{ProfileSelector:we,ProfileCreateModal:N},props:{value:{type:Object}},setup(e,{emit:a}){const t=l.ref(""),n=d=>t.value=d,{profiles:o}=Re(t),r=l.ref(),u=l.computed(()=>r.value?[r.value,...o.value]:o.value),c=l.ref(!1),i=d=>c.value=d,s=d=>a("input",d);return{profiles:u,isModalVisible:c,toggleModal:i,updateValue:s,handleProfileCreated:d=>{r.value=d,s(d)},keywords:t,handleSearch:n}}}),Le=function(){var e=this,a=e.$createElement,t=e._self._c||a;return t("div",[t("profile-selector",e._g(e._b({attrs:{source:e.profiles,value:e.value,keywords:e.keywords},on:{search:e.handleSearch,"create-profile":function(n){return e.toggleModal(!0)},input:e.updateValue}},"profile-selector",e.$attrs,!1),e.$listeners)),t("profile-create-modal",{attrs:{visible:e.isModalVisible},on:{cancel:function(n){return e.toggleModal(!1)},"profile-created":e.handleProfileCreated}})],1)},Oe=[];const O={};var Ue=v(Ne,Le,Oe,!1,xe,null,null,null);function xe(e){for(let a in O)this[a]=O[a]}var Ae=function(){return Ue.exports}(),m;(function(e){e[e.EMPTY_DEFAULT=4]="EMPTY_DEFAULT",e[e.BENEFICIARY=1]="BENEFICIARY",e[e.PETITIONER=2]="PETITIONER",e[e.ATTORNEY=3]="ATTORNEY"})(m||(m={}));var U;(function(e){e.EMPTY_DEFAULT="message.default",e.BENEFICIARY="message.beneficiary",e.PETITIONER="message.petitioner",e.ATTORNEY="message.attorney"})(U||(U={}));var x;(function(e){e.default="DEFAULT",e.desc="DESC",e.asc="ASC"})(x||(x={}));var A;(function(e){e.success="SUCCESS",e.failed="FAILED"})(A||(A={}));var g;(function(e){e.clientUpload="Client Upload",e.clientReview="For Client Review",e.worksheet="Worksheet"})(g||(g={}));var M;(function(e){e.default="DEFAULT",e.id="TASKTEMPLATEID",e.name="TASKNAME",e.type="TASKTYPE",e.isEmployee="ISEMPLOYEE"})(M||(M={}));var Me=(e,a)=>(t,n)=>{a("update:value",E(h({},e.value),{[t]:n}))},qe=l.defineComponent({name:"aFileUploader",props:{value:{type:Array,default:()=>[]},uploadFilesFunc:{type:Function,required:!0}},setup(e,{emit:a}){const t=l.ref(!1);return{changeVal:(u,c)=>{a("change",E(h({},e.value),{[u]:c}))},remove:u=>{a("change",e.value.filter(c=>c.id!==u))},beforeUpload:u=>(t.value||(t.value=!0,e.uploadFilesFunc([u]).then(([{status:c,value:{id:i,name:s,link:_}}])=>{c==="fulfilled"&&a("change",[...e.value,{id:i,name:s,link:_}])}).finally(()=>{t.value=!1}),t.value=!1),!1),loading:t,allowFiles:[".rar",".zip",".doc",".pdf",".docx",".jpg",".jpeg",".png"]}}}),Ve=function(){var e=this,a=e.$createElement,t=e._self._c||a;return t("div",{staticClass:"container"},[t("a-upload",{staticStyle:{display:"inline"},attrs:{disabled:e.loading,"before-upload":e.beforeUpload,action:"javascript:;",fileList:[]}},[t("a-tag",[e._v(" "+e._s(e.$t("message.selectFile"))+" ")]),e.value.length?t("div",{staticStyle:{display:"inline-block"}},e._l(e.value,function(n){return t("a-tag",{key:n.id,attrs:{closable:""},on:{close:function(o){return e.remove(n.id)}}},[e._v(e._s(n.name))])}),1):t("span",{staticStyle:{color:"#ccc"}},[e._v(e._s(e.allowFiles.join(" ")))])],1)],1)},De=[];const q={};var je=v(qe,Ve,De,!1,Ye,"9fae2c5a",null,null);function Ye(e){for(let a in q)this[a]=q[a]}var Ke=function(){return je.exports}(),Be={message:{taskName:"Task Name",assignee:"Assignee",descriptions:"Descriptions",tags:"Tags",clientUpload:"Client upload",clientReview:"Client review",newTask:"New Task",editTask:"Edit Task",attachment:"Attachment",selectFile:"Select file",addToTaskList:"Add to task list",required:"Required",optional:"Optional",submit:"Submit",cancel:"Cancel",beneficiary:"Beneficiary",petitioner:"Petitioner",attorney:"Attorney",type:"Type",sendEmail:"Send Email",addTask:"Add Task(s)",clickToEdit:"Click to edit",tag:"Tag",reviewTasks:"Review and add to template",reviewTasksTitle:"Task(s) to be added",add:"Add",remove:"Remove",success:"Succeeded",tasks:"Tasks",sendTaskEmail:"Send the notification email",none:"None",default:"None",taskSetting:"Task setting"}};l.Vue2!=null&&(globalThis.Vue=l.Vue2);var ze=new G.default({locale:"en",messages:{en:Be}});function Qe(){return e=>ze.t(e)}const We=e=>({sampleDocList:e.sampleDocs,taskName:e.taskName,isEmployeeInt:e.isEmployeeInt||m.EMPTY_DEFAULT,generalTaskType:e.generalTaskType,descriptions:e.descriptions,tagList:e.tagList}),Xe=[{id:m.BENEFICIARY,key:"BENEFICIARY",i18nKey:"beneficiary"},{id:m.PETITIONER,key:"PETITIONER",i18nKey:"petitioner"},{id:m.ATTORNEY,key:"ATTORNEY",i18nKey:"attorney"},{id:m.EMPTY_DEFAULT,key:"EMPTY_DEFAULT",i18nKey:"none",hide:!0}];var Ge=l.defineComponent({name:"index",props:{value:{type:Object,required:!0},userId:{type:String,required:!0},lawFirmId:{type:Number,required:!0},uploadFilesFunc:{type:Function,required:!0}},components:{AFileUploader:Ke},setup(e,{emit:a}){const t=l.ref(!1),n=l.ref(!1),o=Me(e,a),r=i=>{const s=We(e.value);t.value=!s.taskName,n.value=!s.generalTaskType,i(!t.value&&!n.value,s,{nameError:t,typeError:n})},u=Qe(),c=l.computed(()=>e.value.isEmployeeInt===m.ATTORNEY);return l.watch(()=>c.value,i=>{i&&e.value.generalTaskType!==g.worksheet&&o("generalTaskType",g.clientUpload)}),{typeError:n,nameError:t,changeVal:o,validFields:r,TaskTypes:g,roles:Xe,isAttorneySelected:c,$t:u}}}),He=function(){var e=this,a=e.$createElement,t=e._self._c||a;return t("a-form",{staticClass:"add-edit-task-modal",on:{submit:function(n){return n.preventDefault()}}},[t("a-row",{attrs:{gutter:20}},[t("a-col",{attrs:{span:12}},[t("a-form-item",{attrs:{name:"taskName",label:e.$t("message.taskName"),help:e.nameError?e.$t("message.required"):void 0,"validate-status":e.nameError?"error":void 0}},[t("a-input",{attrs:{value:e.value.taskName},on:{input:function(n){return e.changeVal("taskName",n.target.value)}}})],1)],1),t("a-col",{attrs:{span:12}},[t("a-form-item",{attrs:{label:e.$t("message.assignee")+"("+e.$t("message.optional")+")"}},[t("a-select",{staticStyle:{"min-width":"170px"},attrs:{value:e.value.isEmployeeInt,allowClear:!0},on:{change:function(n){return e.changeVal("isEmployeeInt",n)}}},e._l(e.roles,function(n){return t("a-select-option",{key:n.id,attrs:{value:n.id}},[t("span",{staticStyle:{"text-transform":"capitalize"}},[e._v(" "+e._s(e.$t("message."+n.i18nKey))+" ")])])}),1)],1)],1)],1),t("a-form-item",{attrs:{label:e.$t("message.type"),help:e.typeError?e.$t("message.required"):void 0,"validate-status":e.typeError?"error":void 0}},[e.value.generalTaskType!==e.TaskTypes.worksheet?t("a-radio-group",{attrs:{value:e.value.generalTaskType},on:{change:function(n){return e.changeVal("generalTaskType",n.target.value)}}},[t("a-radio",{attrs:{value:e.TaskTypes.clientUpload}},[e._v(" "+e._s(e.$t("message.clientUpload"))+" ")]),t("a-radio",{attrs:{value:e.TaskTypes.clientReview,disabled:e.isAttorneySelected}},[e._v(" "+e._s(e.$t("message.clientReview"))+" ")])],1):e._e()],1),t("a-form-item",{attrs:{label:e.$t("message.descriptions")+"("+e.$t("message.optional")+")"}},[t("a-textarea",{attrs:{value:e.value.descriptions},on:{input:function(n){return e.changeVal("descriptions",n.target.value)}}})],1),t("a-form-item",{attrs:{label:e.$t("message.attachment")+"("+e.$t("message.optional")+")"}},[t("a-file-uploader",{attrs:{value:e.value.sampleDocs,uploadFilesFunc:e.uploadFilesFunc},on:{change:function(n){return e.changeVal("sampleDocs",n)}}})],1),t("a-form-item",{attrs:{label:e.$t("message.tags")+"("+e.$t("message.optional")+")"}},[t("a-select",{attrs:{mode:"tags",value:e.value.tagList,options:[]},on:{change:function(n){return e.changeVal("tagList",n)}}})],1)],1)},Je=[];const V={};var Ze=v(Ge,He,Je,!1,et,"c42b3a2e",null,null);function et(e){for(let a in V)this[a]=V[a]}var tt=function(){return Ze.exports}();exports.ProfileSelect=Ae;exports.TaskForm=tt;
|
package/dist/venus.es.js
CHANGED
|
@@ -1,21 +1,29 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
import { defineComponent, ref, watch, computed, Vue2 } from "vue-demi";
|
|
21
|
+
import { Select, Modal, Form, Input, Checkbox, Divider, Button } from "ant-design-vue";
|
|
1
22
|
import { useQuery, useResult, useMutation } from "@vue/apollo-composable";
|
|
2
23
|
import gql from "graphql-tag";
|
|
3
|
-
import { defineComponent, ref, watch, computed } from "vue-demi";
|
|
4
|
-
import { Select, Modal, Form, Input, Checkbox, Divider, Button } from "ant-design-vue";
|
|
5
24
|
import { path } from "ramda";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
query Me {
|
|
9
|
-
me {
|
|
10
|
-
id
|
|
11
|
-
lawFirmId
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
`;
|
|
15
|
-
function useMe() {
|
|
16
|
-
const { result } = useQuery(meQuery);
|
|
17
|
-
return useResult(result);
|
|
18
|
-
}
|
|
25
|
+
import VueI18n from "vue-i18n";
|
|
26
|
+
var index$2 = "";
|
|
19
27
|
function __variableDynamicImportRuntime0__(path2) {
|
|
20
28
|
switch (path2) {
|
|
21
29
|
case "./icons/attorney.svg":
|
|
@@ -30,7 +38,7 @@ function __variableDynamicImportRuntime0__(path2) {
|
|
|
30
38
|
});
|
|
31
39
|
}
|
|
32
40
|
}
|
|
33
|
-
var __vue2_script$
|
|
41
|
+
var __vue2_script$7 = defineComponent({
|
|
34
42
|
props: {
|
|
35
43
|
type: {
|
|
36
44
|
type: String,
|
|
@@ -57,13 +65,13 @@ var __vue2_script$5 = defineComponent({
|
|
|
57
65
|
return { iconUrl };
|
|
58
66
|
}
|
|
59
67
|
});
|
|
60
|
-
var render$
|
|
68
|
+
var render$7 = function() {
|
|
61
69
|
var _vm = this;
|
|
62
70
|
var _h = _vm.$createElement;
|
|
63
71
|
var _c = _vm._self._c || _h;
|
|
64
72
|
return _c("img", { staticClass: "w-6 h-6", attrs: { "src": _vm.iconUrl, "alt": _vm.type } });
|
|
65
73
|
};
|
|
66
|
-
var staticRenderFns$
|
|
74
|
+
var staticRenderFns$7 = [];
|
|
67
75
|
function normalizeComponent(scriptExports, render2, staticRenderFns2, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
|
|
68
76
|
var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
|
|
69
77
|
if (render2) {
|
|
@@ -115,17 +123,17 @@ function normalizeComponent(scriptExports, render2, staticRenderFns2, functional
|
|
|
115
123
|
options
|
|
116
124
|
};
|
|
117
125
|
}
|
|
118
|
-
const __cssModules$
|
|
119
|
-
var __component__$
|
|
120
|
-
function __vue2_injectStyles$
|
|
121
|
-
for (let o in __cssModules$
|
|
122
|
-
this[o] = __cssModules$
|
|
126
|
+
const __cssModules$7 = {};
|
|
127
|
+
var __component__$7 = /* @__PURE__ */ normalizeComponent(__vue2_script$7, render$7, staticRenderFns$7, false, __vue2_injectStyles$7, null, null, null);
|
|
128
|
+
function __vue2_injectStyles$7(context) {
|
|
129
|
+
for (let o in __cssModules$7) {
|
|
130
|
+
this[o] = __cssModules$7[o];
|
|
123
131
|
}
|
|
124
132
|
}
|
|
125
133
|
var ProfileTypeIcon = /* @__PURE__ */ function() {
|
|
126
|
-
return __component__$
|
|
134
|
+
return __component__$7.exports;
|
|
127
135
|
}();
|
|
128
|
-
var __vue2_script$
|
|
136
|
+
var __vue2_script$6 = defineComponent({
|
|
129
137
|
props: {
|
|
130
138
|
source: {
|
|
131
139
|
type: Object,
|
|
@@ -134,23 +142,35 @@ var __vue2_script$4 = defineComponent({
|
|
|
134
142
|
},
|
|
135
143
|
components: { ProfileTypeIcon }
|
|
136
144
|
});
|
|
137
|
-
var render$
|
|
145
|
+
var render$6 = function() {
|
|
138
146
|
var _vm = this;
|
|
139
147
|
var _h = _vm.$createElement;
|
|
140
148
|
var _c = _vm._self._c || _h;
|
|
141
149
|
return _c("div", { staticClass: "flex space-x-1 items-center" }, [_c("ProfileTypeIcon", { attrs: { "type": _vm.source.profileType } }), _c("div", { staticClass: "text-secondary" }, [_vm._v(_vm._s(_vm.source.profileName))])], 1);
|
|
142
150
|
};
|
|
143
|
-
var staticRenderFns$
|
|
144
|
-
const __cssModules$
|
|
145
|
-
var __component__$
|
|
146
|
-
function __vue2_injectStyles$
|
|
147
|
-
for (let o in __cssModules$
|
|
148
|
-
this[o] = __cssModules$
|
|
151
|
+
var staticRenderFns$6 = [];
|
|
152
|
+
const __cssModules$6 = {};
|
|
153
|
+
var __component__$6 = /* @__PURE__ */ normalizeComponent(__vue2_script$6, render$6, staticRenderFns$6, false, __vue2_injectStyles$6, null, null, null);
|
|
154
|
+
function __vue2_injectStyles$6(context) {
|
|
155
|
+
for (let o in __cssModules$6) {
|
|
156
|
+
this[o] = __cssModules$6[o];
|
|
149
157
|
}
|
|
150
158
|
}
|
|
151
159
|
var ProfileSelectItem = /* @__PURE__ */ function() {
|
|
152
|
-
return __component__$
|
|
160
|
+
return __component__$6.exports;
|
|
153
161
|
}();
|
|
162
|
+
const meQuery = gql`
|
|
163
|
+
query Me {
|
|
164
|
+
me {
|
|
165
|
+
id
|
|
166
|
+
lawFirmId
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
`;
|
|
170
|
+
function useMe() {
|
|
171
|
+
const { result } = useQuery(meQuery);
|
|
172
|
+
return useResult(result);
|
|
173
|
+
}
|
|
154
174
|
const profilesQuery = gql`
|
|
155
175
|
query ProfileSearch(
|
|
156
176
|
$lawFirmId: Int!
|
|
@@ -218,7 +238,7 @@ const profileTypes = {
|
|
|
218
238
|
CLIENTPROFILE: "Company",
|
|
219
239
|
PREPARERPROFILE: "Attorney"
|
|
220
240
|
};
|
|
221
|
-
var __vue2_script$
|
|
241
|
+
var __vue2_script$5 = defineComponent({
|
|
222
242
|
props: {
|
|
223
243
|
value: {
|
|
224
244
|
type: String
|
|
@@ -238,7 +258,7 @@ var __vue2_script$3 = defineComponent({
|
|
|
238
258
|
return { profileTypes, handleChange };
|
|
239
259
|
}
|
|
240
260
|
});
|
|
241
|
-
var render$
|
|
261
|
+
var render$5 = function() {
|
|
242
262
|
var _vm = this;
|
|
243
263
|
var _h = _vm.$createElement;
|
|
244
264
|
var _c = _vm._self._c || _h;
|
|
@@ -246,18 +266,18 @@ var render$3 = function() {
|
|
|
246
266
|
return _c("Option", { key, attrs: { "value": key } }, [_c("div", { staticClass: "flex items-center space-x-1" }, [_c("ProfileTypeIcon", { attrs: { "type": key } }), _c("div", { staticClass: "text-secondary" }, [_vm._v(_vm._s(_vm.profileTypes[key]))])], 1)]);
|
|
247
267
|
}), 1);
|
|
248
268
|
};
|
|
249
|
-
var staticRenderFns$
|
|
250
|
-
const __cssModules$
|
|
251
|
-
var __component__$
|
|
252
|
-
function __vue2_injectStyles$
|
|
253
|
-
for (let o in __cssModules$
|
|
254
|
-
this[o] = __cssModules$
|
|
269
|
+
var staticRenderFns$5 = [];
|
|
270
|
+
const __cssModules$5 = {};
|
|
271
|
+
var __component__$5 = /* @__PURE__ */ normalizeComponent(__vue2_script$5, render$5, staticRenderFns$5, false, __vue2_injectStyles$5, null, null, null);
|
|
272
|
+
function __vue2_injectStyles$5(context) {
|
|
273
|
+
for (let o in __cssModules$5) {
|
|
274
|
+
this[o] = __cssModules$5[o];
|
|
255
275
|
}
|
|
256
276
|
}
|
|
257
277
|
var ProfileTypeSelect = /* @__PURE__ */ function() {
|
|
258
|
-
return __component__$
|
|
278
|
+
return __component__$5.exports;
|
|
259
279
|
}();
|
|
260
|
-
var __vue2_script$
|
|
280
|
+
var __vue2_script$4 = defineComponent({
|
|
261
281
|
components: {
|
|
262
282
|
Modal,
|
|
263
283
|
Form,
|
|
@@ -294,7 +314,7 @@ var __vue2_script$2 = defineComponent({
|
|
|
294
314
|
};
|
|
295
315
|
}
|
|
296
316
|
});
|
|
297
|
-
var render$
|
|
317
|
+
var render$4 = function() {
|
|
298
318
|
var _vm = this;
|
|
299
319
|
var _h = _vm.$createElement;
|
|
300
320
|
var _c = _vm._self._c || _h;
|
|
@@ -308,18 +328,18 @@ var render$2 = function() {
|
|
|
308
328
|
_vm.shouldSendPassword = $$v;
|
|
309
329
|
}, expression: "shouldSendPassword" } }, [_vm._v("Send client portal login password (System will email client a login password)")])], 1)], 1)], 1);
|
|
310
330
|
};
|
|
311
|
-
var staticRenderFns$
|
|
312
|
-
const __cssModules$
|
|
313
|
-
var __component__$
|
|
314
|
-
function __vue2_injectStyles$
|
|
315
|
-
for (let o in __cssModules$
|
|
316
|
-
this[o] = __cssModules$
|
|
331
|
+
var staticRenderFns$4 = [];
|
|
332
|
+
const __cssModules$4 = {};
|
|
333
|
+
var __component__$4 = /* @__PURE__ */ normalizeComponent(__vue2_script$4, render$4, staticRenderFns$4, false, __vue2_injectStyles$4, null, null, null);
|
|
334
|
+
function __vue2_injectStyles$4(context) {
|
|
335
|
+
for (let o in __cssModules$4) {
|
|
336
|
+
this[o] = __cssModules$4[o];
|
|
317
337
|
}
|
|
318
338
|
}
|
|
319
339
|
var ProfileCreateModal = /* @__PURE__ */ function() {
|
|
320
|
-
return __component__$
|
|
340
|
+
return __component__$4.exports;
|
|
321
341
|
}();
|
|
322
|
-
var __vue2_script$
|
|
342
|
+
var __vue2_script$3 = defineComponent({
|
|
323
343
|
props: {
|
|
324
344
|
value: {
|
|
325
345
|
type: Object
|
|
@@ -360,7 +380,7 @@ var __vue2_script$1 = defineComponent({
|
|
|
360
380
|
};
|
|
361
381
|
}
|
|
362
382
|
});
|
|
363
|
-
var render$
|
|
383
|
+
var render$3 = function() {
|
|
364
384
|
var _vm = this;
|
|
365
385
|
var _h = _vm.$createElement;
|
|
366
386
|
var _c = _vm._self._c || _h;
|
|
@@ -370,16 +390,16 @@ var render$1 = function() {
|
|
|
370
390
|
return _c("Option", { key: v.id, attrs: { "value": v.id } }, [_c("ProfileSelectItem", { attrs: { "source": v } })], 1);
|
|
371
391
|
}), 1);
|
|
372
392
|
};
|
|
373
|
-
var staticRenderFns$
|
|
374
|
-
const __cssModules$
|
|
375
|
-
var __component__$
|
|
376
|
-
function __vue2_injectStyles$
|
|
377
|
-
for (let o in __cssModules$
|
|
378
|
-
this[o] = __cssModules$
|
|
393
|
+
var staticRenderFns$3 = [];
|
|
394
|
+
const __cssModules$3 = {};
|
|
395
|
+
var __component__$3 = /* @__PURE__ */ normalizeComponent(__vue2_script$3, render$3, staticRenderFns$3, false, __vue2_injectStyles$3, null, null, null);
|
|
396
|
+
function __vue2_injectStyles$3(context) {
|
|
397
|
+
for (let o in __cssModules$3) {
|
|
398
|
+
this[o] = __cssModules$3[o];
|
|
379
399
|
}
|
|
380
400
|
}
|
|
381
401
|
var ProfileSelector = /* @__PURE__ */ function() {
|
|
382
|
-
return __component__$
|
|
402
|
+
return __component__$3.exports;
|
|
383
403
|
}();
|
|
384
404
|
function useProfiles(keywords) {
|
|
385
405
|
const me = useMe();
|
|
@@ -395,7 +415,7 @@ function useProfiles(keywords) {
|
|
|
395
415
|
const profiles = useResult(result, [], (data) => data.profileSearch.profileList);
|
|
396
416
|
return { profiles, loading };
|
|
397
417
|
}
|
|
398
|
-
var __vue2_script = defineComponent({
|
|
418
|
+
var __vue2_script$2 = defineComponent({
|
|
399
419
|
components: { ProfileSelector, ProfileCreateModal },
|
|
400
420
|
props: {
|
|
401
421
|
value: {
|
|
@@ -426,7 +446,7 @@ var __vue2_script = defineComponent({
|
|
|
426
446
|
};
|
|
427
447
|
}
|
|
428
448
|
});
|
|
429
|
-
var render = function() {
|
|
449
|
+
var render$2 = function() {
|
|
430
450
|
var _vm = this;
|
|
431
451
|
var _h = _vm.$createElement;
|
|
432
452
|
var _c = _vm._self._c || _h;
|
|
@@ -436,9 +456,310 @@ var render = function() {
|
|
|
436
456
|
return _vm.toggleModal(false);
|
|
437
457
|
}, "profile-created": _vm.handleProfileCreated } })], 1);
|
|
438
458
|
};
|
|
459
|
+
var staticRenderFns$2 = [];
|
|
460
|
+
const __cssModules$2 = {};
|
|
461
|
+
var __component__$2 = /* @__PURE__ */ normalizeComponent(__vue2_script$2, render$2, staticRenderFns$2, false, __vue2_injectStyles$2, null, null, null);
|
|
462
|
+
function __vue2_injectStyles$2(context) {
|
|
463
|
+
for (let o in __cssModules$2) {
|
|
464
|
+
this[o] = __cssModules$2[o];
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
var index$1 = /* @__PURE__ */ function() {
|
|
468
|
+
return __component__$2.exports;
|
|
469
|
+
}();
|
|
470
|
+
var AssigneeTypes;
|
|
471
|
+
(function(AssigneeTypes2) {
|
|
472
|
+
AssigneeTypes2[AssigneeTypes2["EMPTY_DEFAULT"] = 4] = "EMPTY_DEFAULT";
|
|
473
|
+
AssigneeTypes2[AssigneeTypes2["BENEFICIARY"] = 1] = "BENEFICIARY";
|
|
474
|
+
AssigneeTypes2[AssigneeTypes2["PETITIONER"] = 2] = "PETITIONER";
|
|
475
|
+
AssigneeTypes2[AssigneeTypes2["ATTORNEY"] = 3] = "ATTORNEY";
|
|
476
|
+
})(AssigneeTypes || (AssigneeTypes = {}));
|
|
477
|
+
var AssigneeTypesText;
|
|
478
|
+
(function(AssigneeTypesText2) {
|
|
479
|
+
AssigneeTypesText2["EMPTY_DEFAULT"] = "message.default";
|
|
480
|
+
AssigneeTypesText2["BENEFICIARY"] = "message.beneficiary";
|
|
481
|
+
AssigneeTypesText2["PETITIONER"] = "message.petitioner";
|
|
482
|
+
AssigneeTypesText2["ATTORNEY"] = "message.attorney";
|
|
483
|
+
})(AssigneeTypesText || (AssigneeTypesText = {}));
|
|
484
|
+
var SortOrder;
|
|
485
|
+
(function(SortOrder2) {
|
|
486
|
+
SortOrder2["default"] = "DEFAULT";
|
|
487
|
+
SortOrder2["desc"] = "DESC";
|
|
488
|
+
SortOrder2["asc"] = "ASC";
|
|
489
|
+
})(SortOrder || (SortOrder = {}));
|
|
490
|
+
var ResponseCode;
|
|
491
|
+
(function(ResponseCode2) {
|
|
492
|
+
ResponseCode2["success"] = "SUCCESS";
|
|
493
|
+
ResponseCode2["failed"] = "FAILED";
|
|
494
|
+
})(ResponseCode || (ResponseCode = {}));
|
|
495
|
+
var TaskTypes;
|
|
496
|
+
(function(TaskTypes2) {
|
|
497
|
+
TaskTypes2["clientUpload"] = "Client Upload";
|
|
498
|
+
TaskTypes2["clientReview"] = "For Client Review";
|
|
499
|
+
TaskTypes2["worksheet"] = "Worksheet";
|
|
500
|
+
})(TaskTypes || (TaskTypes = {}));
|
|
501
|
+
var TaskTemplateSortBy;
|
|
502
|
+
(function(TaskTemplateSortBy2) {
|
|
503
|
+
TaskTemplateSortBy2["default"] = "DEFAULT";
|
|
504
|
+
TaskTemplateSortBy2["id"] = "TASKTEMPLATEID";
|
|
505
|
+
TaskTemplateSortBy2["name"] = "TASKNAME";
|
|
506
|
+
TaskTemplateSortBy2["type"] = "TASKTYPE";
|
|
507
|
+
TaskTemplateSortBy2["isEmployee"] = "ISEMPLOYEE";
|
|
508
|
+
})(TaskTemplateSortBy || (TaskTemplateSortBy = {}));
|
|
509
|
+
var useChangeVal = (props, emit) => (k, v) => {
|
|
510
|
+
emit("update:value", __spreadProps(__spreadValues({}, props.value), {
|
|
511
|
+
[k]: v
|
|
512
|
+
}));
|
|
513
|
+
};
|
|
514
|
+
var __vue2_script$1 = defineComponent({
|
|
515
|
+
name: "aFileUploader",
|
|
516
|
+
props: {
|
|
517
|
+
value: {
|
|
518
|
+
type: Array,
|
|
519
|
+
default: () => []
|
|
520
|
+
},
|
|
521
|
+
uploadFilesFunc: {
|
|
522
|
+
type: Function,
|
|
523
|
+
required: true
|
|
524
|
+
}
|
|
525
|
+
},
|
|
526
|
+
setup(props, { emit }) {
|
|
527
|
+
const loading = ref(false);
|
|
528
|
+
const changeVal = (k, v) => {
|
|
529
|
+
emit("change", __spreadProps(__spreadValues({}, props.value), {
|
|
530
|
+
[k]: v
|
|
531
|
+
}));
|
|
532
|
+
};
|
|
533
|
+
const remove = (id) => {
|
|
534
|
+
emit("change", props.value.filter((v) => v.id !== id));
|
|
535
|
+
};
|
|
536
|
+
const beforeUpload = (file) => {
|
|
537
|
+
if (loading.value)
|
|
538
|
+
return false;
|
|
539
|
+
loading.value = true;
|
|
540
|
+
props.uploadFilesFunc([file]).then(([
|
|
541
|
+
{
|
|
542
|
+
status,
|
|
543
|
+
value: { id, name, link }
|
|
544
|
+
}
|
|
545
|
+
]) => {
|
|
546
|
+
if (status === "fulfilled") {
|
|
547
|
+
emit("change", [
|
|
548
|
+
...props.value,
|
|
549
|
+
{
|
|
550
|
+
id,
|
|
551
|
+
name,
|
|
552
|
+
link
|
|
553
|
+
}
|
|
554
|
+
]);
|
|
555
|
+
}
|
|
556
|
+
}).finally(() => {
|
|
557
|
+
loading.value = false;
|
|
558
|
+
});
|
|
559
|
+
loading.value = false;
|
|
560
|
+
return false;
|
|
561
|
+
};
|
|
562
|
+
return {
|
|
563
|
+
changeVal,
|
|
564
|
+
remove,
|
|
565
|
+
beforeUpload,
|
|
566
|
+
loading,
|
|
567
|
+
allowFiles: [
|
|
568
|
+
".rar",
|
|
569
|
+
".zip",
|
|
570
|
+
".doc",
|
|
571
|
+
".pdf",
|
|
572
|
+
".docx",
|
|
573
|
+
".jpg",
|
|
574
|
+
".jpeg",
|
|
575
|
+
".png"
|
|
576
|
+
]
|
|
577
|
+
};
|
|
578
|
+
}
|
|
579
|
+
});
|
|
580
|
+
var render$1 = function() {
|
|
581
|
+
var _vm = this;
|
|
582
|
+
var _h = _vm.$createElement;
|
|
583
|
+
var _c = _vm._self._c || _h;
|
|
584
|
+
return _c("div", { staticClass: "container" }, [_c("a-upload", { staticStyle: { "display": "inline" }, attrs: { "disabled": _vm.loading, "before-upload": _vm.beforeUpload, "action": "javascript:;", "fileList": [] } }, [_c("a-tag", [_vm._v(" " + _vm._s(_vm.$t("message.selectFile")) + " ")]), _vm.value.length ? _c("div", { staticStyle: { "display": "inline-block" } }, _vm._l(_vm.value, function(file) {
|
|
585
|
+
return _c("a-tag", { key: file.id, attrs: { "closable": "" }, on: { "close": function($event) {
|
|
586
|
+
return _vm.remove(file.id);
|
|
587
|
+
} } }, [_vm._v(_vm._s(file.name))]);
|
|
588
|
+
}), 1) : _c("span", { staticStyle: { "color": "#ccc" } }, [_vm._v(_vm._s(_vm.allowFiles.join(" ")))])], 1)], 1);
|
|
589
|
+
};
|
|
590
|
+
var staticRenderFns$1 = [];
|
|
591
|
+
var aFileUploader_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
592
|
+
const __cssModules$1 = {};
|
|
593
|
+
var __component__$1 = /* @__PURE__ */ normalizeComponent(__vue2_script$1, render$1, staticRenderFns$1, false, __vue2_injectStyles$1, "9fae2c5a", null, null);
|
|
594
|
+
function __vue2_injectStyles$1(context) {
|
|
595
|
+
for (let o in __cssModules$1) {
|
|
596
|
+
this[o] = __cssModules$1[o];
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
var AFileUploader = /* @__PURE__ */ function() {
|
|
600
|
+
return __component__$1.exports;
|
|
601
|
+
}();
|
|
602
|
+
var en = {
|
|
603
|
+
message: {
|
|
604
|
+
taskName: "Task Name",
|
|
605
|
+
assignee: "Assignee",
|
|
606
|
+
descriptions: "Descriptions",
|
|
607
|
+
tags: "Tags",
|
|
608
|
+
clientUpload: "Client upload",
|
|
609
|
+
clientReview: "Client review",
|
|
610
|
+
newTask: "New Task",
|
|
611
|
+
editTask: "Edit Task",
|
|
612
|
+
attachment: "Attachment",
|
|
613
|
+
selectFile: "Select file",
|
|
614
|
+
addToTaskList: "Add to task list",
|
|
615
|
+
required: "Required",
|
|
616
|
+
optional: "Optional",
|
|
617
|
+
submit: "Submit",
|
|
618
|
+
cancel: "Cancel",
|
|
619
|
+
beneficiary: "Beneficiary",
|
|
620
|
+
petitioner: "Petitioner",
|
|
621
|
+
attorney: "Attorney",
|
|
622
|
+
type: "Type",
|
|
623
|
+
sendEmail: "Send Email",
|
|
624
|
+
addTask: "Add Task(s)",
|
|
625
|
+
clickToEdit: "Click to edit",
|
|
626
|
+
tag: "Tag",
|
|
627
|
+
reviewTasks: "Review and add to template",
|
|
628
|
+
reviewTasksTitle: "Task(s) to be added",
|
|
629
|
+
add: "Add",
|
|
630
|
+
remove: "Remove",
|
|
631
|
+
success: "Succeeded",
|
|
632
|
+
tasks: "Tasks",
|
|
633
|
+
sendTaskEmail: "Send the notification email",
|
|
634
|
+
none: "None",
|
|
635
|
+
default: "None",
|
|
636
|
+
taskSetting: "Task setting"
|
|
637
|
+
}
|
|
638
|
+
};
|
|
639
|
+
if (Vue2 != null) {
|
|
640
|
+
globalThis.Vue = Vue2;
|
|
641
|
+
}
|
|
642
|
+
var i18n = new VueI18n({
|
|
643
|
+
locale: "en",
|
|
644
|
+
messages: {
|
|
645
|
+
en
|
|
646
|
+
}
|
|
647
|
+
});
|
|
648
|
+
function useT() {
|
|
649
|
+
return (key) => i18n.t(key);
|
|
650
|
+
}
|
|
651
|
+
const refactorParams = (record) => ({
|
|
652
|
+
sampleDocList: record.sampleDocs,
|
|
653
|
+
taskName: record.taskName,
|
|
654
|
+
isEmployeeInt: record.isEmployeeInt || AssigneeTypes.EMPTY_DEFAULT,
|
|
655
|
+
generalTaskType: record.generalTaskType,
|
|
656
|
+
descriptions: record.descriptions,
|
|
657
|
+
tagList: record.tagList
|
|
658
|
+
});
|
|
659
|
+
const roles = [
|
|
660
|
+
{
|
|
661
|
+
id: AssigneeTypes.BENEFICIARY,
|
|
662
|
+
key: "BENEFICIARY",
|
|
663
|
+
i18nKey: "beneficiary"
|
|
664
|
+
},
|
|
665
|
+
{
|
|
666
|
+
id: AssigneeTypes.PETITIONER,
|
|
667
|
+
key: "PETITIONER",
|
|
668
|
+
i18nKey: "petitioner"
|
|
669
|
+
},
|
|
670
|
+
{
|
|
671
|
+
id: AssigneeTypes.ATTORNEY,
|
|
672
|
+
key: "ATTORNEY",
|
|
673
|
+
i18nKey: "attorney"
|
|
674
|
+
},
|
|
675
|
+
{
|
|
676
|
+
id: AssigneeTypes.EMPTY_DEFAULT,
|
|
677
|
+
key: "EMPTY_DEFAULT",
|
|
678
|
+
i18nKey: "none",
|
|
679
|
+
hide: true
|
|
680
|
+
}
|
|
681
|
+
];
|
|
682
|
+
var __vue2_script = defineComponent({
|
|
683
|
+
name: "index",
|
|
684
|
+
props: {
|
|
685
|
+
value: {
|
|
686
|
+
type: Object,
|
|
687
|
+
required: true
|
|
688
|
+
},
|
|
689
|
+
userId: {
|
|
690
|
+
type: String,
|
|
691
|
+
required: true
|
|
692
|
+
},
|
|
693
|
+
lawFirmId: {
|
|
694
|
+
type: Number,
|
|
695
|
+
required: true
|
|
696
|
+
},
|
|
697
|
+
uploadFilesFunc: {
|
|
698
|
+
type: Function,
|
|
699
|
+
required: true
|
|
700
|
+
}
|
|
701
|
+
},
|
|
702
|
+
components: { AFileUploader },
|
|
703
|
+
setup(props, { emit }) {
|
|
704
|
+
const nameError = ref(false);
|
|
705
|
+
const typeError = ref(false);
|
|
706
|
+
const changeVal = useChangeVal(props, emit);
|
|
707
|
+
const validFields = (callback) => {
|
|
708
|
+
const data = refactorParams(props.value);
|
|
709
|
+
nameError.value = !data.taskName;
|
|
710
|
+
typeError.value = !data.generalTaskType;
|
|
711
|
+
callback(!nameError.value && !typeError.value, data, {
|
|
712
|
+
nameError,
|
|
713
|
+
typeError
|
|
714
|
+
});
|
|
715
|
+
};
|
|
716
|
+
const $t = useT();
|
|
717
|
+
const isAttorneySelected = computed(() => props.value.isEmployeeInt === AssigneeTypes.ATTORNEY);
|
|
718
|
+
watch(() => isAttorneySelected.value, (selected) => {
|
|
719
|
+
if (selected) {
|
|
720
|
+
if (props.value.generalTaskType !== TaskTypes.worksheet) {
|
|
721
|
+
changeVal("generalTaskType", TaskTypes.clientUpload);
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
});
|
|
725
|
+
return {
|
|
726
|
+
typeError,
|
|
727
|
+
nameError,
|
|
728
|
+
changeVal,
|
|
729
|
+
validFields,
|
|
730
|
+
TaskTypes,
|
|
731
|
+
roles,
|
|
732
|
+
isAttorneySelected,
|
|
733
|
+
$t
|
|
734
|
+
};
|
|
735
|
+
}
|
|
736
|
+
});
|
|
737
|
+
var render = function() {
|
|
738
|
+
var _vm = this;
|
|
739
|
+
var _h = _vm.$createElement;
|
|
740
|
+
var _c = _vm._self._c || _h;
|
|
741
|
+
return _c("a-form", { staticClass: "add-edit-task-modal", on: { "submit": function(e) {
|
|
742
|
+
return e.preventDefault();
|
|
743
|
+
} } }, [_c("a-row", { attrs: { "gutter": 20 } }, [_c("a-col", { attrs: { "span": 12 } }, [_c("a-form-item", { attrs: { "name": "taskName", "label": _vm.$t("message.taskName"), "help": _vm.nameError ? _vm.$t("message.required") : void 0, "validate-status": _vm.nameError ? "error" : void 0 } }, [_c("a-input", { attrs: { "value": _vm.value.taskName }, on: { "input": function($event) {
|
|
744
|
+
return _vm.changeVal("taskName", $event.target.value);
|
|
745
|
+
} } })], 1)], 1), _c("a-col", { attrs: { "span": 12 } }, [_c("a-form-item", { attrs: { "label": _vm.$t("message.assignee") + "(" + _vm.$t("message.optional") + ")" } }, [_c("a-select", { staticStyle: { "min-width": "170px" }, attrs: { "value": _vm.value.isEmployeeInt, "allowClear": true }, on: { "change": function($event) {
|
|
746
|
+
return _vm.changeVal("isEmployeeInt", $event);
|
|
747
|
+
} } }, _vm._l(_vm.roles, function(role) {
|
|
748
|
+
return _c("a-select-option", { key: role.id, attrs: { "value": role.id } }, [_c("span", { staticStyle: { "text-transform": "capitalize" } }, [_vm._v(" " + _vm._s(_vm.$t("message." + role.i18nKey)) + " ")])]);
|
|
749
|
+
}), 1)], 1)], 1)], 1), _c("a-form-item", { attrs: { "label": _vm.$t("message.type"), "help": _vm.typeError ? _vm.$t("message.required") : void 0, "validate-status": _vm.typeError ? "error" : void 0 } }, [_vm.value.generalTaskType !== _vm.TaskTypes.worksheet ? _c("a-radio-group", { attrs: { "value": _vm.value.generalTaskType }, on: { "change": function($event) {
|
|
750
|
+
return _vm.changeVal("generalTaskType", $event.target.value);
|
|
751
|
+
} } }, [_c("a-radio", { attrs: { "value": _vm.TaskTypes.clientUpload } }, [_vm._v(" " + _vm._s(_vm.$t("message.clientUpload")) + " ")]), _c("a-radio", { attrs: { "value": _vm.TaskTypes.clientReview, "disabled": _vm.isAttorneySelected } }, [_vm._v(" " + _vm._s(_vm.$t("message.clientReview")) + " ")])], 1) : _vm._e()], 1), _c("a-form-item", { attrs: { "label": _vm.$t("message.descriptions") + "(" + _vm.$t("message.optional") + ")" } }, [_c("a-textarea", { attrs: { "value": _vm.value.descriptions }, on: { "input": function($event) {
|
|
752
|
+
return _vm.changeVal("descriptions", $event.target.value);
|
|
753
|
+
} } })], 1), _c("a-form-item", { attrs: { "label": _vm.$t("message.attachment") + "(" + _vm.$t("message.optional") + ")" } }, [_c("a-file-uploader", { attrs: { "value": _vm.value.sampleDocs, "uploadFilesFunc": _vm.uploadFilesFunc }, on: { "change": function($event) {
|
|
754
|
+
return _vm.changeVal("sampleDocs", $event);
|
|
755
|
+
} } })], 1), _c("a-form-item", { attrs: { "label": _vm.$t("message.tags") + "(" + _vm.$t("message.optional") + ")" } }, [_c("a-select", { attrs: { "mode": "tags", "value": _vm.value.tagList, "options": [] }, on: { "change": function($event) {
|
|
756
|
+
return _vm.changeVal("tagList", $event);
|
|
757
|
+
} } })], 1)], 1);
|
|
758
|
+
};
|
|
439
759
|
var staticRenderFns = [];
|
|
760
|
+
var index_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
440
761
|
const __cssModules = {};
|
|
441
|
-
var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles,
|
|
762
|
+
var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles, "c42b3a2e", null, null);
|
|
442
763
|
function __vue2_injectStyles(context) {
|
|
443
764
|
for (let o in __cssModules) {
|
|
444
765
|
this[o] = __cssModules[o];
|
|
@@ -447,4 +768,4 @@ function __vue2_injectStyles(context) {
|
|
|
447
768
|
var index = /* @__PURE__ */ function() {
|
|
448
769
|
return __component__.exports;
|
|
449
770
|
}();
|
|
450
|
-
export { index as ProfileSelect,
|
|
771
|
+
export { index$1 as ProfileSelect, index as TaskForm };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ailaw/venus",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
"graphql-tag": "^2.10.0",
|
|
20
20
|
"ramda": "^0.27.1",
|
|
21
21
|
"vue-demi": "^0.12.1",
|
|
22
|
-
"vue-i18n": "^8.11.2"
|
|
22
|
+
"vue-i18n": "^8.11.2",
|
|
23
|
+
"whatwg-fetch": "^3.6.2"
|
|
23
24
|
},
|
|
24
25
|
"devDependencies": {
|
|
25
26
|
"@tailwindcss/postcss7-compat": "^2.2.17",
|
|
@@ -28,13 +29,15 @@
|
|
|
28
29
|
"@vue/compiler-sfc": "^3.2.26",
|
|
29
30
|
"@vue/composition-api": "^1.4.3",
|
|
30
31
|
"autoprefixer": "^9.8.8",
|
|
32
|
+
"js-cookie": "^3.0.1",
|
|
33
|
+
"nprogress": "^0.2.0",
|
|
31
34
|
"postcss": "^7.0.39",
|
|
32
35
|
"prettier": "^2.2.1",
|
|
33
36
|
"tailwindcss": "npm:@tailwindcss/postcss7-compat@^2.2.17",
|
|
34
37
|
"typescript": "~4.1.5",
|
|
35
38
|
"vite": "^2.7.12",
|
|
36
39
|
"vite-plugin-vue2": "^1.9.2",
|
|
37
|
-
"vue": "^2.6.14",
|
|
40
|
+
"vue-template-compiler": "^2.6.14",
|
|
38
41
|
"vue-tsc": "^0.30.2"
|
|
39
42
|
},
|
|
40
43
|
"peerDependencies": {
|