"use strict";(self["webpackChunkcarabi_x2"]=self["webpackChunkcarabi_x2"]||[]).push([[7840],{3143:function(t,s,a){a.r(s),a.d(s,{default:function(){return h}});var e=function(){var t=this,s=t._self._c;return s("Modal",{ref:"modal",attrs:{autoOpen:!0,large:!1,fullHeight:!1,title:"Задачи по документу"},on:{closed:function(s){return t.$emit("closed")}}},[s("Quest",{attrs:{documentId:t.documentId},on:{close:t.close}})],1)},l=[],n=function(){var t=this,s=t._self._c;return t.loaded?s("div",{staticClass:"flex-column flex-grow tim-tasks"},[t.tasklist.length>0?s("div",{staticClass:"scrolltask"},[s("ul",{staticClass:"uk-list uk-list-divider uk-margin-remove"},t._l(t.tasklist,(function(a){return s("li",{key:a.id,staticClass:"tim-task",on:{dblclick:function(s){return t.checktask(a)}}},[s("div",{staticClass:"uk-flex uk-padding-xsmall"},[s("div",{staticClass:"uk-flex-1"},[s("a",{staticClass:"fontbig",on:{click:function(s){return t.checktask(a)}}},[t._v(t._s(a.NAME))]),s("div",{staticClass:"uk-text-muted fontsmall",staticStyle:{"align-items":"center"}},[s("div",[null!==a.FROM_DATE?s("span",{staticClass:"uk-margin-small-right"},[s("i",{staticClass:"far fa-clock",staticStyle:{"margin-right":"5px"}}),s("span",[t._v(t._s(a.FROM_DATE))]),a.FROM_DATE!==a.TO_DATE||null!==a.TO_DATE?s("span",[t._v(" - "+t._s(a.TO_DATE))]):t._e()]):t._e(),s("span",{staticClass:"uk-margin-small-right"},[s("span",[t._v("Статус: ")]),s("span",{staticStyle:{color:"#39f"}},[t._v(t._s(a.STATUS_NAME))])])]),s("div",[s("span",{staticClass:"uk-margin-small-right"},[t._v(t._s(a.CHIEF_EMP_NAME))]),s("span",{staticClass:"uk-margin-small-right"},[t._v(t._s(a.PERFORMER_EMP_NAME))])])]),s("div",{staticClass:"tclose fontmiddle",class:{topen:!0===a.open}},[t._v(" "+t._s(a.DESCR)+" ")])]),null!==a.DESCR?s("div",{staticClass:"uk-flex-none uk-margin-small-left openinfo",on:{click:function(t){a.open=!a.open}}},[s("a",[!1===a.open?s("i",{staticClass:"fas fa-angle-double-down"}):t._e(),!0===a.open?s("i",{staticClass:"fas fa-angle-double-up"}):t._e()])]):t._e()])])})),0)]):s("div",{staticClass:"notask"},[s("span",[t._v("Нет задач, связанных с этим документом")])]),s("div",{staticClass:"t-add-task",on:{click:function(s){return t.newtask()}}},[s("span",[t._v("Добавить задачу")])])]):s("div",{staticClass:"tim-tasks",staticStyle:{"min-height":"70vh"}},[s("loader")],1)},i=[],c=a(3216),o=a(5512),d={name:"Quest",components:{Error:()=>a.e(803).then(a.bind(a,2705)),Loader:()=>a.e(8326).then(a.bind(a,1259))},props:{documentId:Number},data(){return{tasklist:[],loaded:!0}},watch:{},created(){this.reloadtasks()},mounted(){},computed:{},methods:{async reloadtasks(){this.loaded=!1;let t=await c.vd.select("CARD_GET_TASK_LIST_CS",{DOC_ID:this.documentId},1e3);this.tasklist=t.map((t=>(t.open=!1,t))),this.loaded=!0},async checktask(t){o.A.openDocument(t.TASK_ID),this.$emit("close")},async newtask(){let t=await c.vd.select("CRM_CREATE_TASK_BY_DOC_CS",{DOCUMENT_ID:this.documentId},1);o.A.openDocument(t),this.$emit("close")}}},u=d,r=a(1656),_=(0,r.A)(u,n,i,!1,null,null,null),m=_.exports,k={name:"ModalTasks",components:{Modal:()=>a.e(8362).then(a.bind(a,2215)),Loader:()=>a.e(8326).then(a.bind(a,1259)),Quest:m},props:{documentId:Number},data(){return{}},methods:{close(){this.$refs.modal.close()}}},p=k,f=(0,r.A)(p,e,l,!1,null,null,null),h=f.exports}}]);
//# sourceMappingURL=ModalTasks.970a1ab2.js.map