@ailaw/venus 0.12.16 → 0.12.19
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/en.js +1 -0
- package/dist/en3.js +5 -1
- package/dist/profile-select/hooks/useProfiles.d.ts +1 -1
- package/dist/profile-select/index.vue.d.ts +16 -0
- package/dist/profile-select/profile-create-modal.vue.d.ts +20 -3
- package/dist/profile-select/profile-selector.vue.d.ts +14 -0
- package/dist/style.css +1 -1
- package/dist/venus.es.js +50 -26
- package/package.json +1 -1
package/dist/en.js
CHANGED
|
@@ -195,6 +195,7 @@ var en = __spreadProps(__spreadValues(__spreadValues({}, lang2), lang3), {
|
|
|
195
195
|
attorney: "Attorney",
|
|
196
196
|
pay_with: "Pay with",
|
|
197
197
|
back: "Back",
|
|
198
|
+
backToList: "Back to List",
|
|
198
199
|
questinnaire: "Questionnaire",
|
|
199
200
|
submit: "Submit",
|
|
200
201
|
return: "Return",
|
package/dist/en3.js
CHANGED
|
@@ -816,6 +816,7 @@ var lang3 = {
|
|
|
816
816
|
moreActions: "More Actions",
|
|
817
817
|
copyEmailAddress: "Copy Email Address",
|
|
818
818
|
copySucceeded: "Copy succeeded",
|
|
819
|
+
copySuccessfully: "Copy successfully",
|
|
819
820
|
selectedEmailAddresses: "email addresses have been selected.",
|
|
820
821
|
StartDate: "Start Date",
|
|
821
822
|
caseTemplateManagement: "Case Template Management",
|
|
@@ -907,6 +908,9 @@ var lang3 = {
|
|
|
907
908
|
newIntake: "New Intake",
|
|
908
909
|
intakeCreated: "Intake was created successfully!",
|
|
909
910
|
intakePleaseAware: "Please be aware this link will expire by",
|
|
910
|
-
intakeLink: "Intake Link"
|
|
911
|
+
intakeLink: "Intake Link",
|
|
912
|
+
templateManagement: "Template Management",
|
|
913
|
+
noIntakeTemplateSelected: "Select a template to preview",
|
|
914
|
+
copyLink: "Copy link"
|
|
911
915
|
};
|
|
912
916
|
export { lang3 as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Profile, RoleType } from '@/types/profile';
|
|
2
2
|
import { Ref } from 'vue-demi';
|
|
3
|
-
export default function useProfiles(keywords: Ref<string>, onlyRole: Ref<RoleType | undefined>, profileIds: Ref<number[] | undefined>): {
|
|
3
|
+
export default function useProfiles(keywords: Ref<string>, onlyRole: Ref<RoleType | undefined>, profileIds: Ref<number[] | undefined>, disabledProfile: Ref<Boolean | undefined>): {
|
|
4
4
|
profiles: Readonly<Ref<readonly Profile[]>>;
|
|
5
5
|
loading: Ref<boolean>;
|
|
6
6
|
};
|
|
@@ -27,16 +27,28 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
27
27
|
profileIds: {
|
|
28
28
|
type: PropType<number[]>;
|
|
29
29
|
};
|
|
30
|
+
simpleCreate: {
|
|
31
|
+
type: BooleanConstructor;
|
|
32
|
+
default: boolean;
|
|
33
|
+
};
|
|
34
|
+
disabledProfile: {
|
|
35
|
+
type: BooleanConstructor;
|
|
36
|
+
default: undefined;
|
|
37
|
+
};
|
|
30
38
|
}, {
|
|
39
|
+
simpleCreate: boolean;
|
|
31
40
|
creatable: boolean;
|
|
32
41
|
preLoaded: Profile[];
|
|
42
|
+
disabledProfile: boolean;
|
|
33
43
|
} & {
|
|
34
44
|
value?: Profile | undefined;
|
|
35
45
|
onlyRole?: "USERPROFILE" | "CLIENTPROFILE" | "PREPARERPROFILE" | undefined;
|
|
36
46
|
profileIds?: number[] | undefined;
|
|
37
47
|
}> & 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
|
+
simpleCreate: boolean;
|
|
38
49
|
creatable: boolean;
|
|
39
50
|
preLoaded: Profile[];
|
|
51
|
+
disabledProfile: boolean;
|
|
40
52
|
} & {
|
|
41
53
|
value?: Profile | undefined;
|
|
42
54
|
onlyRole?: "USERPROFILE" | "CLIENTPROFILE" | "PREPARERPROFILE" | undefined;
|
|
@@ -51,14 +63,18 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
51
63
|
keywords: import("@vue/composition-api").Ref<string>;
|
|
52
64
|
handleSearch: (value: string) => string;
|
|
53
65
|
}>, import("@vue/composition-api").Data, {}, {}, {}, {}, {}, {
|
|
66
|
+
simpleCreate: boolean;
|
|
54
67
|
creatable: boolean;
|
|
55
68
|
preLoaded: Profile[];
|
|
69
|
+
disabledProfile: boolean;
|
|
56
70
|
} & {
|
|
57
71
|
value?: Profile | undefined;
|
|
58
72
|
onlyRole?: "USERPROFILE" | "CLIENTPROFILE" | "PREPARERPROFILE" | undefined;
|
|
59
73
|
profileIds?: number[] | undefined;
|
|
60
74
|
}, {
|
|
75
|
+
simpleCreate: boolean;
|
|
61
76
|
creatable: boolean;
|
|
62
77
|
preLoaded: Profile[];
|
|
78
|
+
disabledProfile: boolean;
|
|
63
79
|
}, true>);
|
|
64
80
|
export default _default;
|
|
@@ -33,11 +33,24 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
33
33
|
type: PropType<RoleType[]>;
|
|
34
34
|
default: () => string[];
|
|
35
35
|
};
|
|
36
|
+
simpleCreate: {
|
|
37
|
+
type: BooleanConstructor;
|
|
38
|
+
default: boolean;
|
|
39
|
+
};
|
|
40
|
+
profileType: {
|
|
41
|
+
type: PropType<RoleType>;
|
|
42
|
+
};
|
|
36
43
|
}, {
|
|
37
44
|
enabledTypes: RoleType[];
|
|
38
|
-
|
|
45
|
+
simpleCreate: boolean;
|
|
46
|
+
} & {
|
|
47
|
+
profileType?: "USERPROFILE" | "CLIENTPROFILE" | "PREPARERPROFILE" | undefined;
|
|
48
|
+
}> & 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<{
|
|
39
49
|
enabledTypes: RoleType[];
|
|
40
|
-
|
|
50
|
+
simpleCreate: boolean;
|
|
51
|
+
} & {
|
|
52
|
+
profileType?: "USERPROFILE" | "CLIENTPROFILE" | "PREPARERPROFILE" | undefined;
|
|
53
|
+
}, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
41
54
|
value: {
|
|
42
55
|
profileType?: "USERPROFILE" | "CLIENTPROFILE" | "PREPARERPROFILE" | undefined;
|
|
43
56
|
name: string;
|
|
@@ -67,7 +80,11 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
67
80
|
handleValidate: (_: string, result: boolean) => void;
|
|
68
81
|
}>, import("@vue/composition-api").Data, {}, {}, {}, {}, {}, {
|
|
69
82
|
enabledTypes: RoleType[];
|
|
70
|
-
|
|
83
|
+
simpleCreate: boolean;
|
|
84
|
+
} & {
|
|
85
|
+
profileType?: "USERPROFILE" | "CLIENTPROFILE" | "PREPARERPROFILE" | undefined;
|
|
86
|
+
}, {
|
|
71
87
|
enabledTypes: RoleType[];
|
|
88
|
+
simpleCreate: boolean;
|
|
72
89
|
}, true>);
|
|
73
90
|
export default _default;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { PropType } from 'vue-demi';
|
|
2
2
|
import { Profile } from '@/types/profile';
|
|
3
3
|
declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
4
|
+
filterOption: (val: string, option: {
|
|
5
|
+
data: {
|
|
6
|
+
attrs: {
|
|
7
|
+
name: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
}) => boolean;
|
|
4
11
|
selectedId: import("@vue/composition-api").ComputedRef<number | undefined>;
|
|
5
12
|
handleChange: (value: string) => void;
|
|
6
13
|
handleProfileCreate: () => void;
|
|
@@ -28,6 +35,13 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
28
35
|
} & {
|
|
29
36
|
value?: Profile | undefined;
|
|
30
37
|
}, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
38
|
+
filterOption: (val: string, option: {
|
|
39
|
+
data: {
|
|
40
|
+
attrs: {
|
|
41
|
+
name: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
}) => boolean;
|
|
31
45
|
selectedId: import("@vue/composition-api").ComputedRef<number | undefined>;
|
|
32
46
|
handleChange: (value: string) => void;
|
|
33
47
|
handleProfileCreate: () => void;
|
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}.
|
|
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}.m-0{margin:0}.mt-3{margin-top:.75rem}.mr-2{margin-right:.5rem}.mb-0{margin-bottom:0}.mb-5{margin-bottom:1.25rem}.block{display:block}.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}.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}.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)}.beta[data-v-bf8611b6]{line-height:20px;border-radius:15px;background-color:red;color:#fff;padding:0 3.5px;margin:0 5px}.min-w-80[data-v-149d121e]{min-width:320px}.container[data-v-1c53738a]{border:1px solid #cccccc;border-radius:6px;padding:0 4px;min-height:30px;cursor:pointer}.block[data-v-1c53738a]{display:block}.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}
|
package/dist/venus.es.js
CHANGED
|
@@ -17,7 +17,7 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import { defineComponent, ref, watch, reactive, computed,
|
|
20
|
+
import { defineComponent, ref, watch, toRefs, reactive, computed, getCurrentScope, shallowRef } from "vue-demi";
|
|
21
21
|
import { Select, Modal, FormModel, Input, Checkbox, Divider, Button, Upload, Tag, Icon, Tooltip, Form, Row, Col, Radio, Popconfirm, Table, Badge, Card, message } from "ant-design-vue";
|
|
22
22
|
import { useQuery, useResult, useMutation, useApolloClient } from "@vue/apollo-composable";
|
|
23
23
|
import gql from "graphql-tag";
|
|
@@ -178,6 +178,7 @@ const profilesQuery = gql`
|
|
|
178
178
|
$keywords: String
|
|
179
179
|
$profileType: String
|
|
180
180
|
$profileIds: [Int!]
|
|
181
|
+
$isDisabled: Int
|
|
181
182
|
) {
|
|
182
183
|
profileSearch(
|
|
183
184
|
query: {
|
|
@@ -185,6 +186,7 @@ const profilesQuery = gql`
|
|
|
185
186
|
keywords: $keywords
|
|
186
187
|
profileType: $profileType
|
|
187
188
|
profileId: $profileIds
|
|
189
|
+
isDisabled: $isDisabled
|
|
188
190
|
}
|
|
189
191
|
) {
|
|
190
192
|
numResult
|
|
@@ -288,6 +290,13 @@ var __vue2_script$h = defineComponent({
|
|
|
288
290
|
enabledTypes: {
|
|
289
291
|
type: Array,
|
|
290
292
|
default: () => ["USERPROFILE", "CLIENTPROFILE"]
|
|
293
|
+
},
|
|
294
|
+
simpleCreate: {
|
|
295
|
+
type: Boolean,
|
|
296
|
+
default: false
|
|
297
|
+
},
|
|
298
|
+
profileType: {
|
|
299
|
+
type: String
|
|
291
300
|
}
|
|
292
301
|
},
|
|
293
302
|
components: {
|
|
@@ -298,25 +307,26 @@ var __vue2_script$h = defineComponent({
|
|
|
298
307
|
Input,
|
|
299
308
|
Checkbox
|
|
300
309
|
},
|
|
301
|
-
setup(
|
|
310
|
+
setup(props, { emit }) {
|
|
311
|
+
const { simpleCreate, profileType } = toRefs(props);
|
|
302
312
|
const value = reactive({
|
|
303
|
-
profileType: void 0,
|
|
313
|
+
profileType: simpleCreate.value ? profileType == null ? void 0 : profileType.value : void 0,
|
|
304
314
|
name: "",
|
|
305
315
|
email: "",
|
|
306
316
|
sendEmail: false
|
|
307
317
|
});
|
|
308
318
|
const hasValidationError = ref(false);
|
|
309
319
|
const canSubmit = computed(() => {
|
|
310
|
-
if (value
|
|
311
|
-
return
|
|
312
|
-
return
|
|
320
|
+
if (simpleCreate.value && value.name)
|
|
321
|
+
return true;
|
|
322
|
+
return !(value.name === "" || value.profileType == null || hasValidationError.value);
|
|
313
323
|
});
|
|
314
324
|
const rules = {
|
|
315
325
|
profileType: { required: true },
|
|
316
326
|
name: { required: true },
|
|
317
327
|
email: { type: "email" }
|
|
318
328
|
};
|
|
319
|
-
const handleValidate = (
|
|
329
|
+
const handleValidate = (_, result) => {
|
|
320
330
|
hasValidationError.value = !result;
|
|
321
331
|
};
|
|
322
332
|
const clearValue = () => Object.assign(value, {});
|
|
@@ -342,15 +352,15 @@ var render$h = function() {
|
|
|
342
352
|
var _vm = this;
|
|
343
353
|
var _h = _vm.$createElement;
|
|
344
354
|
var _c = _vm._self._c || _h;
|
|
345
|
-
return _c("modal", _vm._g(_vm._b({ attrs: { "closable": false, "ok-text": "Create", "width": 320, "okButtonProps": { props: { disabled: !_vm.canSubmit, loading: _vm.loading } } }, on: { "cancel": _vm.clearValue, "ok": _vm.handleSubmit } }, "modal", _vm.$attrs, false), _vm.$listeners), [_c("Form", { attrs: { "layout": "vertical", "validate-trigger": "blur", "model": _vm.value, "rules": _vm.rules }, on: { "validate": _vm.handleValidate } }, [_c("form-item", { attrs: { "label": "Profile type", "prop": "profileType" } }, [_c("profile-type-select", { attrs: { "enabledTypes": _vm.enabledTypes }, model: { value: _vm.value.profileType, callback: function($$v) {
|
|
355
|
+
return _c("modal", _vm._g(_vm._b({ attrs: { "closable": false, "ok-text": "Create", "width": 320, "okButtonProps": { props: { disabled: !_vm.canSubmit, loading: _vm.loading } } }, on: { "cancel": _vm.clearValue, "ok": _vm.handleSubmit } }, "modal", _vm.$attrs, false), _vm.$listeners), [_c("Form", { attrs: { "layout": "vertical", "validate-trigger": "blur", "model": _vm.value, "rules": _vm.rules }, on: { "validate": _vm.handleValidate } }, [!_vm.simpleCreate ? _c("form-item", { attrs: { "label": "Profile type", "prop": "profileType" } }, [_c("profile-type-select", { attrs: { "enabledTypes": _vm.enabledTypes }, model: { value: _vm.value.profileType, callback: function($$v) {
|
|
346
356
|
_vm.$set(_vm.value, "profileType", $$v);
|
|
347
|
-
}, expression: "value.profileType" } })], 1), _c("form-item", { attrs: { "label": "Name", "prop": "name" } }, [_c("Input", { model: { value: _vm.value.name, callback: function($$v) {
|
|
357
|
+
}, expression: "value.profileType" } })], 1) : _vm._e(), _c("form-item", { class: { "mb-0": _vm.simpleCreate }, attrs: { "label": "Name", "prop": "name" } }, [_c("Input", { model: { value: _vm.value.name, callback: function($$v) {
|
|
348
358
|
_vm.$set(_vm.value, "name", $$v);
|
|
349
|
-
}, expression: "value.name" } })], 1), _c("form-item", { attrs: { "label": "Email", "prop": "email" } }, [_c("Input", { model: { value: _vm.value.email, callback: function($$v) {
|
|
359
|
+
}, expression: "value.name" } })], 1), !_vm.simpleCreate ? _c("form-item", { attrs: { "label": "Email", "prop": "email" } }, [_c("Input", { model: { value: _vm.value.email, callback: function($$v) {
|
|
350
360
|
_vm.$set(_vm.value, "email", $$v);
|
|
351
|
-
}, expression: "value.email" } })], 1), _c("form-item", [_c("checkbox", { model: { value: _vm.value.sendEmail, callback: function($$v) {
|
|
361
|
+
}, expression: "value.email" } })], 1) : _vm._e(), !_vm.simpleCreate ? _c("form-item", [_c("checkbox", { model: { value: _vm.value.sendEmail, callback: function($$v) {
|
|
352
362
|
_vm.$set(_vm.value, "sendEmail", $$v);
|
|
353
|
-
}, expression: "value.sendEmail" } }, [_vm._v("Send client portal login password (System will email client a login password)")])], 1)], 1)], 1);
|
|
363
|
+
}, expression: "value.sendEmail" } }, [_vm._v("Send client portal login password (System will email client a login password)")])], 1) : _vm._e()], 1)], 1);
|
|
354
364
|
};
|
|
355
365
|
var staticRenderFns$h = [];
|
|
356
366
|
const __cssModules$h = {};
|
|
@@ -383,11 +393,7 @@ var __vue2_script$g = defineComponent({
|
|
|
383
393
|
Divider,
|
|
384
394
|
Button,
|
|
385
395
|
ProfileSelectItem,
|
|
386
|
-
ProfileCreateModal
|
|
387
|
-
VNodes: {
|
|
388
|
-
functional: true,
|
|
389
|
-
render: (_, ctx) => ctx.props.vnodes
|
|
390
|
-
}
|
|
396
|
+
ProfileCreateModal
|
|
391
397
|
},
|
|
392
398
|
setup(props, { emit }) {
|
|
393
399
|
const selectedId = computed(() => {
|
|
@@ -396,7 +402,9 @@ var __vue2_script$g = defineComponent({
|
|
|
396
402
|
});
|
|
397
403
|
const handleChange = (value) => emit("input", props.source.find((v) => String(v.id) == value));
|
|
398
404
|
const handleProfileCreate = () => emit("create-profile");
|
|
405
|
+
const filterOption = (val, option) => option.data.attrs.name === "create-btn" || option.data.attrs.name.includes(val);
|
|
399
406
|
return {
|
|
407
|
+
filterOption,
|
|
400
408
|
selectedId,
|
|
401
409
|
handleChange,
|
|
402
410
|
handleProfileCreate,
|
|
@@ -408,11 +416,9 @@ var render$g = function() {
|
|
|
408
416
|
var _vm = this;
|
|
409
417
|
var _h = _vm.$createElement;
|
|
410
418
|
var _c = _vm._self._c || _h;
|
|
411
|
-
return _c("Select", _vm._g(_vm._b({ staticClass: "w-72", attrs: { "allowClear": "", "showSearch": "", "optionFilterProp": "name", "value": _vm.selectedId }, on: { "change": _vm.handleChange },
|
|
412
|
-
return _c("div", {}, [_c("v-nodes", { attrs: { "vnodes": menu } }), _vm.creatable ? _c("Divider", { staticClass: "my-1" }) : _vm._e(), _vm.creatable ? _c("div", { staticClass: "flex justify-end px-3 pb-1" }, [_c("Button", { attrs: { "size": "small" }, on: { "click": _vm.handleProfileCreate } }, [_vm._v("Create new profile")])], 1) : _vm._e()], 1);
|
|
413
|
-
} }]) }, "Select", _vm.$attrs, false), _vm.$listeners), _vm._l(_vm.source, function(v) {
|
|
419
|
+
return _c("Select", _vm._g(_vm._b({ staticClass: "w-72", attrs: { "allowClear": "", "showSearch": "", "optionFilterProp": "name", "value": _vm.selectedId, "filterOption": _vm.filterOption }, on: { "change": _vm.handleChange } }, "Select", _vm.$attrs, false), _vm.$listeners), [_c("Option", { key: "create-btn", attrs: { "value": "create-btn", "disabled": "", "name": "create-btn" } }, [_c("Button", { staticStyle: { "width": "100%" }, on: { "click": _vm.handleProfileCreate } }, [_vm._v("Create new profile ")]), _vm.creatable ? _c("Divider", { staticClass: "m-0 mt-3" }) : _vm._e()], 1), _vm._l(_vm.source, function(v) {
|
|
414
420
|
return _c("Option", { key: v.id, attrs: { "value": v.id, "name": v.profileName } }, [_c("ProfileSelectItem", { attrs: { "source": v } })], 1);
|
|
415
|
-
}),
|
|
421
|
+
})], 2);
|
|
416
422
|
};
|
|
417
423
|
var staticRenderFns$g = [];
|
|
418
424
|
const __cssModules$g = {};
|
|
@@ -425,15 +431,25 @@ function __vue2_injectStyles$g(context) {
|
|
|
425
431
|
var ProfileSelector = /* @__PURE__ */ function() {
|
|
426
432
|
return __component__$g.exports;
|
|
427
433
|
}();
|
|
428
|
-
function useProfiles(keywords, onlyRole, profileIds) {
|
|
434
|
+
function useProfiles(keywords, onlyRole, profileIds, disabledProfile) {
|
|
429
435
|
const me = useMe();
|
|
436
|
+
const isDisabled = computed(() => {
|
|
437
|
+
if (disabledProfile.value === true) {
|
|
438
|
+
return 1;
|
|
439
|
+
} else if (disabledProfile.value === false) {
|
|
440
|
+
return 0;
|
|
441
|
+
} else {
|
|
442
|
+
return void 0;
|
|
443
|
+
}
|
|
444
|
+
});
|
|
430
445
|
const { result, loading } = useQuery(profilesQuery, () => {
|
|
431
446
|
var _a;
|
|
432
447
|
return {
|
|
433
448
|
lawFirmId: (_a = me.value) == null ? void 0 : _a.lawFirmId,
|
|
434
449
|
keywords: keywords.value,
|
|
435
450
|
profileType: onlyRole.value,
|
|
436
|
-
profileIds: profileIds.value
|
|
451
|
+
profileIds: profileIds.value,
|
|
452
|
+
isDisabled: isDisabled.value
|
|
437
453
|
};
|
|
438
454
|
}, () => ({
|
|
439
455
|
enabled: me.value != null
|
|
@@ -460,13 +476,21 @@ var __vue2_script$f = defineComponent({
|
|
|
460
476
|
},
|
|
461
477
|
profileIds: {
|
|
462
478
|
type: Array
|
|
479
|
+
},
|
|
480
|
+
simpleCreate: {
|
|
481
|
+
type: Boolean,
|
|
482
|
+
default: false
|
|
483
|
+
},
|
|
484
|
+
disabledProfile: {
|
|
485
|
+
type: Boolean,
|
|
486
|
+
default: void 0
|
|
463
487
|
}
|
|
464
488
|
},
|
|
465
489
|
setup(props, { emit }) {
|
|
466
490
|
const keywords = ref("");
|
|
467
491
|
const handleSearch = (value) => keywords.value = value;
|
|
468
|
-
const { onlyRole, profileIds } = toRefs(props);
|
|
469
|
-
const { profiles: rawProfiles } = useProfiles(keywords, onlyRole, profileIds);
|
|
492
|
+
const { onlyRole, profileIds, disabledProfile } = toRefs(props);
|
|
493
|
+
const { profiles: rawProfiles } = useProfiles(keywords, onlyRole, profileIds, disabledProfile);
|
|
470
494
|
const createdProfile = ref();
|
|
471
495
|
const profiles = computed(() => {
|
|
472
496
|
const list = [
|
|
@@ -501,7 +525,7 @@ var render$f = function() {
|
|
|
501
525
|
var _c = _vm._self._c || _h;
|
|
502
526
|
return _c("div", [_c("profile-selector", _vm._g(_vm._b({ attrs: { "source": _vm.profiles, "value": _vm.value, "creatable": _vm.creatable }, on: { "search": _vm.handleSearch, "create-profile": function($event) {
|
|
503
527
|
return _vm.toggleModal(true);
|
|
504
|
-
}, "input": _vm.updateValue } }, "profile-selector", _vm.$attrs, false), _vm.$listeners)), _vm.creatable ? _c("profile-create-modal", { attrs: { "visible": _vm.isModalVisible, "enabledTypes": _vm.enabledTypes }, on: { "cancel": function($event) {
|
|
528
|
+
}, "input": _vm.updateValue } }, "profile-selector", _vm.$attrs, false), _vm.$listeners)), _vm.creatable ? _c("profile-create-modal", { attrs: { "visible": _vm.isModalVisible, "enabledTypes": _vm.enabledTypes, "simpleCreate": _vm.simpleCreate, "profileType": _vm.simpleCreate ? _vm.onlyRole : void 0 }, on: { "cancel": function($event) {
|
|
505
529
|
return _vm.toggleModal(false);
|
|
506
530
|
}, "profile-created": _vm.handleProfileCreated } }) : _vm._e()], 1);
|
|
507
531
|
};
|