@ailaw/venus 0.4.0 → 0.4.4

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/en3.js CHANGED
@@ -826,6 +826,7 @@ var lang3 = {
826
826
  fromACase: "From a Case",
827
827
  forms: "Forms",
828
828
  createTemplate: "Create a New Template",
829
+ editTemplate: "Edit Template",
829
830
  saveAsNewTemplate: "Save as a new template",
830
831
  templateNameLengthLimit: "The case template name cannot exceed 200 characters. Please review.",
831
832
  saveChange: "Do you want to save your changes?",
@@ -866,6 +867,10 @@ var lang3 = {
866
867
  none: "None",
867
868
  taskSetting: "Task setting",
868
869
  lastUpdatedTime: "Last Updated Time",
869
- lastUpdatedBy: "Last Updated By"
870
+ lastUpdatedBy: "Last Updated By",
871
+ searchTaskPlaceholder: "Search Task name/Tag",
872
+ taskManagement: "Task Management",
873
+ addFromList: "Add from list",
874
+ createANewTask: "Create a new task"
870
875
  };
871
876
  export { lang3 as default };
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- /*! tailwindcss v2.2.17 | MIT License | https://tailwindcss.com *//*! modern-normalize v1.1.0 | MIT License | https://github.com/sindresorhus/modern-normalize */*,:before,:after{box-sizing:border-box}html{-moz-tab-size:4;-o-tab-size:4;tab-size:4}html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}body{font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"}hr{height:0;color:inherit}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}::-moz-focus-inner{border-style:none;padding:0}legend{padding:0}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}button{background-color:transparent;background-image:none}fieldset{margin:0;padding:0}ol,ul{list-style:none;margin:0;padding:0}html{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";line-height:1.5}body{font-family:inherit;line-height:inherit}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}hr{border-top-width:1px}img{border-style:solid}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#a1a1aa}input:-ms-input-placeholder,textarea:-ms-input-placeholder{opacity:1;color:#a1a1aa}input::placeholder,textarea::placeholder{opacity:1;color:#a1a1aa}button,[role=button]{cursor:pointer}table{border-collapse:collapse}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}button,input,optgroup,select,textarea{padding:0;line-height:inherit;color:inherit}pre,code,kbd,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}*,:before,:after{border-color:currentColor}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.visible{visibility:visible}.relative{position:relative}.my-1{margin-top:.25rem;margin-bottom:.25rem}.mr-2{margin-right:.5rem}.mb-5{margin-bottom:1.25rem}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.table{display:table}.h-6{height:1.5rem}.h-screen{height:100vh}.w-6{width:1.5rem}.w-60{width:15rem}.w-72{width:18rem}.flex-1{flex:1 1 0%}@-webkit-keyframes spin{to{transform:rotate(360deg)}}@keyframes spin{to{transform:rotate(360deg)}}@-webkit-keyframes ping{75%,to{transform:scale(2);opacity:0}}@keyframes ping{75%,to{transform:scale(2);opacity:0}}@-webkit-keyframes pulse{50%{opacity:.5}}@keyframes pulse{50%{opacity:.5}}@-webkit-keyframes bounce{0%,to{transform:translateY(-25%);-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1)}}@keyframes bounce{0%,to{transform:translateY(-25%);-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1)}}.items-center{align-items:center}.justify-end{justify-content:flex-end}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.border{border-width:1px}.p-4{padding:1rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.capitalize{text-transform:capitalize}.text-secondary{--tw-text-opacity: 1;color:rgba(102,102,102,var(--tw-text-opacity))}*,:before,:after{--tw-shadow: 0 0 #0000}*,:before,:after{--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgba(59, 130, 246, .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000}.filter{--tw-blur: var(--tw-empty, );--tw-brightness: var(--tw-empty, );--tw-contrast: var(--tw-empty, );--tw-grayscale: var(--tw-empty, );--tw-hue-rotate: var(--tw-empty, );--tw-invert: var(--tw-empty, );--tw-saturate: var(--tw-empty, );--tw-sepia: var(--tw-empty, );--tw-drop-shadow: var(--tw-empty, );filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur{--tw-blur: blur(8px)}.tags-container[data-v-18554545]{word-break:keep-all;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}.container[data-v-678cdf3c]{border:1px solid #cccccc;border-radius:6px;padding:0 4px;min-height:30px;cursor:pointer}.taskTemplateInline[data-v-5128ec2c]{float:right}a.taskTemplateInline[data-v-5128ec2c]{margin-left:10px}div.taskTemplateInline[data-v-5128ec2c]{margin-top:5px!important}
1
+ /*! tailwindcss v2.2.17 | MIT License | https://tailwindcss.com *//*! modern-normalize v1.1.0 | MIT License | https://github.com/sindresorhus/modern-normalize */*,:before,:after{box-sizing:border-box}html{-moz-tab-size:4;-o-tab-size:4;tab-size:4}html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}body{font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"}hr{height:0;color:inherit}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}::-moz-focus-inner{border-style:none;padding:0}legend{padding:0}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}button{background-color:transparent;background-image:none}fieldset{margin:0;padding:0}ol,ul{list-style:none;margin:0;padding:0}html{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";line-height:1.5}body{font-family:inherit;line-height:inherit}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}hr{border-top-width:1px}img{border-style:solid}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#a1a1aa}input:-ms-input-placeholder,textarea:-ms-input-placeholder{opacity:1;color:#a1a1aa}input::placeholder,textarea::placeholder{opacity:1;color:#a1a1aa}button,[role=button]{cursor:pointer}table{border-collapse:collapse}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}button,input,optgroup,select,textarea{padding:0;line-height:inherit;color:inherit}pre,code,kbd,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}*,:before,:after{border-color:currentColor}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.visible{visibility:visible}.relative{position:relative}.my-1{margin-top:.25rem;margin-bottom:.25rem}.mr-2{margin-right:.5rem}.mb-5{margin-bottom:1.25rem}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.table{display:table}.h-6{height:1.5rem}.h-screen{height:100vh}.w-6{width:1.5rem}.w-60{width:15rem}.w-72{width:18rem}.flex-1{flex:1 1 0%}@-webkit-keyframes spin{to{transform:rotate(360deg)}}@keyframes spin{to{transform:rotate(360deg)}}@-webkit-keyframes ping{75%,to{transform:scale(2);opacity:0}}@keyframes ping{75%,to{transform:scale(2);opacity:0}}@-webkit-keyframes pulse{50%{opacity:.5}}@keyframes pulse{50%{opacity:.5}}@-webkit-keyframes bounce{0%,to{transform:translateY(-25%);-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1)}}@keyframes bounce{0%,to{transform:translateY(-25%);-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1)}}.items-center{align-items:center}.justify-end{justify-content:flex-end}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.border{border-width:1px}.p-4{padding:1rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.capitalize{text-transform:capitalize}.text-secondary{--tw-text-opacity: 1;color:rgba(102,102,102,var(--tw-text-opacity))}*,:before,:after{--tw-shadow: 0 0 #0000}*,:before,:after{--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgba(59, 130, 246, .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000}.filter{--tw-blur: var(--tw-empty, );--tw-brightness: var(--tw-empty, );--tw-contrast: var(--tw-empty, );--tw-grayscale: var(--tw-empty, );--tw-hue-rotate: var(--tw-empty, );--tw-invert: var(--tw-empty, );--tw-saturate: var(--tw-empty, );--tw-sepia: var(--tw-empty, );--tw-drop-shadow: var(--tw-empty, );filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur{--tw-blur: blur(8px)}.container[data-v-17f08d86]{border:1px solid #cccccc;border-radius:6px;padding:0 4px;min-height:30px;cursor:pointer}.tags-container[data-v-18554545]{word-break:keep-all;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}.taskTemplateInline[data-v-c3a26010]{float:right}a.taskTemplateInline[data-v-c3a26010]{margin-left:10px}div.taskTemplateInline[data-v-c3a26010]{margin-top:5px!important}
package/dist/venus.es.js CHANGED
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  import { defineComponent, ref, watch, computed, toRefs, getCurrentScope, shallowRef } from "vue-demi";
21
- import { Select, Modal, Form, Input, Checkbox, Divider, Button, Tag, Tooltip, Upload, Row, Col, Radio, Table, Badge, Card, message } from "ant-design-vue";
21
+ import { Select, Modal, Form, Input, Checkbox, Divider, Button, Upload, Tag, Tooltip, Row, Col, Radio, Popconfirm, Table, Badge, Card, message } from "ant-design-vue";
22
22
  import { useQuery, useResult, useMutation, useApolloClient } from "@vue/apollo-composable";
23
23
  import gql from "graphql-tag";
24
24
  import { path, uniqBy, prop } from "ramda";
@@ -707,6 +707,132 @@ var index$2 = [
707
707
  i864,
708
708
  i864a
709
709
  ];
710
+ const acceptableFormats = [
711
+ ".rar",
712
+ ".zip",
713
+ ".doc",
714
+ ".pdf",
715
+ ".docx",
716
+ ".jpg",
717
+ ".jpeg",
718
+ ".png"
719
+ ];
720
+ var __vue2_script$b = defineComponent({
721
+ name: "aFileUploader",
722
+ components: { AntUpload: Upload, AntTag: Tag, AntModal: Modal },
723
+ props: {
724
+ value: {
725
+ type: Array,
726
+ default: () => []
727
+ },
728
+ uploadFilesFunc: {
729
+ type: Function,
730
+ required: true
731
+ },
732
+ disabled: {
733
+ type: Boolean
734
+ },
735
+ previewMode: {
736
+ type: Boolean,
737
+ default: false
738
+ }
739
+ },
740
+ setup(props, { emit }) {
741
+ const me = useMe();
742
+ const loading = ref(false);
743
+ const changeVal = (k, v) => {
744
+ emit("change", __spreadProps(__spreadValues({}, props.value), {
745
+ [k]: v
746
+ }));
747
+ };
748
+ const remove = (id) => {
749
+ emit("change", props.value.filter((v) => v.id !== id));
750
+ };
751
+ const beforeUpload = (file) => {
752
+ var _a, _b;
753
+ if (loading.value)
754
+ return false;
755
+ loading.value = true;
756
+ props.uploadFilesFunc([file], {
757
+ office_id: (_a = me.value) == null ? void 0 : _a.lawFirmId,
758
+ user_id: (_b = me.value) == null ? void 0 : _b.id
759
+ }).then(([
760
+ {
761
+ status,
762
+ value: { id, name, link }
763
+ }
764
+ ]) => {
765
+ if (status === "fulfilled") {
766
+ emit("change", [
767
+ ...props.value,
768
+ {
769
+ id,
770
+ name,
771
+ link
772
+ }
773
+ ]);
774
+ }
775
+ }).finally(() => {
776
+ loading.value = false;
777
+ });
778
+ loading.value = false;
779
+ return false;
780
+ };
781
+ const previewImage = ref();
782
+ const typeOf = (filename) => {
783
+ if (/\.(gif|jpe?g|png)$/i.test(filename)) {
784
+ return "img";
785
+ } else if (/\.docx?$/i.test(filename)) {
786
+ return "doc";
787
+ } else if (/\.pdf$/i.test(filename)) {
788
+ return "pdf";
789
+ }
790
+ return "other";
791
+ };
792
+ const clickItem = (item, event) => {
793
+ if (typeOf(item.name) !== "img") {
794
+ return;
795
+ }
796
+ event.preventDefault();
797
+ previewImage.value = item.link;
798
+ };
799
+ return {
800
+ previewImage,
801
+ clickItem,
802
+ changeVal,
803
+ remove,
804
+ beforeUpload,
805
+ loading,
806
+ acceptableFormats
807
+ };
808
+ }
809
+ });
810
+ var render$b = function() {
811
+ var _vm = this;
812
+ var _h = _vm.$createElement;
813
+ var _c = _vm._self._c || _h;
814
+ return _c("div", { class: { container: !_vm.previewMode } }, [_c("ant-modal", { attrs: { "visible": !!_vm.previewImage, "footer": null }, on: { "cancel": function($event) {
815
+ _vm.previewImage = null;
816
+ } } }, [_c("img", { staticStyle: { "width": "100%" }, attrs: { "src": _vm.previewImage } })]), _c("ant-upload", { staticStyle: { "display": "inline" }, attrs: { "disabled": _vm.disabled || _vm.loading, "before-upload": _vm.beforeUpload, "action": "javascript:;", "fileList": [], "accept": _vm.acceptableFormats.join(",") } }, [!_vm.previewMode ? _c("ant-tag", [_vm._v(" " + _vm._s(_vm.$t("message.selectFile")) + " ")]) : _vm._e(), _vm.value.length ? _c("div", { staticStyle: { "display": "inline-block" } }, _vm._l(_vm.value, function(file) {
817
+ return _c("ant-tag", { key: file.id, attrs: { "closable": "" }, on: { "close": function($event) {
818
+ return _vm.remove(file.id);
819
+ } } }, [_c("a", { staticStyle: { "color": "#111" }, attrs: { "href": file.link, "target": "_blank" }, on: { "click": function($event) {
820
+ return _vm.clickItem(file, $event);
821
+ } } }, [_vm._v(" " + _vm._s(file.name) + " ")])]);
822
+ }), 1) : _vm._e(), !_vm.previewMode ? _c("span", { directives: [{ name: "else", rawName: "v-else" }], staticStyle: { "color": "#ccc" } }, [_vm._v(_vm._s(_vm.acceptableFormats.join(" ")))]) : _vm._e()], 1)], 1);
823
+ };
824
+ var staticRenderFns$b = [];
825
+ var index_vue_vue_type_style_index_0_scoped_true_lang$6 = "";
826
+ const __cssModules$b = {};
827
+ var __component__$b = /* @__PURE__ */ normalizeComponent(__vue2_script$b, render$b, staticRenderFns$b, false, __vue2_injectStyles$b, "17f08d86", null, null);
828
+ function __vue2_injectStyles$b(context) {
829
+ for (let o in __cssModules$b) {
830
+ this[o] = __cssModules$b[o];
831
+ }
832
+ }
833
+ var AFileUploader = /* @__PURE__ */ function() {
834
+ return __component__$b.exports;
835
+ }();
710
836
  var AssigneeTypes;
711
837
  (function(AssigneeTypes2) {
712
838
  AssigneeTypes2[AssigneeTypes2["EMPTY_DEFAULT"] = 4] = "EMPTY_DEFAULT";
@@ -716,7 +842,7 @@ var AssigneeTypes;
716
842
  })(AssigneeTypes || (AssigneeTypes = {}));
717
843
  var AssigneeTypesText;
718
844
  (function(AssigneeTypesText2) {
719
- AssigneeTypesText2["EMPTY_DEFAULT"] = "message.default";
845
+ AssigneeTypesText2["EMPTY_DEFAULT"] = "message.none";
720
846
  AssigneeTypesText2["BENEFICIARY"] = "message.beneficiary";
721
847
  AssigneeTypesText2["PETITIONER"] = "message.petitioner";
722
848
  AssigneeTypesText2["ATTORNEY"] = "message.attorney";
@@ -732,7 +858,7 @@ var ResponseCode;
732
858
  ResponseCode2["success"] = "SUCCESS";
733
859
  ResponseCode2["failed"] = "FAILED";
734
860
  })(ResponseCode || (ResponseCode = {}));
735
- var __vue2_script$b = defineComponent({
861
+ var __vue2_script$a = defineComponent({
736
862
  components: {
737
863
  AntTag: Tag
738
864
  },
@@ -749,25 +875,25 @@ var __vue2_script$b = defineComponent({
749
875
  };
750
876
  }
751
877
  });
752
- var render$b = function() {
878
+ var render$a = function() {
753
879
  var _vm = this;
754
880
  var _h = _vm.$createElement;
755
881
  var _c = _vm._self._c || _h;
756
882
  return _c("ant-tag", { attrs: { "color": _vm.tagColor(_vm.assigneeType) } }, [_vm._v(" " + _vm._s(_vm.$t(_vm.AssigneeTypesText[_vm.assigneeType])) + " ")]);
757
883
  };
758
- var staticRenderFns$b = [];
884
+ var staticRenderFns$a = [];
759
885
  var index_vue_vue_type_style_index_0_scoped_true_lang$5 = "";
760
- const __cssModules$b = {};
761
- var __component__$b = /* @__PURE__ */ normalizeComponent(__vue2_script$b, render$b, staticRenderFns$b, false, __vue2_injectStyles$b, "145c1099", null, null);
762
- function __vue2_injectStyles$b(context) {
763
- for (let o in __cssModules$b) {
764
- this[o] = __cssModules$b[o];
886
+ const __cssModules$a = {};
887
+ var __component__$a = /* @__PURE__ */ normalizeComponent(__vue2_script$a, render$a, staticRenderFns$a, false, __vue2_injectStyles$a, "145c1099", null, null);
888
+ function __vue2_injectStyles$a(context) {
889
+ for (let o in __cssModules$a) {
890
+ this[o] = __cssModules$a[o];
765
891
  }
766
892
  }
767
893
  var AssigneeTag = /* @__PURE__ */ function() {
768
- return __component__$b.exports;
894
+ return __component__$a.exports;
769
895
  }();
770
- var __vue2_script$a = defineComponent({
896
+ var __vue2_script$9 = defineComponent({
771
897
  name: "index",
772
898
  components: {
773
899
  AntTooltip: Tooltip
@@ -786,23 +912,23 @@ var __vue2_script$a = defineComponent({
786
912
  }
787
913
  }
788
914
  });
789
- var render$a = function() {
915
+ var render$9 = function() {
790
916
  var _vm = this;
791
917
  var _h = _vm.$createElement;
792
918
  var _c = _vm._self._c || _h;
793
919
  return _c("ant-tooltip", { attrs: { "placement": _vm.placement, "title": _vm.tags ? _vm.tags.join(", ") : "-" } }, [_c("div", { staticClass: "tags-container", style: "max-width:" + _vm.maxWidth + "px" }, [_c("span", [_vm._v(_vm._s(_vm.tags ? _vm.tags.join(", ") : "-"))])])]);
794
920
  };
795
- var staticRenderFns$a = [];
921
+ var staticRenderFns$9 = [];
796
922
  var index_vue_vue_type_style_index_0_scoped_true_lang$4 = "";
797
- const __cssModules$a = {};
798
- var __component__$a = /* @__PURE__ */ normalizeComponent(__vue2_script$a, render$a, staticRenderFns$a, false, __vue2_injectStyles$a, "18554545", null, null);
799
- function __vue2_injectStyles$a(context) {
800
- for (let o in __cssModules$a) {
801
- this[o] = __cssModules$a[o];
923
+ const __cssModules$9 = {};
924
+ var __component__$9 = /* @__PURE__ */ normalizeComponent(__vue2_script$9, render$9, staticRenderFns$9, false, __vue2_injectStyles$9, "18554545", null, null);
925
+ function __vue2_injectStyles$9(context) {
926
+ for (let o in __cssModules$9) {
927
+ this[o] = __cssModules$9[o];
802
928
  }
803
929
  }
804
930
  var TagsWithTooltip = /* @__PURE__ */ function() {
805
- return __component__$a.exports;
931
+ return __component__$9.exports;
806
932
  }();
807
933
  var TaskTypes;
808
934
  (function(TaskTypes2) {
@@ -823,104 +949,6 @@ var useChangeVal = (props, emit) => (k, v) => {
823
949
  [k]: v
824
950
  }));
825
951
  };
826
- const acceptableFormats = [
827
- ".rar",
828
- ".zip",
829
- ".doc",
830
- ".pdf",
831
- ".docx",
832
- ".jpg",
833
- ".jpeg",
834
- ".png"
835
- ];
836
- var __vue2_script$9 = defineComponent({
837
- name: "aFileUploader",
838
- components: { AntUpload: Upload, AntTag: Tag },
839
- props: {
840
- value: {
841
- type: Array,
842
- default: () => []
843
- },
844
- uploadFilesFunc: {
845
- type: Function,
846
- required: true
847
- },
848
- disabled: {
849
- type: Boolean
850
- }
851
- },
852
- setup(props, { emit }) {
853
- const me = useMe();
854
- const loading = ref(false);
855
- const changeVal = (k, v) => {
856
- emit("change", __spreadProps(__spreadValues({}, props.value), {
857
- [k]: v
858
- }));
859
- };
860
- const remove = (id) => {
861
- emit("change", props.value.filter((v) => v.id !== id));
862
- };
863
- const beforeUpload = (file) => {
864
- var _a, _b;
865
- if (loading.value)
866
- return false;
867
- loading.value = true;
868
- props.uploadFilesFunc([file], {
869
- office_id: (_a = me.value) == null ? void 0 : _a.lawFirmId,
870
- user_id: (_b = me.value) == null ? void 0 : _b.id
871
- }).then(([
872
- {
873
- status,
874
- value: { id, name, link }
875
- }
876
- ]) => {
877
- if (status === "fulfilled") {
878
- emit("change", [
879
- ...props.value,
880
- {
881
- id,
882
- name,
883
- link
884
- }
885
- ]);
886
- }
887
- }).finally(() => {
888
- loading.value = false;
889
- });
890
- loading.value = false;
891
- return false;
892
- };
893
- return {
894
- changeVal,
895
- remove,
896
- beforeUpload,
897
- loading,
898
- acceptableFormats
899
- };
900
- }
901
- });
902
- var render$9 = function() {
903
- var _vm = this;
904
- var _h = _vm.$createElement;
905
- var _c = _vm._self._c || _h;
906
- return _c("div", { staticClass: "container" }, [_c("ant-upload", { staticStyle: { "display": "inline" }, attrs: { "disabled": _vm.disabled || _vm.loading, "before-upload": _vm.beforeUpload, "action": "javascript:;", "fileList": [], "accept": _vm.acceptableFormats.join(",") } }, [_c("ant-tag", [_vm._v(" " + _vm._s(_vm.$t("message.selectFile")) + " ")]), _vm.value.length ? _c("div", { staticStyle: { "display": "inline-block" } }, _vm._l(_vm.value, function(file) {
907
- return _c("ant-tag", { key: file.id, attrs: { "closable": "" }, on: { "close": function($event) {
908
- return _vm.remove(file.id);
909
- } } }, [_vm._v(_vm._s(file.name) + " ")]);
910
- }), 1) : _c("span", { staticStyle: { "color": "#ccc" } }, [_vm._v(_vm._s(_vm.acceptableFormats.join(" ")))])], 1)], 1);
911
- };
912
- var staticRenderFns$9 = [];
913
- var aFileUploader_vue_vue_type_style_index_0_scoped_true_lang = "";
914
- const __cssModules$9 = {};
915
- var __component__$9 = /* @__PURE__ */ normalizeComponent(__vue2_script$9, render$9, staticRenderFns$9, false, __vue2_injectStyles$9, "678cdf3c", null, null);
916
- function __vue2_injectStyles$9(context) {
917
- for (let o in __cssModules$9) {
918
- this[o] = __cssModules$9[o];
919
- }
920
- }
921
- var AFileUploader = /* @__PURE__ */ function() {
922
- return __component__$9.exports;
923
- }();
924
952
  var refactorParams = (record) => {
925
953
  var _a;
926
954
  return {
@@ -997,6 +1025,9 @@ var __vue2_script$8 = defineComponent({
997
1025
  typeError
998
1026
  });
999
1027
  };
1028
+ watch(() => props.value.taskName, (val) => {
1029
+ nameError.value = !val;
1030
+ });
1000
1031
  const isAttorneySelected = computed(() => props.value.isEmployee === AssigneeTypes[AssigneeTypes.ATTORNEY]);
1001
1032
  watch(() => isAttorneySelected.value, (selected) => {
1002
1033
  if (selected) {
@@ -1022,26 +1053,26 @@ var render$8 = function() {
1022
1053
  var _c = _vm._self._c || _h;
1023
1054
  return _c("ant-form", { staticClass: "add-edit-task-modal", on: { "submit": function(e) {
1024
1055
  return e.preventDefault();
1025
- } } }, [_c("ant-row", { attrs: { "gutter": 20 } }, [_c("ant-col", { attrs: { "span": 12 } }, [_c("ant-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("ant-input", { attrs: { "disabled": _vm.disabled, "value": _vm.value.taskName }, on: { "input": function($event) {
1056
+ } } }, [_c("ant-row", { attrs: { "gutter": 20 } }, [_c("ant-col", { attrs: { "span": 12 } }, [_c("ant-form-item", { attrs: { "required": "", "name": "taskName", "label": _vm.$t("message.taskName"), "help": _vm.nameError ? _vm.$t("message.required") : void 0, "validate-status": _vm.nameError ? "error" : void 0 } }, [_c("ant-input", { attrs: { "disabled": _vm.disabled, "value": _vm.value.taskName }, on: { "input": function($event) {
1026
1057
  return _vm.changeVal("taskName", $event.target.value);
1027
- } } })], 1)], 1), _c("ant-col", { attrs: { "span": 12 } }, [_c("ant-form-item", { attrs: { "label": _vm.$t("message.assignee") + "(" + _vm.$t("message.optional") + ")" } }, [_c("ant-select", { staticStyle: { "min-width": "170px" }, attrs: { "disabled": _vm.disabled, "value": _vm.value.isEmployee, "allowClear": true }, on: { "change": function($event) {
1058
+ } } })], 1)], 1), _c("ant-col", { attrs: { "span": 12 } }, [_c("ant-form-item", { attrs: { "label": "" + _vm.$t("message.assignee") + " (" + _vm.$t("message.optional") + ")" } }, [_c("ant-select", { staticStyle: { "min-width": "170px" }, attrs: { "disabled": _vm.disabled, "value": _vm.value.isEmployee, "allowClear": true }, on: { "change": function($event) {
1028
1059
  return _vm.changeVal("isEmployee", $event);
1029
1060
  } } }, _vm._l(_vm.roles, function(role) {
1030
1061
  return _c("ant-select-option", { key: role.id, attrs: { "value": role.key } }, [_c("span", { staticStyle: { "text-transform": "capitalize" } }, [_vm._v(" " + _vm._s(_vm.$t("message." + role.i18nKey)) + " ")])]);
1031
- }), 1)], 1)], 1)], 1), _c("ant-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("ant-radio-group", { attrs: { "disabled": _vm.disabled, "value": _vm.value.generalTaskType }, on: { "change": function($event) {
1062
+ }), 1)], 1)], 1)], 1), _c("ant-form-item", { attrs: { "required": "", "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("ant-radio-group", { attrs: { "disabled": _vm.disabled, "value": _vm.value.generalTaskType }, on: { "change": function($event) {
1032
1063
  return _vm.changeVal("generalTaskType", $event.target.value);
1033
- } } }, [_c("ant-radio", { attrs: { "value": _vm.TaskTypes.clientUpload } }, [_vm._v(" " + _vm._s(_vm.$t("message.clientUpload")) + " ")]), _c("ant-radio", { attrs: { "value": _vm.TaskTypes.clientReview, "disabled": _vm.isAttorneySelected } }, [_vm._v(" " + _vm._s(_vm.$t("message.clientReview")) + " ")])], 1) : _c("div", [_vm._v(_vm._s(_vm.$t("message.worksheet")))])], 1), _c("ant-form-item", { attrs: { "label": _vm.$t("message.descriptions") + "(" + _vm.$t("message.optional") + ")" } }, [_c("ant-textarea", { attrs: { "disabled": _vm.disabled, "value": _vm.value.descriptions }, on: { "input": function($event) {
1064
+ } } }, [_c("ant-radio", { attrs: { "value": _vm.TaskTypes.clientUpload } }, [_vm._v(" " + _vm._s(_vm.$t("message.clientUpload")) + " ")]), _c("ant-radio", { attrs: { "value": _vm.TaskTypes.clientReview, "disabled": _vm.isAttorneySelected } }, [_vm._v(" " + _vm._s(_vm.$t("message.clientReview")) + " ")])], 1) : _c("div", [_vm._v(_vm._s(_vm.$t("message.worksheet")))])], 1), _c("ant-form-item", { attrs: { "label": "" + _vm.$t("message.descriptions") + " (" + _vm.$t("message.optional") + ")" } }, [_c("ant-textarea", { attrs: { "disabled": _vm.disabled, "value": _vm.value.descriptions }, on: { "input": function($event) {
1034
1065
  return _vm.changeVal("descriptions", $event.target.value);
1035
- } } })], 1), _c("ant-form-item", { attrs: { "label": _vm.$t("message.attachment") + "(" + _vm.$t("message.optional") + ")" } }, [_c("a-file-uploader", { attrs: { "disabled": _vm.disabled, "value": _vm.value.sampleDocs, "uploadFilesFunc": _vm.uploadFilesFunc }, on: { "change": function($event) {
1066
+ } } })], 1), _c("ant-form-item", { attrs: { "label": "" + _vm.$t("message.attachment") + " (" + _vm.$t("message.optional") + ")" } }, [_c("a-file-uploader", { attrs: { "disabled": _vm.disabled, "value": _vm.value.sampleDocs, "uploadFilesFunc": _vm.uploadFilesFunc }, on: { "change": function($event) {
1036
1067
  return _vm.changeVal("sampleDocs", $event);
1037
- } } })], 1), _c("ant-form-item", { attrs: { "label": _vm.$t("message.tags") + "(" + _vm.$t("message.optional") + ")" } }, [_c("ant-select", { attrs: { "disabled": _vm.disabled, "mode": "tags", "value": _vm.value.tagList, "options": [] }, on: { "change": function($event) {
1068
+ } } })], 1), _c("ant-form-item", { attrs: { "label": "" + _vm.$t("message.tags") + " (" + _vm.$t("message.optional") + ")" } }, [_c("ant-select", { attrs: { "disabled": _vm.disabled, "mode": "tags", "value": _vm.value.tagList, "options": [] }, on: { "change": function($event) {
1038
1069
  return _vm.changeVal("tagList", $event);
1039
1070
  } } })], 1)], 1);
1040
1071
  };
1041
1072
  var staticRenderFns$8 = [];
1042
1073
  var index_vue_vue_type_style_index_0_scoped_true_lang$3 = "";
1043
1074
  const __cssModules$8 = {};
1044
- var __component__$8 = /* @__PURE__ */ normalizeComponent(__vue2_script$8, render$8, staticRenderFns$8, false, __vue2_injectStyles$8, "daa8be96", null, null);
1075
+ var __component__$8 = /* @__PURE__ */ normalizeComponent(__vue2_script$8, render$8, staticRenderFns$8, false, __vue2_injectStyles$8, "58dbc3e8", null, null);
1045
1076
  function __vue2_injectStyles$8(context) {
1046
1077
  for (let o in __cssModules$8) {
1047
1078
  this[o] = __cssModules$8[o];
@@ -1052,7 +1083,14 @@ var TaskForm = /* @__PURE__ */ function() {
1052
1083
  }();
1053
1084
  var __vue2_script$7 = defineComponent({
1054
1085
  name: "NewTask",
1055
- components: { AFileUploader, TaskForm, AntModal: Modal, AntCheckbox: Checkbox, AntButton: Button },
1086
+ components: {
1087
+ AFileUploader,
1088
+ TaskForm,
1089
+ AntModal: Modal,
1090
+ AntCheckbox: Checkbox,
1091
+ AntButton: Button,
1092
+ AntPopconfirm: Popconfirm
1093
+ },
1056
1094
  props: {
1057
1095
  visible: {
1058
1096
  type: Boolean,
@@ -1145,7 +1183,7 @@ var render$7 = function() {
1145
1183
  } }, scopedSlots: _vm._u([{ key: "footer", fn: function() {
1146
1184
  return [_c("div", { staticClass: "footer" }, [_vm.showSendEmail ? _c("div", { staticStyle: { "float": "left", "padding-top": "5px", "padding-left": "10px" } }, [_c("ant-checkbox", { attrs: { "checked": _vm.value.isNotified }, on: { "change": function($event) {
1147
1185
  return _vm.changeVal("isNotified", $event.target.checked);
1148
- } } }, [_vm._v(" " + _vm._s(_vm.$t("message.sendEmail")) + " ")])], 1) : _vm._e(), _c("div", [_c("ant-button", { attrs: { "loading": _vm.loading, "type": "primary" }, on: { "click": _vm.submit } }, [_vm._v(_vm._s(_vm.$t("message.submit")) + " ")]), _c("ant-button", { on: { "click": function($event) {
1186
+ } } }, [_vm._v(" " + _vm._s(_vm.$t("message.sendEmail")) + " ")])], 1) : _vm._e(), _c("div", [_c("ant-popconfirm", { attrs: { "title": "\u6587\u6848\u7F3A\u5931", "placement": "top" }, on: { "confirm": _vm.submit } }, [_c("ant-button", { attrs: { "loading": _vm.loading, "type": "primary" } }, [_vm._v(_vm._s(_vm.$t("message.submit")) + " ")])], 1), _c("ant-button", { on: { "click": function($event) {
1149
1187
  return _vm.changeVisible(false);
1150
1188
  } } }, [_vm._v(_vm._s(_vm.$t("message.cancel")) + " ")])], 1)])];
1151
1189
  }, proxy: true }]) }, [_c("task-form", { ref: "taskForm", attrs: { "upload-files-func": _vm.uploadFilesFunc, "law-firm-id": _vm.lawFirmId, "user-id": _vm.userId, "value": _vm.value.taskTemplateObj }, on: { "update:value": _vm.updateFormValue } }), _vm.showAddToList ? _c("ant-checkbox", { attrs: { "checked": _vm.value.isAddedToTask }, on: { "change": function($event) {
@@ -1155,7 +1193,7 @@ var render$7 = function() {
1155
1193
  var staticRenderFns$7 = [];
1156
1194
  var index_vue_vue_type_style_index_0_scoped_true_lang$2 = "";
1157
1195
  const __cssModules$7 = {};
1158
- var __component__$7 = /* @__PURE__ */ normalizeComponent(__vue2_script$7, render$7, staticRenderFns$7, false, __vue2_injectStyles$7, "6a05980e", null, null);
1196
+ var __component__$7 = /* @__PURE__ */ normalizeComponent(__vue2_script$7, render$7, staticRenderFns$7, false, __vue2_injectStyles$7, "2617d5ac", null, null);
1159
1197
  function __vue2_injectStyles$7(context) {
1160
1198
  for (let o in __cssModules$7) {
1161
1199
  this[o] = __cssModules$7[o];
@@ -1209,7 +1247,7 @@ var render$6 = function() {
1209
1247
  var _vm = this;
1210
1248
  var _h = _vm.$createElement;
1211
1249
  var _c = _vm._self._c || _h;
1212
- return _c("div", { staticClass: "filter mb-5" }, [_c("ant-input", { style: "width:" + _vm.width + "px", attrs: { "value": _vm.conditions.keywords }, on: { "input": function($event) {
1250
+ return _c("div", { staticClass: "filter mb-5" }, [_c("ant-input", { style: "width:" + _vm.width + "px", attrs: { "value": _vm.conditions.keywords, "placeholder": _vm.$t("message.searchTaskPlaceholder") }, on: { "input": function($event) {
1213
1251
  return _vm.changeVal("keywords", $event.target.value);
1214
1252
  } }, scopedSlots: _vm._u([{ key: "suffix", fn: function() {
1215
1253
  return void 0;
@@ -1222,7 +1260,7 @@ var render$6 = function() {
1222
1260
  var staticRenderFns$6 = [];
1223
1261
  var index_vue_vue_type_style_index_0_scoped_true_lang$1 = "";
1224
1262
  const __cssModules$6 = {};
1225
- var __component__$6 = /* @__PURE__ */ normalizeComponent(__vue2_script$6, render$6, staticRenderFns$6, false, __vue2_injectStyles$6, "5128ec2c", null, null);
1263
+ var __component__$6 = /* @__PURE__ */ normalizeComponent(__vue2_script$6, render$6, staticRenderFns$6, false, __vue2_injectStyles$6, "c3a26010", null, null);
1226
1264
  function __vue2_injectStyles$6(context) {
1227
1265
  for (let o in __cssModules$6) {
1228
1266
  this[o] = __cssModules$6[o];
@@ -1276,8 +1314,7 @@ var __vue2_script$5 = defineComponent({
1276
1314
  {
1277
1315
  title: t("message.taskName"),
1278
1316
  dataIndex: "taskName",
1279
- key: "taskName",
1280
- scopedSlots: { customRender: "taskName" }
1317
+ key: "taskName"
1281
1318
  },
1282
1319
  {
1283
1320
  title: t("message.assignee"),
@@ -1312,11 +1349,9 @@ var render$5 = function() {
1312
1349
  var _vm = this;
1313
1350
  var _h = _vm.$createElement;
1314
1351
  var _c = _vm._self._c || _h;
1315
- return _c("div", [_c("ant-table", { attrs: { "dataSource": _vm.dataSource, "rowKey": "id", "columns": _vm.columns, "pagination": _vm.pagination, "loading": _vm.loading }, on: { "change": function($event) {
1352
+ return _c("div", [_c("ant-table", { attrs: { "size": "middle", "dataSource": _vm.dataSource, "rowKey": "id", "columns": _vm.columns, "pagination": _vm.pagination, "loading": _vm.loading }, on: { "change": function($event) {
1316
1353
  return _vm.$emit("changePagination", $event);
1317
- } }, scopedSlots: _vm._u([{ key: "taskName", fn: function(text, record) {
1318
- return _c("span", {}, [_c("span", { staticStyle: { "display": "inline-block", "width": "250px" } }, [_vm._v(_vm._s(text))])]);
1319
- } }, { key: "isEmployee", fn: function(isEmployee) {
1354
+ } }, scopedSlots: _vm._u([{ key: "isEmployee", fn: function(isEmployee) {
1320
1355
  return _c("span", {}, [_c("assignee-tag", { attrs: { "assignee-type": isEmployee } })], 1);
1321
1356
  } }, { key: "tagList", fn: function(tags) {
1322
1357
  return [_c("tags-with-tooltip", { attrs: { "tags": tags } })];
@@ -1333,7 +1368,7 @@ var render$5 = function() {
1333
1368
  var staticRenderFns$5 = [];
1334
1369
  var TaskTablePure_vue_vue_type_style_index_0_scoped_true_lang = "";
1335
1370
  const __cssModules$5 = {};
1336
- var __component__$5 = /* @__PURE__ */ normalizeComponent(__vue2_script$5, render$5, staticRenderFns$5, false, __vue2_injectStyles$5, "cbdc9a40", null, null);
1371
+ var __component__$5 = /* @__PURE__ */ normalizeComponent(__vue2_script$5, render$5, staticRenderFns$5, false, __vue2_injectStyles$5, "2e685386", null, null);
1337
1372
  function __vue2_injectStyles$5(context) {
1338
1373
  for (let o in __cssModules$5) {
1339
1374
  this[o] = __cssModules$5[o];
@@ -1640,10 +1675,6 @@ var __vue2_script$2 = defineComponent({
1640
1675
  type: String,
1641
1676
  required: true
1642
1677
  },
1643
- loading: {
1644
- type: Boolean,
1645
- default: false
1646
- },
1647
1678
  sendEmail: {
1648
1679
  type: Boolean,
1649
1680
  default: false
@@ -1655,6 +1686,10 @@ var __vue2_script$2 = defineComponent({
1655
1686
  allowClear: {
1656
1687
  type: Boolean,
1657
1688
  default: false
1689
+ },
1690
+ adding: {
1691
+ type: Boolean,
1692
+ default: false
1658
1693
  }
1659
1694
  },
1660
1695
  setup(props, { emit }) {
@@ -1687,7 +1722,7 @@ var render$2 = function() {
1687
1722
  return _vm.$emit("update:sendEmail", $event.target.checked);
1688
1723
  } } }, [_vm._v(" " + _vm._s(_vm.$t("message.sendTaskEmail")) + " ")]) : _vm._e(), _c("ant-button", { on: { "click": function($event) {
1689
1724
  return _vm.$emit("update:visible", false);
1690
- } } }, [_vm._v(" " + _vm._s(_vm.$t("message.cancel")) + " ")]), _c("ant-button", { attrs: { "loading": _vm.loading, "type": "primary", "disabled": !_vm.addedTasks.length }, on: { "click": function($event) {
1725
+ } } }, [_vm._v(" " + _vm._s(_vm.$t("message.cancel")) + " ")]), _c("ant-button", { attrs: { "loading": _vm.adding, "type": "primary", "disabled": !_vm.addedTasks.length }, on: { "click": function($event) {
1691
1726
  _vm.$emit("submit", {
1692
1727
  addedTasks: _vm.addedTasks,
1693
1728
  addedTaskIds: _vm.addedTasks.map(function(ref2) {
@@ -1701,7 +1736,7 @@ var render$2 = function() {
1701
1736
  var staticRenderFns$2 = [];
1702
1737
  var ReviewModal_vue_vue_type_style_index_0_scoped_true_lang = "";
1703
1738
  const __cssModules$2 = {};
1704
- var __component__$2 = /* @__PURE__ */ normalizeComponent(__vue2_script$2, render$2, staticRenderFns$2, false, __vue2_injectStyles$2, "09e3f3ca", null, null);
1739
+ var __component__$2 = /* @__PURE__ */ normalizeComponent(__vue2_script$2, render$2, staticRenderFns$2, false, __vue2_injectStyles$2, "315dcb1d", null, null);
1705
1740
  function __vue2_injectStyles$2(context) {
1706
1741
  for (let o in __cssModules$2) {
1707
1742
  this[o] = __cssModules$2[o];
@@ -1781,7 +1816,9 @@ const CreateTaskTemplateMutation = gql`
1781
1816
  ${taskTemplateFragment}
1782
1817
  `;
1783
1818
  const defaultTaskTemplate = {
1784
- taskTemplateObj: {},
1819
+ taskTemplateObj: {
1820
+ generalTaskType: TaskTypes.clientUpload
1821
+ },
1785
1822
  isAddedToTask: false,
1786
1823
  isNotified: false
1787
1824
  };
@@ -1834,9 +1871,17 @@ var __vue2_script$1 = defineComponent({
1834
1871
  },
1835
1872
  pageSize: {
1836
1873
  type: Number
1874
+ },
1875
+ closeAfterAdd: {
1876
+ type: Boolean,
1877
+ default: true
1878
+ },
1879
+ adding: {
1880
+ type: Boolean,
1881
+ default: false
1837
1882
  }
1838
1883
  },
1839
- setup(_, { emit }) {
1884
+ setup(props, { emit }) {
1840
1885
  const { client } = useApolloClient();
1841
1886
  const mainModal = ref();
1842
1887
  const reviewModal = ref();
@@ -1860,6 +1905,12 @@ var __vue2_script$1 = defineComponent({
1860
1905
  tempTask.value = defaultTaskTemplate;
1861
1906
  }
1862
1907
  });
1908
+ watch(() => props.visible, (visible) => {
1909
+ if (!visible) {
1910
+ addedTasks.value = [];
1911
+ emit("update:value", []);
1912
+ }
1913
+ });
1863
1914
  const updateReviewModalContent = (record, newRecord) => {
1864
1915
  if (reviewModalVisible.value) {
1865
1916
  const newValue = addedTasks.value.map((originTask) => {
@@ -1907,8 +1958,10 @@ var __vue2_script$1 = defineComponent({
1907
1958
  const submitting = computed(() => updateTemplate.loading.value || createTemplate.loading.value);
1908
1959
  const endReviewing = (result) => {
1909
1960
  emit("submit", result);
1910
- reviewModalVisible.value = false;
1911
- newTaskVisible.value = false;
1961
+ if (props.closeAfterAdd) {
1962
+ reviewModalVisible.value = false;
1963
+ newTaskVisible.value = false;
1964
+ }
1912
1965
  };
1913
1966
  const editTask = (record) => {
1914
1967
  newTaskVisible.value = true;
@@ -1959,7 +2012,7 @@ var render$1 = function() {
1959
2012
  var pagination = ref2.pagination;
1960
2013
  var changePagination = ref2.changePagination;
1961
2014
  return [_vm._t("table", null, { "loading": loading, "dataSource": dataSource, "pagination": pagination, "changePagination": changePagination })];
1962
- } }], null, true) }), _c("review-modal", { ref: "reviewModal", attrs: { "sendEmail": _vm.sendEmail, "allow-clear": _vm.allowClear, "tempTask": _vm.tempTask, "review-text": _vm.reviewText, "added-tasks": _vm.addedTasks, "showSendEmail": _vm.showSendEmail, "visible": _vm.reviewModalVisible, "newTaskVisible": _vm.newTaskVisible }, on: { "update:tempTask": function($event) {
2015
+ } }], null, true) }), _c("review-modal", { ref: "reviewModal", attrs: { "adding": _vm.adding, "sendEmail": _vm.sendEmail, "allow-clear": _vm.allowClear, "tempTask": _vm.tempTask, "review-text": _vm.reviewText, "added-tasks": _vm.addedTasks, "showSendEmail": _vm.showSendEmail, "visible": _vm.reviewModalVisible, "newTaskVisible": _vm.newTaskVisible }, on: { "update:tempTask": function($event) {
1963
2016
  _vm.tempTask = $event;
1964
2017
  }, "update:temp-task": function($event) {
1965
2018
  _vm.tempTask = $event;
@@ -1984,7 +2037,7 @@ var render$1 = function() {
1984
2037
  var staticRenderFns$1 = [];
1985
2038
  var index_vue_vue_type_style_index_0_scoped_true_lang = "";
1986
2039
  const __cssModules$1 = {};
1987
- var __component__$1 = /* @__PURE__ */ normalizeComponent(__vue2_script$1, render$1, staticRenderFns$1, false, __vue2_injectStyles$1, "ffef8fd2", null, null);
2040
+ var __component__$1 = /* @__PURE__ */ normalizeComponent(__vue2_script$1, render$1, staticRenderFns$1, false, __vue2_injectStyles$1, "5099cd32", null, null);
1988
2041
  function __vue2_injectStyles$1(context) {
1989
2042
  for (let o in __cssModules$1) {
1990
2043
  this[o] = __cssModules$1[o];
@@ -2022,4 +2075,4 @@ function __vue2_injectStyles(context) {
2022
2075
  var index = /* @__PURE__ */ function() {
2023
2076
  return __component__.exports;
2024
2077
  }();
2025
- export { AssigneeTag, NewTask, index$3 as ProfileSelect, TagsWithTooltip, index$1 as TaskCart, TaskForm, TaskTable, TaskTemplateFilter, index as TestComponent, index$2 as forms, getLanguageMessage, refactorParams as refactorTaskTemplateParams, submit as submitTaskTemplate, useCreateTaskTemplate, useMutateTaskTemplate, useSearchTaskConditions, useSearchTaskTemplates };
2078
+ export { AssigneeTag, AFileUploader as FileUploader, NewTask, index$3 as ProfileSelect, TagsWithTooltip, index$1 as TaskCart, TaskForm, TaskTable, TaskTemplateFilter, index as TestComponent, index$2 as forms, getLanguageMessage, refactorParams as refactorTaskTemplateParams, submit as submitTaskTemplate, useCreateTaskTemplate, useMutateTaskTemplate, useSearchTaskConditions, useSearchTaskTemplates };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ailaw/venus",
3
- "version": "0.4.0",
3
+ "version": "0.4.4",
4
4
  "files": [
5
5
  "dist"
6
6
  ],