Files
cssd-back/public/js/vue/chunks/23.40217385d9b39d52e527.js
T
2023-09-23 02:29:26 -07:00

1 line
14 KiB
JavaScript
Vendored

(window.webpackJsonp=window.webpackJsonp||[]).push([[23],{Mdqw:function(t,e,r){var n=r("Y0Rw");"string"==typeof n&&(n=[[t.i,n,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};r("aET+")(n,o);n.locals&&(t.exports=n.locals)},Y0Rw:function(t,e,r){(t.exports=r("JPst")(!1)).push([t.i,"\n.WM-ActionButton[data-v-0c3ec157] {\r\n padding: 8px 22px;\n}\n.Chip[data-v-0c3ec157] {\r\n align-items: center;\r\n border-radius: 28px;\r\n display: inline-flex;\r\n font-size: 13px;\r\n margin: 4px;\r\n outline: none;\r\n position: relative;\r\n transition: 0.3s cubic-bezier(0.25, 0.8, 0.5, 1);\r\n vertical-align: middle;\r\n height: 24px;\r\n color: #000;\n}\n.Chip .Content[data-v-0c3ec157] {\r\n align-items: center;\r\n border-radius: 24px;\r\n cursor: default;\r\n display: inline-flex;\r\n height: 32px;\r\n justify-content: space-between;\r\n padding: 0 12px;\r\n vertical-align: middle;\r\n white-space: nowrap;\r\n z-index: 1;\n}\n.Chip .Content.Count[data-v-0c3ec157] {\r\n background-color: #b2dfdb;\n}\n.Chip .Content.Unread[data-v-0c3ec157] {\r\n background-color: #ffcdd2;\n}\r\n",""])},dpx2:function(t,e,r){"use strict";r.r(e);var n=r("Y8XJ"),o=r("85lN"),a=r("L2JU");function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(){s=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),s=new S(n||[]);return o(i,"_invoke",{value:P(t,r,s)}),i}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var v="suspendedStart",d="executing",g="completed",y={};function m(){}function b(){}function w(){}var x={};f(x,c,(function(){return this}));var _=Object.getPrototypeOf,C=_&&_(_(N([])));C&&C!==r&&n.call(C,c)&&(x=C);var O=w.prototype=m.prototype=Object.create(x);function k(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(o,a,s,c){var l=p(t[o],t,a);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==i(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,s,c)}),(function(t){r("throw",t,s,c)})):e.resolve(f).then((function(t){u.value=t,s(u)}),(function(t){return r("throw",t,s,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function P(e,r,n){var o=v;return function(a,i){if(o===d)throw new Error("Generator is already running");if(o===g){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var s=n.delegate;if(s){var c=L(s,n);if(c){if(c===y)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var l=p(e,r,n);if("normal"===l.type){if(o=n.done?g:"suspendedYield",l.arg===y)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=g,n.method="throw",n.arg=l.arg)}}}function L(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,L(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=p(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function M(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(i(e)+" is not iterable")}return b.prototype=w,o(O,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:b,configurable:!0}),b.displayName=f(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,f(t,u,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},k(j.prototype),f(j.prototype,l,(function(){return this})),e.AsyncIterator=j,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new j(h(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},k(O),f(O,u,"Generator"),f(O,c,(function(){return this})),f(O,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=N,S.prototype={constructor:S,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(M),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],s=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(c&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),M(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;M(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function c(t,e,r,n,o,a,i){try{var s=t[a](i),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,o)}function l(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){c(a,n,o,i,s,"next",t)}function s(t){c(a,n,o,i,s,"throw",t)}i(void 0)}))}}function u(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function f(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?u(Object(r),!0).forEach((function(e){h(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function h(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==i(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===i(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var p,v,d={data:function(){return{headers:[{sortable:!1,text:"Name",value:"name"},{sortable:!1,text:"Count Messages",value:"operator"},{sortable:!1,text:"Unread Message",value:"operator"},{sortable:!1,text:"Action",value:"action",align:"left"}],filter:{name:""},items:[],refresh:"",currentPage:1,lastPage:1}},created:function(){this.load()},methods:f(f({load:(v=l(s().mark((function t(){var e,r,a=arguments;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=a.length>0&&void 0!==a[0]?a[0]:1,t.next=3,n.a.get(o.a.listMessages(e));case 3:(r=t.sent)&&r.data.data&&(this.items=r.data.data.data,this.currentPage=r.data.data.current_page,this.lastPage=r.data.data.last_page);case 5:case"end":return t.stop()}}),t,this)}))),function(){return v.apply(this,arguments)})},Object(a.d)("modal",["changeCurrentModal"])),{},{newmessage:function(){this.changeCurrentModal({modal:"modal-ticket-new-message"})},showmessages:function(t){this.changeCurrentModal({modal:"modal-ticket-show-messages",properties:{user_id:t}})},remove:(p=l(s().mark((function t(e){var r,a;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.a.delete(o.a.removeUserMessage(e));case 2:if((r=t.sent)&&200==r.status)for(a in this.items)this.items.hasOwnProperty(a)&&this.items[a].id==e&&this.items.splice(a,1);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return p.apply(this,arguments)})}),computed:f({},Object(a.c)("modal",["getModalResult"])),watch:{currentPage:function(t){this.load(t)},getModalResult:function(){this.load()}}},g=(r("pD8U"),r("KHd+")),y=Object(g.a)(d,(function(){var t=this,e=t._self._c;return e("v-container",{attrs:{fluid:""}},[e("material-card",{attrs:{color:"black",title:"My Recent ChatList",text:""}},[e("v-toolbar",{attrs:{flat:"",color:"white"}},[e("v-toolbar-title"),t._v(" "),e("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),e("v-spacer"),t._v(" "),e("v-btn",{staticClass:"WM-ActionButton mb-2 mr-4",attrs:{color:"black"},on:{click:t.newmessage}},[e("v-icon",{staticClass:"white--text mr-2 caption"},[t._v("fas fa-plus")]),t._v(" "),e("span",[t._v("New Message")])],1)],1),t._v(" "),e("v-layout",{staticClass:"px-4 my-3"},[e("v-divider")],1),t._v(" "),e("v-layout",{staticClass:"px-5 mt-3",attrs:{"align-center":"","justify-center":"",wrap:""}},[e("v-flex",{attrs:{md12:""}},[e("v-data-table",{attrs:{headers:t.headers,items:t.items,"hide-actions":""},scopedSlots:t._u([{key:"headerCell",fn:function(r){var n=r.header;return[e("span",{staticClass:"subheading font-weight-light text-white text--darken-3",domProps:{textContent:t._s(n.text)}})]}},{key:"items",fn:function(r){var n=r.item;return[e("td",{staticClass:"headline font-weight-light WM-NoLetterSpacing"},[t._v(t._s(n.name))]),t._v(" "),e("td",{staticClass:"title font-weight-light"},[e("span",{staticClass:"Chip"},[e("span",{staticClass:"Count Content"},[t._v(t._s(n.messages_count)+" count")])])]),t._v(" "),e("td",{staticClass:"title font-weight-light"},[e("span",{staticClass:"Chip"},[e("span",{staticClass:"Unread Content"},[t._v(t._s(n.unread_messages_count)+" unread")])])]),t._v(" "),e("td",{staticClass:"text-xs-left FlexBtn"},[e("v-tooltip",{attrs:{bottom:"","open-on-hover":""},scopedSlots:t._u([{key:"activator",fn:function(r){var o=r.on,a=r.attrs;return[e("v-btn",t._g(t._b({staticClass:"WM-ActionButton",attrs:{color:"cyan"},on:{click:function(e){return t.showmessages(n.id)}}},"v-btn",a,!1),o),[e("v-icon",{staticClass:"white--text mr-2 caption"},[t._v("fas fa-eye")]),t._v(" "),e("span",[t._v("Show Message")])],1)]}}],null,!0)},[t._v(" "),e("span",[t._v("Show Message")])]),t._v(" "),e("v-tooltip",{attrs:{bottom:"","open-on-hover":""},scopedSlots:t._u([{key:"activator",fn:function(r){var o=r.on,a=r.attrs;return[e("v-btn",t._g(t._b({staticClass:"WM-ActionButton",attrs:{color:"pink"},on:{click:function(e){return t.remove(n.id)}}},"v-btn",a,!1),o),[e("v-icon",{staticClass:"white--text mr-2 caption"},[t._v("fas fa-trash")]),t._v(" "),e("span",[t._v("delete")])],1)]}}],null,!0)},[t._v(" "),e("span",[t._v("delete")])])],1)]}}])})],1)],1),t._v(" "),e("v-divider"),t._v(" "),t.lastPage>1?e("div",{staticClass:"text-xs-center"},[e("v-pagination",{attrs:{color:"black",length:t.lastPage,"total-visible":6},model:{value:t.currentPage,callback:function(e){t.currentPage=e},expression:"currentPage"}})],1):t._e(),t._v(" "),e("v-layout",{staticClass:"mt-3",attrs:{row:"",wrap:"","align-center":"","justify-center":""}},[e("router-link",{attrs:{to:{name:"Dashboard"}}},[e("v-btn",{staticClass:"WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black ml-5"},[e("v-icon",{staticClass:"black--text mr-2 caption"},[t._v("fas fa-chevron-left")]),t._v(" "),e("span",{staticClass:"black--text"},[t._v("Back")])],1)],1)],1)],1)],1)}),[],!1,null,"0c3ec157",null);e.default=y.exports},pD8U:function(t,e,r){"use strict";r("Mdqw")}}]);