<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["person-dokumente"],{e794:function(e,t,n){"use strict";n.r(t);var o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"box__container"},[n("div",{staticClass:"box__title"},[e._v("Dokumente")]),e.rows.length?n("Table",{attrs:{tableId:"e4443e72-ee74-40ff-b07e-821a4f74c3d3",headers:e.headers,rows:e.rows,rowsPerPage:10,rowId:"fileId"},on:{"action-DOWNLOAD":e.downloadDocument,"action-DELETE":e.openDeleteDocumentConfirmModal}}):n("div",[e._v("Keine Daten")]),n("BaseModal",{ref:"deleteDocumentConfirmModal",attrs:{size:"sm",modalTitle:"LÃ¶schen"},on:{onConfirmButton:function(t){return e.deleteDocument()}}},[e._v(" Wollen Sie das Dokument wirklich lÃ¶schen? ")])],1)},a=[],i=n("1da1"),r=n("5530"),c=(n("96cf"),n("d81d"),n("2f62")),l=n("6758"),u=n("689f"),s=n("d53f"),d=n("a871"),m=n("5a29"),f={data:function(){return{documentFile:null,headers:{lockedLeft:[Object(s["TextColumn"])("filename","Name")],center:[Object(s["TextColumn"])("categoryDesc","Kategorie"),Object(s["TextColumn"])("description","Bezeichnung"),Object(s["DateColumn"])("dateCreated","Erstellt am"),Object(s["TextColumn"])("comment","Bemerkung")],lockedRight:[Object(s["ActionColumn"])("actions")]}}},computed:Object(r["a"])(Object(r["a"])({},Object(c["c"])({personId:l["default"].GETTERS.SELECTED_CUSTOMER_ID,customerData:l["default"].GETTERS.SELECTED_CUSTOMER_DATA,customerDataConfig:l["default"].GETTERS.CUSTOMER_DATA_CONFIG})),{},{isEditable:function(){var e;return null===(e=this.customerData)||void 0===e?void 0:e.isEditable},rows:function(){var e,t,n,o=[];return null!==(e=this.customerDataConfig)&amp;&amp;void 0!==e&amp;&amp;e.canViewDocument&amp;&amp;o.push(Object(s["SimpleAction"])("DOWNLOAD","PhFileArrowDown","Download")),null!==(t=this.customerDataConfig)&amp;&amp;void 0!==t&amp;&amp;t.canChangeDocument&amp;&amp;this.isEditable&amp;&amp;o.push(Object(s["SimpleAction"])("DELETE","PhTrash","LÃ¶schen")),((null===(n=this.customerData)||void 0===n?void 0:n.documents)||[]).map((function(e){return Object(r["a"])(Object(r["a"])({},e),{},{actions:o})}))}}),methods:{downloadDocument:function(e){var t=this;return Object(i["a"])(regeneratorRuntime.mark((function n(){var o,a;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,t.$store.dispatch(l["default"].ACTIONS.DOWNLOAD_FILE,{fileId:null===e||void 0===e?void 0:e.fileId});case 2:a=n.sent,Object(m["viewDocument"])({data:null===a||void 0===a?void 0:a.bytes,filename:null===a||void 0===a?void 0:a.fileName,contentType:null===a||void 0===a||null===(o=a.responseContentType)||void 0===o?void 0:o.mimeType});case 4:case"end":return n.stop()}}),n)})))()},openDeleteDocumentConfirmModal:function(e){this.documentFile=e,this.$refs.deleteDocumentConfirmModal.open()},deleteDocument:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$store.dispatch(l["default"].ACTIONS.DELETE_FILE,{personId:e.personId,fileId:null===(n=e.documentFile)||void 0===n?void 0:n.fileId});case 2:case"end":return t.stop()}}),t)})))()}},components:{Table:u["a"],BaseModal:d["a"]}},D=f,h=n("2877"),v=Object(h["a"])(D,o,a,!1,null,null,null);t["default"]=v.exports}}]);</pre></body></html>