@europeana/portal
Version:
Europeana Portal
2 lines • 1.63 kB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[123],{1113:function(t,e,o){"use strict";o.r(e);var n=o(16),d=(o(99),{name:"DeleteSetModal",mixins:[o(254).a],props:{setId:{type:String,required:!0},modalId:{type:String,default:"delete-set-modal"},modalStatic:{type:Boolean,default:!1}},data(){return{toastMsg:this.$t("set.notifications.deleted")}},methods:{submitForm(){var t=this;return Object(n.a)((function*(){var e,o;if(yield t.$store.dispatch("set/delete",t.setId),t.makeToast(t.toastMsg),t.hide(),t.setId.endsWith("/".concat(null===(e=t.$route)||void 0===e||null===(o=e.params)||void 0===o?void 0:o.pathMatch))){var path=t.$path({name:"account"});t.$goto(path)}}))()},goBack(){this.hide(),this.$emit("cancel")},hide(){this.$bvModal.hide(this.modalId)}}}),l=o(40),component=Object(l.a)(d,(function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("b-modal",{attrs:{id:t.modalId,title:t.$t("set.actions.delete"),static:t.modalStatic,"hide-header-close":"","hide-footer":""}},[o("p",[t._v(t._s(t.$t("set.prompts.delete")))]),t._v(" "),o("b-form",{on:{submit:function(e){return e.stopPropagation(),e.preventDefault(),t.submitForm.apply(null,arguments)}}},[o("div",{staticClass:"modal-footer"},[o("b-button",{attrs:{variant:"outline-primary","data-qa":"close button"},on:{click:t.goBack}},[t._v("\n "+t._s(t.$t("actions.goBack"))+"\n ")]),t._v(" "),o("b-button",{attrs:{variant:"danger",type:"submit","data-qa":"delete button"}},[t._v("\n "+t._s(t.$t("set.actions.delete"))+"\n ")])],1)])],1)}),[],!1,null,null,null);e.default=component.exports}}]);
//# sourceMappingURL=94b6f79.modern.js.map