Dre4m Shell
Server IP : 85.214.239.14  /  Your IP : 3.145.186.132
Web Server : Apache/2.4.62 (Debian)
System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.18
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /proc/2/task/2/cwd/proc/3/root/srv/modoboa/instance/sitestatic/modoboa_contacts/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /proc/2/task/2/cwd/proc/3/root/srv/modoboa/instance/sitestatic/modoboa_contacts/js/app.b8c811a3.js
(function(t){function e(e){for(var s,n,c=e[0],i=e[1],l=e[2],u=0,m=[];u<c.length;u++)n=c[u],Object.prototype.hasOwnProperty.call(o,n)&&o[n]&&m.push(o[n][0]),o[n]=0;for(s in i)Object.prototype.hasOwnProperty.call(i,s)&&(t[s]=i[s]);d&&d(e);while(m.length)m.shift()();return r.push.apply(r,l||[]),a()}function a(){for(var t,e=0;e<r.length;e++){for(var a=r[e],s=!0,c=1;c<a.length;c++){var i=a[c];0!==o[i]&&(s=!1)}s&&(r.splice(e--,1),t=n(n.s=a[0]))}return t}var s={},o={app:0},r=[];function n(e){if(s[e])return s[e].exports;var a=s[e]={i:e,l:!1,exports:{}};return t[e].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=t,n.c=s,n.d=function(t,e,a){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:a})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)n.d(a,s,function(e){return t[e]}.bind(null,s));return a},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/sitestatic/";var c=window["webpackJsonp"]=window["webpackJsonp"]||[],i=c.push.bind(c);c.push=e,c=c.slice();for(var l=0;l<c.length;l++)e(c[l]);var d=i;r.push([0,"chunk-vendors"]),a()})({0:function(t,e,a){t.exports=a("56d7")},1:function(t,e){},"2f1f":function(t){t.exports=JSON.parse('{"en":{"Add":"Add","Add category":"Add category","Address":"Address","Address book information":"Address book information","Apply":"Apply","at":"at","Birth date":"Birth date","Categories":"Categories","City":"City","Close":"Close","Company":"Company","Contacts":"Contacts","Country":"Country","Display name":"Display name","Edit contact":"Edit contact","Email":"Email","First name":"First name","Last name":"Last name","More":"More","Name":"Name","New contact":"New contact","Note":"Note","Phone":"Phone","Phone number":"Phone number","Position":"Position","Save":"Save","Search":"Search","State/Province":"State/Province","Summary":"Summary","Synchronize your address book":"Synchronize your address book","The credentials are the same than the ones you use to access Modoboa.":"The credentials are the same than the ones you use to access Modoboa.","To access this address book from the outside (such as Mozilla Thunderbird or your smartphone), use the following URL:":"To access this address book from the outside (such as Mozilla Thunderbird or your smartphone), use the following URL:","Zip Code":"Zip Code"},"fr":{"Add":"Ajouter","Add category":"Ajouter une catégorie","Address":"Adresse","Address book information":"Information sur le carnet d\'adresse","Apply":"Appliquer","at":"chez","Birth date":"Date de naissance","Categories":"Catégories","City":"Ville","Close":"Fermer","Company":"Société","Contacts":"Contacts","Country":"Pays","Display name":"Nom complet","Edit contact":"Editer le contact","Email":"E-mail","First name":"Prénom","Last name":"Nom","More":"Plus","Name":"Nom","New contact":"Nouveau contact","Note":"Note","Phone":"Téléphone","Phone number":"Numéro de téléphone","Position":"Fonction","Save":"Enregistrer","Search":"Chercher","State/Province":"Etat/Région","Summary":"Résumé","Synchronize your address book":"Synchroniser votre carnet d\'adresse","The credentials are the same than the ones you use to access Modoboa.":"Les identifiants sont les mêmes que ceux utilisés pour accéder à Modoboa.","To access this address book from the outside (such as Mozilla Thunderbird or your smartphone), use the following URL:":"Pour accéder à ce carnet d\'adresse depuis l\'extérieur (comme Mozilla Thunderbird ou votre smartphone), utilisez l\'URL suivante :","Zip Code":"Code postal"}}')},4678:function(t,e,a){var s={"./af":"2bfb","./af.js":"2bfb","./ar":"8e73","./ar-dz":"a356","./ar-dz.js":"a356","./ar-kw":"423e","./ar-kw.js":"423e","./ar-ly":"1cfd","./ar-ly.js":"1cfd","./ar-ma":"0a84","./ar-ma.js":"0a84","./ar-sa":"8230","./ar-sa.js":"8230","./ar-tn":"6d83","./ar-tn.js":"6d83","./ar.js":"8e73","./az":"485c","./az.js":"485c","./be":"1fc1","./be.js":"1fc1","./bg":"84aa","./bg.js":"84aa","./bm":"a7fa","./bm.js":"a7fa","./bn":"9043","./bn.js":"9043","./bo":"d26a","./bo.js":"d26a","./br":"6887","./br.js":"6887","./bs":"2554","./bs.js":"2554","./ca":"d716","./ca.js":"d716","./cs":"3c0d","./cs.js":"3c0d","./cv":"03ec","./cv.js":"03ec","./cy":"9797","./cy.js":"9797","./da":"0f14","./da.js":"0f14","./de":"b469","./de-at":"b3eb","./de-at.js":"b3eb","./de-ch":"bb71","./de-ch.js":"bb71","./de.js":"b469","./dv":"598a","./dv.js":"598a","./el":"8d47","./el.js":"8d47","./en-au":"0e6b","./en-au.js":"0e6b","./en-ca":"3886","./en-ca.js":"3886","./en-gb":"39a6","./en-gb.js":"39a6","./en-ie":"e1d3","./en-ie.js":"e1d3","./en-il":"7333","./en-il.js":"7333","./en-in":"ec2e","./en-in.js":"ec2e","./en-nz":"6f50","./en-nz.js":"6f50","./en-sg":"b7e9","./en-sg.js":"b7e9","./eo":"65db","./eo.js":"65db","./es":"898b","./es-do":"0a3c","./es-do.js":"0a3c","./es-us":"55c9","./es-us.js":"55c9","./es.js":"898b","./et":"ec18","./et.js":"ec18","./eu":"0ff2","./eu.js":"0ff2","./fa":"8df4","./fa.js":"8df4","./fi":"81e9","./fi.js":"81e9","./fil":"d69a","./fil.js":"d69a","./fo":"0721","./fo.js":"0721","./fr":"9f26","./fr-ca":"d9f8","./fr-ca.js":"d9f8","./fr-ch":"0e49","./fr-ch.js":"0e49","./fr.js":"9f26","./fy":"7118","./fy.js":"7118","./ga":"5120","./ga.js":"5120","./gd":"f6b4","./gd.js":"f6b4","./gl":"8840","./gl.js":"8840","./gom-deva":"aaf2","./gom-deva.js":"aaf2","./gom-latn":"0caa","./gom-latn.js":"0caa","./gu":"e0c5","./gu.js":"e0c5","./he":"c7aa","./he.js":"c7aa","./hi":"dc4d","./hi.js":"dc4d","./hr":"4ba9","./hr.js":"4ba9","./hu":"5b14","./hu.js":"5b14","./hy-am":"d6b6","./hy-am.js":"d6b6","./id":"5038","./id.js":"5038","./is":"0558","./is.js":"0558","./it":"6e98","./it-ch":"6f12","./it-ch.js":"6f12","./it.js":"6e98","./ja":"079e","./ja.js":"079e","./jv":"b540","./jv.js":"b540","./ka":"201b","./ka.js":"201b","./kk":"6d79","./kk.js":"6d79","./km":"e81d","./km.js":"e81d","./kn":"3e92","./kn.js":"3e92","./ko":"22f8","./ko.js":"22f8","./ku":"2421","./ku.js":"2421","./ky":"9609","./ky.js":"9609","./lb":"440c","./lb.js":"440c","./lo":"b29d","./lo.js":"b29d","./lt":"26f9","./lt.js":"26f9","./lv":"b97c","./lv.js":"b97c","./me":"293c","./me.js":"293c","./mi":"688b","./mi.js":"688b","./mk":"6909","./mk.js":"6909","./ml":"02fb","./ml.js":"02fb","./mn":"958b","./mn.js":"958b","./mr":"39bd","./mr.js":"39bd","./ms":"ebe4","./ms-my":"6403","./ms-my.js":"6403","./ms.js":"ebe4","./mt":"1b45","./mt.js":"1b45","./my":"8689","./my.js":"8689","./nb":"6ce3","./nb.js":"6ce3","./ne":"3a39","./ne.js":"3a39","./nl":"facd","./nl-be":"db29","./nl-be.js":"db29","./nl.js":"facd","./nn":"b84c","./nn.js":"b84c","./oc-lnc":"167b","./oc-lnc.js":"167b","./pa-in":"f3ff","./pa-in.js":"f3ff","./pl":"8d57","./pl.js":"8d57","./pt":"f260","./pt-br":"d2d4","./pt-br.js":"d2d4","./pt.js":"f260","./ro":"972c","./ro.js":"972c","./ru":"957c","./ru.js":"957c","./sd":"6784","./sd.js":"6784","./se":"ffff","./se.js":"ffff","./si":"eda5","./si.js":"eda5","./sk":"7be6","./sk.js":"7be6","./sl":"8155","./sl.js":"8155","./sq":"c8f3","./sq.js":"c8f3","./sr":"cf1e","./sr-cyrl":"13e9","./sr-cyrl.js":"13e9","./sr.js":"cf1e","./ss":"52bd","./ss.js":"52bd","./sv":"5fbd","./sv.js":"5fbd","./sw":"74dc","./sw.js":"74dc","./ta":"3de5","./ta.js":"3de5","./te":"5cbb","./te.js":"5cbb","./tet":"576c","./tet.js":"576c","./tg":"3b1b","./tg.js":"3b1b","./th":"10e8","./th.js":"10e8","./tl-ph":"0f38","./tl-ph.js":"0f38","./tlh":"cf75","./tlh.js":"cf75","./tr":"0e81","./tr.js":"0e81","./tzl":"cf51","./tzl.js":"cf51","./tzm":"c109","./tzm-latn":"b53d","./tzm-latn.js":"b53d","./tzm.js":"c109","./ug-cn":"6117","./ug-cn.js":"6117","./uk":"ada2","./uk.js":"ada2","./ur":"5294","./ur.js":"5294","./uz":"2e8c","./uz-latn":"010e","./uz-latn.js":"010e","./uz.js":"2e8c","./vi":"2921","./vi.js":"2921","./x-pseudo":"fd7e","./x-pseudo.js":"fd7e","./yo":"7f33","./yo.js":"7f33","./zh-cn":"5c3a","./zh-cn.js":"5c3a","./zh-hk":"49ab","./zh-hk.js":"49ab","./zh-mo":"3a6c","./zh-mo.js":"3a6c","./zh-tw":"90ea","./zh-tw.js":"90ea"};function o(t){var e=r(t);return a(e)}function r(t){if(!a.o(s,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return s[t]}o.keys=function(){return Object.keys(s)},o.resolve=r,t.exports=o,o.id="4678"},"4ce8":function(t,e,a){},5454:function(t,e,a){"use strict";var s=a("4ce8"),o=a.n(s);o.a},"56d7":function(t,e,a){"use strict";a.r(e),a.d(e,"router",(function(){return Pe}));var s={};a.r(s),a.d(s,"deleteContact",(function(){return J})),a.d(s,"updateContact",(function(){return B}));a("4de4"),a("d3b7"),a("25f0"),a("e260"),a("e6cf"),a("cca6"),a("a79d");var o=a("2b0e"),r=a("8c4f"),n=a("a78e"),c=a.n(n),i=a("c1df"),l=a.n(i),d=a("5035"),u=a.n(d),m=a("2f62"),f=a("3835"),p="ADD_CONTACT",h="DELETE_CONTACT",b="SET_CONTACTS",v="UPDATE_CONTACT",C="SET_CONTACT",y="ADD_CATEGORY",g="SET_CATEGORIES",_="UPDATE_CATEGORY",k="DELETE_CATEGORY",j=(a("ac1f"),a("28dd"));o["a"].use(j["a"]);var x,E,w,P={default:{method:"GET",url:"/api/v1/address-books/default/"},sync:{method:"GET",url:"/api/v1/address-books/sync_to_cdav/"}},$=o["a"].resource("/api/v1/address-books{/pk}/",{},P),O=o["a"].resource("/api/v1/categories{/pk}/"),N=o["a"].resource("/api/v1/contacts{/pk}/"),F=function(){return $.default()},S=function(){return $.sync()},z=function(t){return O.save(t)},A=function(){return O.get()},T=function(t,e){return O.update({pk:t},e)},D=function(t){return O.delete({pk:t})},M=function(t){return N.save(t)},q=function(t){return N.delete({pk:t})},L=function(t){return N.get({pk:t})},R=function(t,e){var a={};return void 0!==t&&(a.search=t),void 0!==e&&(a.category=e),N.get(a)},I=function(t,e){return N.update({pk:t},e)},J=function(t,e){var a=t.commit;return q(e).then((function(t){a(h,{pk:e})}))},B=function(t,e){var a=t.commit,s=Object(f["a"])(e,2),o=s[0],r=s[1];return I(o,r).then((function(t){a(v,{contact:t.data})}))},U=a("ade3"),Y={categories:[]},G={categories:function(t){return t.categories}},Z={createCategory:function(t,e){var a=t.commit;return z(e).then((function(t){a(y,{category:t.data})}))},getCategories:function(t){var e=t.commit;return A().then((function(t){e(g,{categories:t.data})}))},updateCategory:function(t,e){var a=t.commit;return T(e.pk,e).then((function(t){a(_,{category:t.data})}))},deleteCategory:function(t,e){var a=t.commit;return D(e.pk).then((function(t){a(k,{pk:e.pk})}))}},K=(x={},Object(U["a"])(x,y,(function(t,e){var a=e.category;t.categories.push(a)})),Object(U["a"])(x,g,(function(t,e){var a=e.categories;t.categories=a})),Object(U["a"])(x,_,(function(t,e){var a=e.category;t.categories.filter((function(e,s){e.pk===a.pk&&o["a"].set(t.categories,s,a)}))})),Object(U["a"])(x,k,(function(t,e){var a=e.pk;t.categories=t.categories.filter((function(t){return t.pk!==a}))})),x),V={state:Y,getters:G,actions:Z,mutations:K},W={contact:[]},X={contact:function(t){return t.contact}},H={getContact:function(t,e){var a=t.commit;return L(e).then((function(t){a(C,{contact:t.data})}))}},Q=(E={},Object(U["a"])(E,C,(function(t,e){var a=e.contact;t.contact=a})),Object(U["a"])(E,h,(function(t,e){e.contact;t.contact={}})),Object(U["a"])(E,v,(function(t,e){var a=e.contact;t.contact=a})),E),tt={state:W,getters:X,actions:H,mutations:Q},et={contacts:[]},at={contacts:function(t){return t.contacts}},st={createContact:function(t,e){var a=t.commit;return M(e).then((function(t){a(p,{contact:t.data})}))},getContacts:function(t,e){var a=t.commit,s=Object(f["a"])(e,2),o=s[0],r=s[1];return R(o,r).then((function(t){a(b,{contacts:t.data})}))}},ot=(w={},Object(U["a"])(w,p,(function(t,e){var a=e.contact;t.contacts.push(a)})),Object(U["a"])(w,h,(function(t,e){var a=e.pk;t.contacts=t.contacts.filter((function(t){return t.pk!==a}))})),Object(U["a"])(w,b,(function(t,e){var a=e.contacts;t.contacts=a})),Object(U["a"])(w,v,(function(t,e){var a=e.contact;t.contacts.filter((function(e,s){e.pk===a.pk&&o["a"].set(t.contacts,s,a)}))})),w),rt={state:et,getters:at,actions:st,mutations:ot};o["a"].use(m["a"]);var nt={actions:s,modules:{categories:V,detail:tt,list:rt},strict:!1},ct=new m["a"].Store(nt),it=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{attrs:{id:"app"}},[a("div",{staticClass:"sidebar collapse navbar-collapse",attrs:{id:"leftcol"}},[a("ul",{staticClass:"nav nav-sidebar",attrs:{role:"menu"}},[a("router-link",{attrs:{tag:"li",to:{name:"contact-list"},exact:""}},[a("a",[a("span",{staticClass:"fa fa-address-book"}),t._v(" "),a("translate",[t._v("Contacts")])],1)]),a("li",{staticClass:"nav-header"},[a("translate",[t._v("Categories")])],1),t._l(t.categories,(function(e){return a("router-link",{key:e.pk,attrs:{tag:"li",to:{name:"contact-list-filtered",params:{category:e.name}}}},[a("a",{on:{mouseover:function(a){t.currentCategory=e},mouseleave:function(e){t.currentCategory={}}}},[a("span",{staticClass:"fa fa-tag"}),t._v(" "+t._s(e.name)+" "),t.currentCategory.pk===e.pk?a("span",{staticClass:"fa fa-trash pull-right",attrs:{title:t.deleteTitle},on:{click:function(a){return t.deleteCategory(e)}}}):t._e(),t.currentCategory.pk===e.pk?a("span",{staticClass:"fa fa-pencil pull-right",attrs:{title:t.modifyTitle},on:{click:function(a){return t.editCategory(e)}}}):t._e()])])})),a("li",[a("a",{attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.showCategoryForm=!0}}},[a("span",{staticClass:"fa fa-plus"}),t._v(" "),a("translate",[t._v("Add category")])],1)])],2)]),a("div",{staticClass:"main"},[a("router-view")],1),t.showCategoryForm?a("category-form",{attrs:{initialCategory:t.currentCategory},on:{close:t.closeCategoryForm}}):t._e()],1)},lt=[],dt=a("5530"),ut=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("modal",{attrs:{show:!0}},[a("div",{attrs:{slot:"header"},slot:"header"},[t.category.pk?a("h3",{staticClass:"modal-title"},[a("translate",[t._v("Edit category")])],1):a("h3",{staticClass:"modal-title"},[a("translate",[t._v("Add category")])],1)]),a("div",{attrs:{slot:"body"},slot:"body"},[a("form",{staticClass:"form-horizontal",attrs:{id:"categoryForm",method:"post"},on:{submit:function(e){return e.preventDefault(),t.createCategory(e)}}},[a("div",{staticClass:"form-group",class:{"has-error":t.formErrors.name}},[a("div",{staticClass:"col-sm-7"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.category.name,expression:"category.name"}],staticClass:"form-control",attrs:{type:"text",id:"name",name:"name",placeholder:t.namePlaceholder},domProps:{value:t.category.name},on:{input:function(e){e.target.composing||t.$set(t.category,"name",e.target.value)}}}),t.formErrors.name?a("span",{staticClass:"help-block"},[t._v(t._s(t.formErrors.name[0]))]):t._e()])]),a("hr"),a("div",{staticClass:"pull-right"},[a("button",{staticClass:"btn btn-default",attrs:{type:"button"},on:{click:t.close}},[a("translate",[t._v("Close")])],1),a("input",{staticClass:"btn btn-primary",attrs:{type:"submit"},domProps:{value:t._f("translate")("Save")}})]),a("div",{staticClass:"clearfix"})])])])},mt=[],ft={props:{initialCategory:{type:Object,default:function(){return{}}}},data:function(){return{category:JSON.parse(JSON.stringify(this.initialCategory)),formErrors:{}}},computed:{namePlaceholder:function(){return this.$gettext("Name")}},methods:{close:function(){this.show=!1,this.category={},this.formErrors={},this.$emit("close")},createCategory:function(){var t=this,e=this.category.pk?"updateCategory":"createCategory",a=JSON.parse(JSON.stringify(this.category));this.$store.dispatch(e,a).then((function(e){t.close()}),this.onFormError)},onFormError:function(t){this.formErrors=t.data}}},pt=ft,ht=a("2877"),bt=Object(ht["a"])(pt,ut,mt,!1,null,null,null),vt=bt.exports,Ct={components:{"category-form":vt},computed:Object(dt["a"])(Object(dt["a"])({},Object(m["b"])(["categories"])),{},{deleteTitle:function(){return this.$gettext("Delete this category")},modifyTitle:function(){return this.$gettext("Modify this category")}}),created:function(){this.$store.dispatch("getCategories"),this.$language.current="fr_FR"},data:function(){return{currentCategory:{},showCategoryForm:!1}},methods:{closeCategoryForm:function(){this.showCategoryForm=!1},deleteCategory:function(t){confirm(this.$gettext("Delete this category?"))&&this.$store.dispatch("deleteCategory",t)},editCategory:function(t){this.showCategoryForm=!0}}},yt=Ct,gt=Object(ht["a"])(yt,it,lt,!1,null,null,null),_t=gt.exports,kt=a("2f1f"),jt=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("h2",[t.contact.display_name?a("span",[t._v(t._s(t.contact.display_name))]):a("span",[t._v(t._s(t.contact.first_name)+" "+t._s(t.contact.last_name))]),a("button",{staticClass:"btn btn-default btn-xs",attrs:{type:"button"},on:{click:function(e){t.showContactCategoriesForm=!0}}},[a("span",{staticClass:"fa fa-tag"})]),a("button",{staticClass:"btn btn-primary btn-xs",attrs:{type:"button"},on:{click:function(e){t.showContactForm=!0}}},[a("span",{staticClass:"fa fa-edit"})]),a("button",{staticClass:"btn btn-danger btn-xs",attrs:{type:"button"},on:{click:function(e){return t.deleteContact(t.contact.pk)}}},[a("span",{staticClass:"fa fa-trash"})])]),a("hr"),a("div",{staticClass:"row"},[a("div",{staticClass:"col-sm-6"},[a("div",{staticClass:"panel panel-default"},[a("div",{staticClass:"panel-heading"},[a("div",{staticClass:"panel-title"},[a("translate",[t._v("Summary")])],1)]),a("table",{staticClass:"table"},[a("tbody",[t.contact.company?a("tr",[t._m(0),a("td",{attrs:{colspan:"2"}},[t.contact.position?a("span",[t._v(t._s(t.contact.position)+" "),a("translate",[t._v("at")])],1):t._e(),t._v(" "+t._s(t.contact.company))])]):t._e(),t.contact.birth_date?a("tr",[t._m(1),a("td",{attrs:{colspan:"2"}},[t._v(t._s(t._f("formatDate")(t.contact.birth_date)))])]):t._e(),t.contact.categories?a("tr",[t._m(2),a("td",{attrs:{colspan:"2"}},t._l(t.contact.categories,(function(e){return a("span",{key:"category-"+e,staticClass:"label label-success"},[t._v(t._s(t.getCategory(e).name))])})),0)]):t._e(),t._l(t.contact.emails,(function(e,s){return a("tr",{key:"email-"+s},[a("td",[0===s?a("span",{staticClass:"fa fa-envelope"}):t._e()]),a("td",[a("a",{attrs:{href:"mailto:"+e.address}},[t._v(t._s(e.address))])]),a("td",[a("span",{staticClass:"label label-info"},[t._v(t._s(e.type))])])])})),t._l(t.contact.phone_numbers,(function(e,s){return a("tr",{key:"phone-"+s},[a("td",[0===s?a("span",{staticClass:"fa fa-phone"}):t._e()]),a("td",[t._v(t._s(e.number))]),a("td",[a("span",{staticClass:"label label-info"},[t._v(t._s(e.type))])])])}))],2)])])]),t.contact.address?a("div",{staticClass:"col-sm-6"},[a("div",{staticClass:"panel panel-default"},[a("div",{staticClass:"panel-heading"},[a("div",{staticClass:"panel-title"},[a("span",{staticClass:"fa fa-map-marker"}),t._v(" "),a("translate",[t._v("Address")])],1)]),a("div",{staticClass:"panel-body"},[a("address",[t._v(" "+t._s(t.contact.address)),a("br"),t._v(" "+t._s(t.contact.city)+" "+t._s(t.contact.zipcode)+" "+t._s(t.contact.country)+" "+t._s(t.contact.state)+" ")])])])]):t._e(),t.contact.note?a("div",{staticClass:"col-sm-6"},[a("div",{staticClass:"panel panel-default"},[a("div",{staticClass:"panel-heading"},[a("div",{staticClass:"panel-title"},[a("span",{staticClass:"fa fa-sticky-note"}),t._v(" "),a("translate",[t._v("Note")])],1)]),a("div",{staticClass:"panel-body"},[a("p",[t._v(t._s(t.contact.note))])])])]):t._e()]),t.showContactCategoriesForm?a("contact-categories-form",{attrs:{index:t.getContactIndex(t.contact.pk)},on:{close:function(e){t.showContactCategoriesForm=!1}}}):t._e(),t.showContactForm?a("contact-form",{attrs:{pk:t.contact.pk},on:{close:t.closeContactForm}}):t._e()],1)},xt=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("td",[a("span",{staticClass:"fa fa-building"})])},function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("td",[a("span",{staticClass:"fa fa-calendar"})])},function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("td",[a("span",{staticClass:"fa fa-tag"})])}],Et=(a("4160"),a("159b"),a("b85c")),wt=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("modal",{attrs:{show:!0}},[a("div",{attrs:{slot:"header"},slot:"header"},[a("h3",{staticClass:"modal-title"},[a("translate",[t._v("Categories")])],1)]),a("div",{attrs:{slot:"body"},slot:"body"},[a("form",{staticClass:"form-horizontal",attrs:{id:"categoriesForm",method:"post"},on:{submit:function(e){return e.preventDefault(),t.saveCategories()}}},[t._l(t.categories,(function(e){return a("div",{key:e.pk,staticClass:"form-group"},[a("div",{staticClass:"col-sm-offset-1 col-sm-11"},[a("div",{staticClass:"checkbox"},[a("label",[a("input",{directives:[{name:"model",rawName:"v-model",value:t.checkedCategories,expression:"checkedCategories"}],attrs:{type:"checkbox"},domProps:{value:e.pk,checked:Array.isArray(t.checkedCategories)?t._i(t.checkedCategories,e.pk)>-1:t.checkedCategories},on:{change:function(a){var s=t.checkedCategories,o=a.target,r=!!o.checked;if(Array.isArray(s)){var n=e.pk,c=t._i(s,n);o.checked?c<0&&(t.checkedCategories=s.concat([n])):c>-1&&(t.checkedCategories=s.slice(0,c).concat(s.slice(c+1)))}else t.checkedCategories=r}}}),t._v(" "+t._s(e.name)+" ")])])])])})),a("hr"),a("div",{staticClass:"pull-right"},[a("button",{staticClass:"btn btn-default",attrs:{type:"button"},on:{click:t.close}},[a("translate",[t._v("Close")])],1),a("input",{staticClass:"btn btn-primary",attrs:{type:"submit"},domProps:{value:t._f("translate")("Apply")}})]),a("div",{staticClass:"clearfix"})],2)])])},Pt=[],$t=(a("a9e3"),{computed:Object(m["b"])(["categories"]),data:function(){return{checkedCategories:[]}},props:{index:{type:Number,required:!0}},methods:{close:function(){this.$emit("close")},saveCategories:function(){var t=this,e=JSON.parse(JSON.stringify(this.$store.state.list.contacts[this.index]));e.categories=this.checkedCategories,this.$store.dispatch("updateContact",[e.pk,e]).then((function(e){t.close()}))}},created:function(){this.checkedCategories=this.$store.state.list.contacts[this.index].categories}}),Ot=$t,Nt=Object(ht["a"])(Ot,wt,Pt,!1,null,null,null),Ft=Nt.exports,St=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("modal",{attrs:{show:!0}},[a("div",{attrs:{slot:"header"},slot:"header"},[t.pk?a("h3",{staticClass:"modal-title"},[a("translate",[t._v("Edit contact")])],1):a("h3",{staticClass:"modal-title"},[a("translate",[t._v("New contact")])],1)]),a("div",{attrs:{slot:"body"},slot:"body"},[a("form",{staticClass:"form-horizontal",attrs:{id:"contactForm",method:"post",enctype:"multipart/form-data"},on:{submit:function(e){return e.preventDefault(),t.saveContact(e)}}},[a("div",{staticClass:"form-group",class:{"has-error":t.formErrors["first_name"]||t.formErrors["last_name"]}},[a("label",{staticClass:"col-sm-1 control-label",attrs:{for:"first_name"}},[a("span",{staticClass:"fa fa-user"})]),a("div",{staticClass:"col-sm-6"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.contact.first_name,expression:"contact.first_name"}],staticClass:"form-control",attrs:{type:"text",id:"first_name",name:"first_name",placeholder:t.firstNamePlaceholder},domProps:{value:t.contact.first_name},on:{input:function(e){e.target.composing||t.$set(t.contact,"first_name",e.target.value)}}}),t.formErrors["first_name"]?a("span",{staticClass:"help-block"},[t._v(t._s(t.formErrors["first_name"][0]))]):t._e()]),a("div",{staticClass:"col-sm-5"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.contact.last_name,expression:"contact.last_name"}],staticClass:"form-control",attrs:{type:"text",id:"last_name",name:"last_name",placeholder:t.lastNamePlaceholder},domProps:{value:t.contact.last_name},on:{input:function(e){e.target.composing||t.$set(t.contact,"last_name",e.target.value)}}}),t.formErrors["last_name"]?a("span",{staticClass:"help-block"},[t._v(t._s(t.formErrors["last_name"][0]))]):t._e()])]),a("div",{staticClass:"form-group",class:{"has-error":t.formErrors["display_name"]}},[a("div",{staticClass:"col-sm-offset-1 col-sm-11"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.contact.display_name,expression:"contact.display_name"}],staticClass:"form-control",attrs:{type:"text",id:"display_name",name:"display_name",placeholder:t.displayNamePlaceholder},domProps:{value:t.contact.display_name},on:{input:function(e){e.target.composing||t.$set(t.contact,"display_name",e.target.value)}}}),t.formErrors["display_name"]?a("span",{staticClass:"help-block"},[t._v(t._s(t.formErrors["display_name"][0]))]):t._e()])]),a("div",{staticClass:"form-group",class:{"has-error":t.formErrors["company"]||t.formErrors["position"]}},[a("label",{staticClass:"col-sm-1 control-label",attrs:{for:"company"}},[a("span",{staticClass:"fa fa-building"})]),a("div",{staticClass:"col-sm-6"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.contact.company,expression:"contact.company"}],staticClass:"form-control",attrs:{type:"text",id:"company",name:"company",placeholder:t.companyPlaceholder},domProps:{value:t.contact.company},on:{input:function(e){e.target.composing||t.$set(t.contact,"company",e.target.value)}}}),t.formErrors["company"]?a("span",{staticClass:"help-block"},[t._v(t._s(t.formErrors["company"][0]))]):t._e()]),a("div",{staticClass:"col-sm-5"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.contact.position,expression:"contact.position"}],staticClass:"form-control",attrs:{type:"text",id:"position",name:"position",placeholder:t.positionPlaceholder},domProps:{value:t.contact.position},on:{input:function(e){e.target.composing||t.$set(t.contact,"position",e.target.value)}}}),t.formErrors["position"]?a("span",{staticClass:"help-block"},[t._v(t._s(t.formErrors["position"][0]))]):t._e()])]),t._l(t.contact.emails,(function(e,s){return a("email-field",{key:"email-"+s,attrs:{index:s,email:e,errors:t.formErrors.emails?t.formErrors.emails[s]:{}},on:{add:t.addEmailField,delete:function(e){return t.deleteEmailField(e)}}})})),t._l(t.contact.phone_numbers,(function(e,s){return a("phone-number-field",{key:"phone-"+s,attrs:{index:s,phone:e,errors:t.formErrors.phone_numbers?t.formErrors.phone_numbers[s]:{}},on:{add:t.addPhoneNumberField,delete:function(e){return t.deletePhoneNumberField(e)}}})})),t.showMore?a("div",[a("div",{staticClass:"form-group",class:{"has-error":t.formErrors["birth_date"]}},[a("label",{staticClass:"col-sm-1 control-label",attrs:{for:"birth_date"}},[a("span",{staticClass:"fa fa-calendar"})]),a("div",{staticClass:"col-sm-6"},[a("datepicker",{attrs:{id:"birth_date",name:"birth_date",inputClass:"form-control",placeholder:t.birthDatePlaceholder},model:{value:t.contact.birth_date,callback:function(e){t.$set(t.contact,"birth_date",e)},expression:"contact.birth_date"}}),t.formErrors["birth_date"]?a("span",{staticClass:"help-block"},[t._v(t._s(t.formErrors["birth_date"][0]))]):t._e()],1)]),a("div",{staticClass:"form-group",class:{"has-error":t.formErrors["address"]}},[a("label",{staticClass:"col-sm-1 control-label",attrs:{for:"address"}},[a("span",{staticClass:"fa fa-map-marker"})]),a("div",{staticClass:"col-sm-11"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.contact.address,expression:"contact.address"}],staticClass:"form-control",attrs:{type:"text",id:"address",name:"address",placeholder:t.addressPlaceholder},domProps:{value:t.contact.address},on:{input:function(e){e.target.composing||t.$set(t.contact,"address",e.target.value)}}}),t.formErrors["address"]?a("span",{staticClass:"help-block"},[t._v(t._s(t.formErrors["address"][0]))]):t._e()])]),a("div",{staticClass:"form-group",class:{"has-error":t.formErrors["zipcode"]||t.formErrors["city"]}},[a("div",{staticClass:"col-sm-offset-1 col-sm-4"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.contact.zipcode,expression:"contact.zipcode"}],staticClass:"form-control",attrs:{type:"text",id:"zipcode",name:"zipcode",placeholder:t.zipCodePlaceholder},domProps:{value:t.contact.zipcode},on:{input:function(e){e.target.composing||t.$set(t.contact,"zipcode",e.target.value)}}}),t.formErrors["zipcode"]?a("span",{staticClass:"help-block"},[t._v(t._s(t.formErrors["zipcode"][0]))]):t._e()]),a("div",{staticClass:"col-sm-7"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.contact.city,expression:"contact.city"}],staticClass:"form-control",attrs:{type:"text",id:"city",name:"city",placeholder:t.cityPlaceholder},domProps:{value:t.contact.city},on:{input:function(e){e.target.composing||t.$set(t.contact,"city",e.target.value)}}}),t.formErrors["city"]?a("span",{staticClass:"help-block"},[t._v(t._s(t.formErrors["city"][0]))]):t._e()])]),a("div",{staticClass:"form-group",class:{"has-error":t.formErrors["country"]||t.formErrors["state"]}},[a("div",{staticClass:"col-sm-offset-1 col-sm-6"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.contact.country,expression:"contact.country"}],staticClass:"form-control",attrs:{type:"text",id:"country",name:"country",placeholder:t.countryPlaceholder},domProps:{value:t.contact.country},on:{input:function(e){e.target.composing||t.$set(t.contact,"country",e.target.value)}}}),t.formErrors["country"]?a("span",{staticClass:"help-block"},[t._v(t._s(t.formErrors["country"][0]))]):t._e()]),a("div",{staticClass:"col-sm-5"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.contact.state,expression:"contact.state"}],staticClass:"form-control",attrs:{type:"text",id:"state",name:"state",placeholder:t.statePlaceholder},domProps:{value:t.contact.state},on:{input:function(e){e.target.composing||t.$set(t.contact,"state",e.target.value)}}}),t.formErrors["state"]?a("span",{staticClass:"help-block"},[t._v(t._s(t.formErrors["state"][0]))]):t._e()])]),a("div",{staticClass:"form-group"},[a("label",{staticClass:"col-sm-1 control-label",attrs:{for:"address"}},[a("span",{staticClass:"fa fa-sticky-note"})]),a("div",{staticClass:"col-sm-11"},[a("textarea",{directives:[{name:"model",rawName:"v-model",value:t.contact.note,expression:"contact.note"}],staticClass:"form-control",attrs:{id:"note",name:"note",placeholder:t.notePlaceholder},domProps:{value:t.contact.note},on:{input:function(e){e.target.composing||t.$set(t.contact,"note",e.target.value)}}})])])]):t._e(),a("hr"),a("button",{staticClass:"btn btn-default",attrs:{type:"button"},on:{click:function(e){t.showMore=!0}}},[a("translate",[t._v("More")])],1),a("div",{staticClass:"pull-right"},[a("button",{staticClass:"btn btn-default",attrs:{type:"button"},on:{click:t.close}},[a("translate",[t._v("Close")])],1),a("input",{staticClass:"btn btn-primary",attrs:{type:"submit",value:"Save"}})]),a("div",{staticClass:"clearfix"})],2)])])},zt=[],At=(a("a434"),a("b64b"),a("1276"),a("fa33")),Tt=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"form-group",class:{"has-error":t.errors.address||t.errors.type}},[t._m(0),a("div",{staticClass:"col-sm-6"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.email.address,expression:"email.address"}],staticClass:"form-control",attrs:{type:"email",id:"address",name:"address",placeholder:t.addressPlaceholder},domProps:{value:t.email.address},on:{input:function(e){e.target.composing||t.$set(t.email,"address",e.target.value)}}}),t.errors.address?a("span",{staticClass:"help-block"},[t._v(t._s(t.errors.address[0]))]):t._e()]),a("div",{staticClass:"col-sm-3"},[a("select",{directives:[{name:"model",rawName:"v-model",value:t.email.type,expression:"email.type"}],staticClass:"form-control",attrs:{id:"type",name:"type"},on:{change:function(e){var a=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){var e="_value"in t?t._value:t.value;return e}));t.$set(t.email,"type",e.target.multiple?a:a[0])}}},t._l(t.types,(function(e){return a("option",{key:e,domProps:{value:e}},[t._v(t._s(e)+" ")])})),0),t.errors.type?a("span",{staticClass:"help-block"},[t._v(t._s(t.errors.type[0]))]):t._e()]),a("div",{staticClass:"col-sm-2"},[a("a",{attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.$emit("add")}}},[a("span",{staticClass:"fa fa-plus"})]),t.index?a("a",{attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.$emit("delete",t.index)}}},[a("span",{staticClass:"fa fa-trash"})]):t._e()])])},Dt=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("label",{staticClass:"col-sm-1 control-label",attrs:{for:"address"}},[a("span",{staticClass:"fa fa-envelope"})])}],Mt={props:{email:Object,errors:Object,index:{type:Number,required:!0}},data:function(){return{types:["home","work","other"]}},computed:{addressPlaceholder:function(){return this.$gettext("Address")}}},qt=Mt,Lt=Object(ht["a"])(qt,Tt,Dt,!1,null,null,null),Rt=Lt.exports,It=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{ref:"modal",staticClass:"modal fade show in background-darken",attrs:{tabindex:"-1",role:"dialog"}},[a("div",{staticClass:"modal-dialog",attrs:{role:"document"}},[a("div",{staticClass:"modal-content"},[a("div",{staticClass:"modal-header"},[t._t("header")],2),a("div",{staticClass:"modal-body"},[t._t("body")],2),t.showFooter?a("div",{staticClass:"modal-footer"},[t._t("footer")],2):t._e()])])])},Jt=[],Bt={props:{show:{type:Boolean,required:!0,twoWay:!0},showFooter:{type:Boolean,default:!1}}},Ut=Bt,Yt=(a("5454"),Object(ht["a"])(Ut,It,Jt,!1,null,"29b4ea85",null)),Gt=Yt.exports,Zt=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"form-group",class:{"has-error":t.errors.number||t.errors.type}},[t._m(0),a("div",{staticClass:"col-sm-6"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.phone.number,expression:"phone.number"}],staticClass:"form-control",attrs:{type:"text",id:"number",name:"number",placeholder:t.phoneNumberPlaceholder},domProps:{value:t.phone.number},on:{input:function(e){e.target.composing||t.$set(t.phone,"number",e.target.value)}}}),t.errors.number?a("span",{staticClass:"help-block"},[t._v(t._s(t.errors.number[0]))]):t._e()]),a("div",{staticClass:"col-sm-3"},[a("select",{directives:[{name:"model",rawName:"v-model",value:t.phone.type,expression:"phone.type"}],staticClass:"form-control",attrs:{id:"type",name:"type"},on:{change:function(e){var a=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){var e="_value"in t?t._value:t.value;return e}));t.$set(t.phone,"type",e.target.multiple?a:a[0])}}},t._l(t.types,(function(e){return a("option",{key:e,domProps:{value:e}},[t._v(t._s(e))])})),0),t.errors.type?a("span",{staticClass:"help-block"},[t._v(t._s(t.errors.type[0]))]):t._e()]),a("div",{staticClass:"col-sm-2"},[a("a",{attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.$emit("add")}}},[a("span",{staticClass:"fa fa-plus"})]),t.index?a("a",{attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.$emit("delete",t.index)}}},[a("span",{staticClass:"fa fa-trash"})]):t._e()])])},Kt=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("label",{staticClass:"col-sm-1 control-label",attrs:{for:"number"}},[a("span",{staticClass:"fa fa-phone"})])}],Vt={props:{errors:Object,index:{type:Number,required:!0},phone:Object},data:function(){return{types:["cellular","fax","home","main","pager","work","other"]}},computed:{phoneNumberPlaceholder:function(){return this.$gettext("Phone number")}}},Wt=Vt,Xt=Object(ht["a"])(Wt,Zt,Kt,!1,null,null,null),Ht=Xt.exports,Qt={components:{datepicker:At["a"],"email-field":Rt,modal:Gt,"phone-number-field":Ht},data:function(){return{contact:{emails:[{}],phone_numbers:[{}]},formErrors:{},show:!0,showMore:!1}},computed:{firstNamePlaceholder:function(){return this.$gettext("First name")},lastNamePlaceholder:function(){return this.$gettext("Last name")},displayNamePlaceholder:function(){return this.$gettext("Display name")},companyPlaceholder:function(){return this.$gettext("Company")},positionPlaceholder:function(){return this.$gettext("Position")},birthDatePlaceholder:function(){return this.$gettext("Birth date")},addressPlaceholder:function(){return this.$gettext("Address")},zipCodePlaceholder:function(){return this.$gettext("Zip Code")},cityPlaceholder:function(){return this.$gettext("City")},countryPlaceholder:function(){return this.$gettext("Country")},statePlaceholder:function(){return this.$gettext("State/Province")},notePlaceholder:function(){return this.$gettext("Note")}},props:{pk:{type:Number,default:null}},created:function(){var t=this;this.pk&&L(this.pk).then((function(e){t.contact=e.data,0===t.contact.emails.length&&t.contact.emails.push({}),0===t.contact.phone_numbers.length&&t.contact.phone_numbers.push({}),""!==t.contact.address&&(t.showMore=!0)}))},methods:{close:function(){this.show=!1,this.contact={},this.formErrors={},this.$emit("close")},onFormError:function(t){this.formErrors=t.data},createContact:function(t){var e=this;this.$store.dispatch("createContact",t).then((function(t){e.close()}),this.onFormError)},saveContact:function(){var t=JSON.parse(JSON.stringify(this.contact));Object.keys(t.phone_numbers[0]).length||t.phone_numbers.splice(0,1),t.birth_date&&(t.birth_date=t.birth_date.split("T")[0]),null!==this.pk?this.updateContact(t):this.createContact(t)},addEmailField:function(){this.contact.emails.push({})},deleteEmailField:function(t){this.contact.emails.splice(t,1)},setEmail:function(t,e){this.contact.emails.splice(t,1,e)},addPhoneNumberField:function(){this.contact.phone_numbers.push({})},deletePhoneNumberField:function(t){this.contact.phone_numbers.splice(t,1)},setPhoneNumber:function(t,e){this.contact.phone_numbers.splice(t,1,e)},updateContact:function(t){var e=this,a=[t.pk,t];this.$store.dispatch("updateContact",a).then((function(t){e.close()}),this.onFormError)}}},te=Qt,ee=Object(ht["a"])(te,St,zt,!1,null,null,null),ae=ee.exports,se={components:{"contact-categories-form":Ft,"contact-form":ae},data:function(){return{showContactCategoriesForm:!1,showContactForm:!1}},computed:Object(m["b"])(["contact","categories"]),created:function(){this.$store.dispatch("getContact",this.$route.params.pk)},methods:{closeContactForm:function(){this.showContactForm=!1},deleteContact:function(t){var e=this;this.$store.dispatch("deleteContact",t).then((function(t){e.$router.push("/")}))},getContactIndex:function(t){var e=null;return this.$store.state.list.contacts.forEach((function(a,s){a.pk===t&&(e=s)})),e},getCategory:function(t){var e,a=Object(Et["a"])(this.categories);try{for(a.s();!(e=a.n()).done;){var s=e.value;if(s.pk===t)return s}}catch(o){a.e(o)}finally{a.f()}return null}}},oe=se,re=Object(ht["a"])(oe,jt,xt,!1,null,null,null),ne=re.exports,ce=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"row"},[a("div",{staticClass:"col-sm-5"},[a("search-form",{on:{search:function(e){return t.getContacts(e)}}})],1),a("div",{staticClass:"col-sm-7"},[a("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:function(e){t.showContactForm=!0}}},[a("span",{staticClass:"fa fa-plus"}),t._v(" "),a("translate",[t._v("Add")])],1),a("button",{staticClass:"btn btn-default",attrs:{type:"button"},on:{click:function(e){t.showInfo=!0}}},[a("span",{staticClass:"fa fa-info-circle"})]),!1===t.abookSynced?a("button",{staticClass:"btn btn-success",on:{click:t.launchAbookSync}},[a("translate",[t._v("Synchronize your address book")])],1):t._e()])]),t.contacts?a("table",{staticClass:"table"},[a("thead",[a("tr",[a("th",[a("translate",[t._v("Display name")])],1),a("th",[a("translate",[t._v("Email")])],1),a("th",[a("translate",[t._v("Phone")])],1),a("th")])]),a("tbody",t._l(t.contacts,(function(e,s){return a("tr",{key:e.pk},[a("td",[a("router-link",{attrs:{to:{name:"contact-detail",params:{pk:e.pk}}}},[e.display_name?a("span",[t._v(t._s(e.display_name))]):a("span",[t._v(t._s(e.first_name)+" "+t._s(e.last_name))])])],1),e.emails.length?a("td",[t._v(t._s(e.emails[0].address))]):a("td"),e.phone_numbers.length?a("td",[t._v(t._s(e.phone_numbers[0].number))]):a("td"),a("td",{staticClass:"text-right"},[a("button",{staticClass:"btn btn-default btn-xs",attrs:{type:"button"},on:{click:function(e){return t.editContactCategories(s)}}},[a("span",{staticClass:"fa fa-tag"})]),a("button",{staticClass:"btn btn-primary btn-xs",attrs:{type:"button"},on:{click:function(a){return t.editContact(e.pk)}}},[a("span",{staticClass:"fa fa-edit"})]),a("button",{staticClass:"btn btn-danger btn-xs",attrs:{type:"button"},on:{click:function(a){return t.deleteContact(e.pk)}}},[a("span",{staticClass:"fa fa-trash"})])])])})),0)]):t._e(),t.showContactCategoriesForm?a("contact-categories-form",{attrs:{index:t.contactIndex},on:{close:t.closeContactCategoriesForm}}):t._e(),t.showContactForm?a("contact-form",{attrs:{pk:t.currentContactPk},on:{close:t.closeContactForm}}):t._e(),t.showInfo?a("addressbook-detail",{attrs:{addressbook:t.addressBook},on:{close:function(e){t.showInfo=!1}}}):t._e()],1)},ie=[],le=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("modal",{attrs:{show:!0}},[a("div",{attrs:{slot:"header"},slot:"header"},[a("h3",{staticClass:"modal-title"},[a("translate",[t._v("Address book information")])],1)]),a("div",{attrs:{slot:"body"},slot:"body"},[a("p",[a("translate",[t._v("To access this address book from the outside (such as Mozilla Thunderbird or your smartphone), use the following URL: ")])],1),a("div",{staticClass:"alert alert-info"},[t._v(" "+t._s(t.addressbook.url)+" ")]),a("p",[a("translate",[t._v("The credentials are the same than the ones you use to access Modoboa.")])],1),a("hr"),a("div",{staticClass:"pull-right"},[a("button",{staticClass:"btn btn-default",attrs:{type:"button"},on:{click:t.close}},[a("translate",[t._v("Close")])],1)]),a("div",{staticClass:"clearfix"})])])},de=[],ue={props:{addressbook:Object},methods:{close:function(){this.$emit("close")}}},me=ue,fe=Object(ht["a"])(me,le,de,!1,null,null,null),pe=fe.exports,he=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("form",{staticClass:"form-horizontal",attrs:{role:"form"},on:{submit:function(e){return e.preventDefault(),t.search(e)}}},[a("div",{staticClass:"form-group has-feedback"},[a("div",{staticClass:"col-sm-12"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.query,expression:"query"}],staticClass:"form-control",attrs:{type:"text",placeholder:t.searchPlaceholder,id:"searchquery",name:"searchquery"},domProps:{value:t.query},on:{input:function(e){e.target.composing||(t.query=e.target.value)}}}),a("span",{staticClass:"fa fa-search form-control-feedback"})])])])},be=[],ve={data:function(){return{query:""}},computed:{searchPlaceholder:function(){return this.$gettext("Search")}},methods:{search:function(){this.$emit("search",this.query)}}},Ce=ve,ye=Object(ht["a"])(Ce,he,be,!1,null,null,null),ge=ye.exports,_e={components:{"contact-categories-form":Ft,"contact-form":ae,"search-form":ge,"addressbook-detail":pe},data:function(){return{currentContactPk:null,contactIndex:null,showContactForm:!1,showContactCategoriesForm:!1,abookSynced:!window.userProfile||window.userProfile.abookSynced,showInfo:!1,addressBook:null}},props:{pk:null},computed:Object(dt["a"])({},Object(m["b"])(["contacts"])),created:function(){var t=this;this.getContacts(this.$route.params),F().then((function(e){t.addressBook=e.data}))},methods:{getContacts:function(t,e){this.$store.dispatch("getContacts",[t,e])},closeContactCategoriesForm:function(){this.showContactCategoriesForm=!1,this.contactIndex=null},closeContactForm:function(){this.showContactForm=!1,this.currentContactPk=null},deleteContact:function(t){this.$store.dispatch("deleteContact",t)},editContact:function(t){this.currentContactPk=t,this.showContactForm=!0},editContactCategories:function(t){this.contactIndex=t,this.showContactCategoriesForm=!0},launchAbookSync:function(){var t=this;S().then((function(e){t.abookSynced=!0,window.location.reload()}))}},watch:{$route:function(t,e){this.getContacts(this.$route.params)}}},ke=_e,je=Object(ht["a"])(ke,ce,ie,!1,null,null,null),xe=je.exports;o["a"].use(u.a,{availableLanguages:{en:"English",fr:"Français"},translations:kt}),o["a"].use(r["a"]),o["a"].component("modal",Gt),o["a"].filter("formatDate",(function(t){if(t)return l()(String(t)).format("MM/DD/YYYY")})),o["a"].filter("translate",(function(t){return t?o["a"].prototype.$gettext(t.toString()):""}));var Ee=c.a.get("csrftoken");o["a"].http.headers.common["X-CSRFTOKEN"]=Ee;var we=[{path:"/",name:"contact-list",component:xe},{path:"/:pk(\\d+)",name:"contact-detail",component:ne},{path:"/:category([\\w%]+)",name:"contact-list-filtered",component:xe}],Pe=new r["a"]({routes:we,linkActiveClass:"active"});o["a"].config.productionTip=!1,new o["a"]({render:function(t){return t(_t)},router:Pe,store:ct}).$mount("#app"),o["a"].config.language=userLang}});
//# sourceMappingURL=app.b8c811a3.js.map

Anon7 - 2022
AnonSec Team