UNPKG

@europeana/portal

Version:
2 lines 1.82 kB
(window.webpackJsonp=window.webpackJsonp||[]).push([[124],{1184:function(t,e,n){"use strict";n.r(e);var o=n(23),r=(n(75),n(128),{name:"DeleteSetModal",mixins:[n(317).a],props:{setId:{type:String,required:!0},modalId:{type:String,default:"delete-set-modal"},modalStatic:{type:Boolean,default:!1}},data:function(){return{toastMsg:this.$t("set.notifications.deleted")}},methods:{submitForm:function(){var t=this;return Object(o.a)(regeneratorRuntime.mark((function e(){var n,o,path;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$store.dispatch("set/delete",t.setId);case 2:t.makeToast(t.toastMsg),t.hide(),t.setId.endsWith("/".concat(null===(n=t.$route)||void 0===n||null===(o=n.params)||void 0===o?void 0:o.pathMatch))&&(path=t.$path({name:"account"}),t.$goto(path));case 5:case"end":return e.stop()}}),e)})))()},goBack:function(){this.hide(),this.$emit("cancel")},hide:function(){this.$bvModal.hide(this.modalId)}}}),d=n(59),component=Object(d.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("b-modal",{attrs:{id:t.modalId,title:t.$t("set.actions.delete"),static:t.modalStatic,"hide-header-close":"","hide-footer":""}},[n("p",[t._v(t._s(t.$t("set.prompts.delete")))]),t._v(" "),n("b-form",{on:{submit:function(e){return e.stopPropagation(),e.preventDefault(),t.submitForm.apply(null,arguments)}}},[n("div",{staticClass:"modal-footer"},[n("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(" "),n("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=25ff806.js.map