Passing the translations to the child delete component.

parent 6e1de80e
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<template scope="scope"> <template scope="scope">
<a class="btn btn-default btn-flat" @click.prevent="goToEdit(scope)"><i class="fa fa-pencil"></i></a> <a class="btn btn-default btn-flat" @click.prevent="goToEdit(scope)"><i class="fa fa-pencil"></i></a>
<delete-button :scope="scope" :rows="data"> <delete-button :scope="scope" :rows="data" :translations="translations">
</delete-button> </delete-button>
</template> </template>
</el-table-column> </el-table-column>
......
...@@ -69077,25 +69077,33 @@ module.exports = Component.exports ...@@ -69077,25 +69077,33 @@ module.exports = Component.exports
"use strict"; "use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Core_Assets_js_mixins_Translate__ = __webpack_require__(121);
// //
// //
// //
// //
/* harmony default export */ __webpack_exports__["default"] = ({ /* harmony default export */ __webpack_exports__["default"] = ({
mixins: [__WEBPACK_IMPORTED_MODULE_0__Core_Assets_js_mixins_Translate__["a" /* default */]],
props: { props: {
deleteMessage: { default: "Are you sure you want to delete this record?" },
deleteTitle: { default: "Confirmation" },
rows: { default: null }, rows: { default: null },
scope: { default: null } scope: { default: null }
}, },
data: function data() {
return {
deleteMessage: '',
deleteTitle: ''
};
},
methods: { methods: {
deleteRow: function deleteRow(event) { deleteRow: function deleteRow(event) {
var _this = this; var _this = this;
this.$confirm(this.deleteMessage, this.deleteTitle, { this.$confirm(this.deleteMessage, this.deleteTitle, {
confirmButtonText: 'OK', confirmButtonText: this.translate('core', 'button.delete'),
cancelButtonText: 'Cancel', cancelButtonText: this.translate('core', 'button.cancel'),
type: 'warning' type: 'warning'
}).then(function () { }).then(function () {
var vm = _this; var vm = _this;
...@@ -69115,12 +69123,17 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); ...@@ -69115,12 +69123,17 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
}); });
}); });
}).catch(function () { }).catch(function () {
console.log('asdasd');
_this.$message({ _this.$message({
type: 'info', type: 'info',
message: 'Delete canceled' message: 'Delete canceled'
}); });
}); });
} }
},
mounted: function mounted() {
this.deleteMessage = this.translate('core', 'modal.confirmation-message');
this.deleteTitle = this.translate('core', 'modal.title');
} }
}); });
...@@ -69307,7 +69320,8 @@ module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c ...@@ -69307,7 +69320,8 @@ module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c
})]), _vm._v(" "), _c('delete-button', { })]), _vm._v(" "), _c('delete-button', {
attrs: { attrs: {
"scope": scope, "scope": scope,
"rows": _vm.data "rows": _vm.data,
"translations": _vm.translations
} }
})] })]
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment