text: webpackJsonp([17],{241:function(t,e,s){"use strict";e.a={en:{name:"Name",status:"Status",amount:"Amount",tk:"Amount",number:"Number",service:"Service",com:"Com",operator:"Operator",date:"Date",message:"Message",user_id:"User ID",u_n:"User Name",fee:"Fee",action:"Actions",address:"Address",type:"Type",s_cat:"Select Category",m_n:"Mobile Number",trx_id:"Trx ID",all:"All",t_a:"Total Amount",t_com:"Total Commission",s_u_h:"Search by mobile, email or username",next:"Next",previous:"Previous",m_s:"Modify Status",d_s:"Delete Selected",edit_schedule:"Edit Schedule",schedule_time:"Schedule Time",s_o:"Select Operator",s_s:"Select Service",no:"No:",note:"Note",pin:"Pin",close:"Close",create:"Create",delete:"Delete",edit:"Edit",view:"View",update:"Update",cancelled:"Cancelled",waiting:"Waiting",show_pin:"Show Pin",hide_pin:"Hide Pin",refresh_list:"Refresh List",c_h_go_b:"Click here to go back",c_h_go_f:"Click here to go forward",to_type_number:"To type number"},bn:{name:"নাম",status:"অবস্থা",amount:"টাকা",tk:"টাকার পরিমান",number:"নাম্বার",service:"সেবা",com:"কমিশন",operator:"অপারেটর",date:"তারিখ",message:"মেসেজ",user_id:"ইউজার আইডি",u_n:"ইউজার নাম",fee:"ফি",action:"সম্পাদন",address:"ঠিকানা",type:"ধরন",s_cat:"শ্রেনী নির্বাচন",m_n:"মোবাইল নাম্বার",trx_id:"লেনদেন নং",all:"সকল",t_a:"মোট টাকার পরিমান",t_com:"মোট কমিশন",s_u_h:"মোবাইল বা ইমেইল দিয়ে সন্ধান করুন।",next:"পরবর্তী",previous:"পূর্ববর্তী",m_s:"অবস্থা সংশোধন করুন",d_s:"নির্বাচিত তথ্য মুছে ফেলুন",edit_schedule:"সময় সম্পাদনা করুন",schedule_time:"সময় নির্ধারন করুন",s_o:"অপারেটর নির্বাচন",s_s:"সেবা নির্বাচন",no:"নং:",note:"নোট",pin:"পিন",close:"বন্ধ",create:"তৈরী করুন",delete:"মুছে ফেলুন",edit:"সম্পাদন",view:"দেখুন",update:"পরিবর্তন",cancelled:"বাতিল করা হয়েছে",waiting:"অপেক্ষমান",show_pin:"পিন দেখুন",hide_pin:"পিন অদৃশ্য",refresh_list:"তালিকা পুনঃ লোড করুন",c_h_go_b:"পিচনে যাও",c_h_go_f:"সামনে যাও",to_type_number:"নাম্বার টাইপ করতে"}}},281:function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=s(241);e.default={components:{"date-time-picker":function(){return s.e(59).then(s.bind(null,240))}},data:function(){return{windowHeight:window.innerHeight,windowWidth:window.innerWidth,userList:!0,chatList:!0,backMsg:!1,dateOptions:this.$store.state.dateOptions,search_user:null,to_user_id:null,to_u_n:null,auth_id:this.$store.state.auth_id,inbox:{to_user_id:null,msg:""},accounts:[],inboxSearch:{date_from:"",date_to:"",order_by:""},inboxes:[],inbox_users:[],bucket_url:null,isLoading:!1,perPage:this.$route.query.per_page,perPageOptions:this.$store.state.perPageOptions,selected:[],selectAll:!1,noData:"",preloader:!0}},watch:{perPage:function(t){var e=this.$route.query.page;this.$router.push({path:document.location.search,query:{page:e,per_page:t}}),this.getLists()},"$route.query.id":function(t){this.inbox.to_user_id=t,this.getInbox()},windowHeight:function(t,e){this.boxHeight()},windowWidth:function(t,e){this.boxWidth()},$route:function(t){this.boxWidth(),this.boxHeight()}},created:function(){var t=this;this.inbox.to_user_id=this.$route.query.id,this.getLists();var e=this.$route.query.per_page;this.perPageOptions.find(function(t){return t.value==e})||this.perPageOptions.splice(0,0,{text:e,value:e}),Echo.private("message."+this.auth_id).listen("Message",function(e){t.inboxes.push(e.data)})},mounted:function(){var t=this;this.scrollToEnd(),this.boxHeight(),this.boxWidth(),this.$route.query.id&&this.getInbox(),this.$nextTick(function(){window.addEventListener("resize",function(){t.windowHeight=window.innerHeight})}),this.$nextTick(function(){window.addEventListener("resize",function(){t.windowWidth=window.innerWidth})})},updated:function(){this.scrollToEnd(),this.boxHeight(),this.boxWidth()},methods:{boxWidth:function(){this.windowWidth<768?this.$route.query.id?(this.chatList=!0,this.userList=!1,this.backMsg=!0):(this.chatList=!1,this.userList=!0):(this.chatList=!0,this.userList=!0)},boxHeight:function(){var t=this.windowHeight-265,e=this.windowHeight-265;document.querySelector(".message-content .message-menu").style.height=t+"px",document.querySelector(".chat .card-body").style.height=e+"px"},searchUserSelected:function(){var t=this.search_user;if(t){this.to_u_n=t.name;var e=this.$route.query.page,s=this.$route.query.per_page;this.$router.replace({name:"msgInbox",query:{id:t.id,page:e,per_page:s}}),this.inbox_users.unshift({to_user_id:t.id,user_to:t}),this.getInbox()}},customLabel:function(t){var e=t.name;return void 0===e?"":e},asyncFind:function(t){var e=this;this.timer&&(clearTimeout(this.timer),this.timer=null),this.timer=setTimeout(function(){t.length<4||(e.isLoading=!0,axios.get("/api/v1/ac/accounts?title="+t).then(function(t){e.accounts=t.data.users,e.isLoading=!1}).catch(function(t){e.$store.commit("errorMessages",t)}))},600)},select:function(){if(this.selected=[],!this.selectAll)for(var t in this.inboxes)this.selected.push(this.inboxes[t].id)},u_n:function(t){return null!=t.user_from?t.user_from.name:t.user_to.name},user_msg:function(t){return t?t.length<40?t:t.substring(0,40)+"...":""},user_image:function(t){var e="/default/imgs/user.jpg";return t.user_from?t.user_from.profile.avatar_src?this.bucket_url+t.user_from.profile.avatar_src.resized_name:e:t.user_to&&t.user_to.profile.avatar_src?this.bucket_url+t.user_to.profile.avatar_src.resized_name:e},selectedUser:function(t){this.to_u_n=null!=t.user_from?t.user_from.name:t.user_to.name;var e=this.$route.query.page,s=this.$route.query.per_page;null!=t.user_from?this.$router.replace({name:"msgInbox",query:{id:t.user_from.id,page:e,per_page:s}}):this.$router.replace({name:"msgInbox",query:{id:t.user_to.id,page:e,per_page:s}}),this.boxWidth(),this.boxHeight(),this.getInbox()},dataSearch:function(){var t=this.inboxSearch,e={};for(var s in t.date_from=t.date_from?t.date_from.toString():"",t.date_to=t.date_to?t.date_to.toString():"",t)t[s]?e[s]="inbox_id"!=s?t[s]:t[s].id:this.$route.query[s]&&(e[s]="");this.$router.push({path:document.location.search,query:e}),this.getLists()},getInbox:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],s=this,i=this.$route.query.per_page,a=e?t:this.$route.query.page;e&&this.$router.push({path:document.location.search,query:{page:a,per_page:i}});var r=this.$route.query,o=Object.keys(r).map(function(t){return t+"="+r[t]}).join("&");axios.get("/api/v1/msg/inboxes?"+o).then(function(t){s.preloader=!1,s.inboxes=t.data.inboxes,s.to_u_n=t.data.user_info.name,0==s.inboxes.length?s.noData=s.$store.state.noData:s.noData=""}).catch(function(t){s.$store.commit("errorMessages",t)})},getLists:function(){var t=this;axios.get("/api/v1/msg/inboxusers").then(function(e){t.preloader=!1,t.inbox_users=e.data.inboxusers,t.bucket_url=e.data.bucket_url}).catch(function(e){t.$store.commit("errorMessages",e)})},scrollToEnd:function(){var t=document.querySelector(".chat-box");if(t){var e=t.scrollHeight;t.scrollTop=e}},saveForm:function(){var t=this,e=t.inbox,s=e.msg;t.inboxes.push({from_user_id:this.auth_id,to_user_id:e.to_user_id,msg:e.msg,created_at:new Date}),e.msg="";var i={msg:s,to_user_id:e.to_user_id};axios.post("/api/v1/msg/inboxes",i).then(function(t){}).catch(function(e){t.$store.commit("errorMessages",e)})}},i18n:{messages:{en:{message_list:"Messages List",select_user_chat:"Select User To Chat",load_more:"Load More",type_message:"Type Message ...",send:"Send"},bn:{message_list:"মেসেজের তালিকা",select_user_chat:"চ্যাট ব্যবহারকারী নির্বাচন করুন",load_more:"আরও দেখুন",type_message:"মেসেজ লিখুন",send:"পাঠান"}},sharedMessages:i.a}}},282:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"component"},[s("div",{staticClass:"component-heading clearfix"},[s("h2",{staticClass:"heading float-left"},[t._v("\n            "+t._s(t.$t("message_list"))+"\n        ")]),t._v(" "),t.backMsg?[s("div",{staticClass:"back-forward float-right"},[s("button",{staticClass:"btn btn-sm btn-info",attrs:{title:t.$t("c_h_go_b")}},[s("a",{on:{click:function(e){return t.$router.push({name:"msgInbox",query:{page:1,per_page:20}})}}},[s("i",{staticClass:"icon-left",attrs:{"aria-hidden":"true"}})])])])]:[s("back-forward")]],2),t._v(" "),s("div",{staticClass:"component-body settings"},[s("div",{staticClass:"row"},[t.userList?s("div",{staticClass:"col-md-3 pr-0"},[s("ul",{staticClass:"message-content"},[s("li",{staticClass:"header"},[s("multiselect",{attrs:{id:"ajax",options:t.accounts,"custom-label":t.customLabel,"preserve-search":!0,placeholder:t.$t("search_user"),selectLabel:"",loading:t.isLoading,deselectLabel:"","internal-search":!1,searchable:!0,label:"name","track-by":"name","preselect-first":!0},on:{"search-change":t.asyncFind,input:function(e){return t.searchUserSelected()}},scopedSlots:t._u([{key:"tag",fn:function(e){return[s("span",[t._v(t._s(e.option.name))]),t._v(" "),s("span",{on:{click:function(t){return e.remove(e.option)}}},[t._v("x")])]}}],null,!1,1816658706),model:{value:t.search_user,callback:function(e){t.search_user=e},expression:"search_user"}}),t._v(" "),s("small",[t._v(t._s(t.$t("s_u_h")))])],1),t._v(" "),s("li",[s("ul",{staticClass:"message-menu"},t._l(t.inbox_users,function(e,i){return s("li",[s("a",{attrs:{href:"#"},on:{click:function(s){return s.preventDefault(),t.selectedUser(e)}}},[s("div",{staticClass:"float-left"},[s("img",{staticClass:"img-circle",attrs:{src:t.user_image(e),alt:"User Image"}})]),t._v(" "),s("div",{staticClass:"float-right"},[s("h4",[t._v("\n                                            "+t._s(t.u_n(e))+"\n                                            "),s("small",{staticClass:"d-none"},[s("i",{staticClass:"icon-clock-o"}),t._v(" "+t._s(t._f("moment")(e.created_at,"h:mm a, DD-MM-YYYY")))])]),t._v(" "),s("p",[t._v(t._s(t.user_msg(e.msg)))])])])])}),0)]),t._v(" "),s("li",{staticClass:"footer"},[s("a",{attrs:{href:"#",onclick:"event.preventDefault();"}},[t._v(t._s(t.$t("load_more")))])])])]):t._e(),t._v(" "),t.chatList?s("div",{staticClass:"col-md-9"},[s("div",{staticClass:"card chat chat-primary"},[s("div",{staticClass:"card-header"},[s("h3",{staticClass:"card-title"},[t._v(t._s(t.$route.query.id?t.to_u_n:t.$t("select_user_chat")))]),t._v(" "),t._e()]),t._v(" "),s("div",{staticClass:"card-body chat-box"},[s("div",{staticClass:"chat-messages"},t._l(t.inboxes,function(e,i){return s("div",{class:t.auth_id==e.from_user_id?"chat-msg right":"chat-msg"},[s("div",{staticClass:"chat-info clearfix"},[s("span",{class:t.auth_id==e.from_user_id?"chat-timestamp float-right":"chat-timestamp float-left"})]),t._v(" "),t.auth_id!=e.from_user_id?s("img",{staticClass:"chat-img img-circle",attrs:{src:"/default/imgs/user.jpg",alt:"User Image"}}):t._e(),t._v(" "),s("div",{class:t.auth_id==e.from_user_id?"chat-text":"chat-text bg-chat-gray"},[t._v("\n                                    "+t._s(e.msg)+"\n                                ")])])}),0)]),t._v(" "),s("div",{staticClass:"card-footer"},[s("form",{on:{submit:function(e){return e.preventDefault(),t.saveForm()}}},[s("div",{staticClass:"input-group"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.inbox.msg,expression:"inbox.msg"}],staticClass:"form-control",attrs:{type:"text",placeholder:t.$t("type_message")},domProps:{value:t.inbox.msg},on:{input:function(e){e.target.composing||t.$set(t.inbox,"msg",e.target.value)}}}),t._v(" "),s("span",{staticClass:"input-group-append"},[s("button",{staticClass:"btn btn-primary",attrs:{type:"submit"}},[t._v(t._s(t.$t("send")))])])])])])])]):t._e()])])])},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("button",{staticClass:"btn btn-tool",attrs:{type:"button","data-widget":"collapse"}},[e("i",{staticClass:"icon-minus"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("button",{staticClass:"btn btn-tool",attrs:{type:"button","data-toggle":"tooltip",title:"Contacts","data-widget":"chat-pane-toggle"}},[e("i",{staticClass:"icon-comment"})])}]}},508:function(t,e,s){var i=s(16)(s(281),s(282),!1,null,null,null);t.exports=i.exports}});