{"version":3,"sources":["webpack:///./src/components/Tournament/Edit/DeleteCancelDialog.vue?6ff0","webpack:///src/components/Tournament/Edit/DeleteCancelDialog.vue","webpack:///./src/components/Tournament/Edit/DeleteCancelDialog.vue?459a","webpack:///./src/components/Tournament/Edit/DeleteCancelDialog.vue"],"names":["render","_vm","this","_h","$createElement","_c","_self","attrs","scopedSlots","_u","key","fn","ref","on","_g","_v","_s","myMode","model","value","callback","$$v","dialog","expression","staticClass","toLowerCase","_e","loading","$event","stopPropagation","go","staticRenderFns","props","data","computed","mode","tournament","statusId","backToUsername","isEvent","organizers","length","organization","username","methods","id","patchSeries","dto","patchTournament","$VBL","patch","post","series","component","VBtn","VCard","VCardActions","VCardText","VDialog","VRow","VToolbar","VToolbarTitle"],"mappings":"uHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,WAAW,CAACE,MAAM,CAAC,WAAa,GAAG,YAAY,QAAQ,WAAa,qBAAqBC,YAAYP,EAAIQ,GAAG,CAAC,CAACC,IAAI,YAAYC,GAAG,SAASC,GAC7O,IAAIC,EAAKD,EAAIC,GACb,MAAO,CAACR,EAAG,QAAQJ,EAAIa,GAAG,CAACP,MAAM,CAAC,MAAQ,SAAS,KAAO,GAAG,MAAQ,KAAKM,GAAI,CAACZ,EAAIc,GAAG,IAAId,EAAIe,GAAGf,EAAIgB,QAAQ,kBAAkBC,MAAM,CAACC,MAAOlB,EAAU,OAAEmB,SAAS,SAAUC,GAAMpB,EAAIqB,OAAOD,GAAKE,WAAW,WAAW,CAAClB,EAAG,SAAS,CAACA,EAAG,YAAY,CAACE,MAAM,CAAC,MAAQ,4BAA4B,CAACF,EAAG,kBAAkB,CAACJ,EAAIc,GAAG,oBAAoB,GAAGV,EAAG,cAAc,CAACmB,YAAY,QAAQ,CAACnB,EAAG,KAAK,CAACJ,EAAIc,GAAG,4BAA4Bd,EAAIe,G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,YAAYC,GAEjB7C,KAAK8C,gBAAgBD,IAGzBC,gBAbJ,SAaA,cACM9C,KAAK+C,KAAKb,WAAWc,MAAMH,GACjC,kBACA,kBACU,EAAV,cAAY,KAAZ,oBAAY,OAAZ,8BAEU,EAAV,aAGA,mBACQ,QAAR,UAEA,oBACQ,EAAR,eAGID,YA7BJ,SA6BA,cACM5C,KAAK+C,KAAKE,KAAKC,OAAOL,GAC5B,kBACA,kBACU,EAAV,cAAY,KAAZ,oBAAY,OAAZ,8BAEU,EAAV,aAGA,mBACQ,QAAR,UAEA,oBACQ,EAAR,iBCpG0X,I,qHCOtXM,EAAY,eACd,EACArD,EACA+B,GACA,EACA,KACA,KACA,MAIa,aAAAsB,EAAiB,QAYhC,IAAkBA,EAAW,CAACC,OAAA,KAAKC,QAAA,KAAMC,aAAA,OAAaC,UAAA,OAAUC,UAAA,KAAQC,OAAA,KAAKC,WAAA,KAASC,cAAA","file":"js/chunk-2d0d0290.aae9c7ee.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-dialog',{attrs:{\"persistent\":\"\",\"max-width\":\"500px\",\"transition\":\"dialog-transition\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nreturn [_c('v-btn',_vm._g({attrs:{\"color\":\"color3\",\"text\":\"\",\"small\":\"\"}},on),[_vm._v(\" \"+_vm._s(_vm.myMode)+\" Event \")])]}}]),model:{value:(_vm.dialog),callback:function ($$v) {_vm.dialog=$$v},expression:\"dialog\"}},[_c('v-card',[_c('v-toolbar',{attrs:{\"color\":\"color1 color1Text--text\"}},[_c('v-toolbar-title',[_vm._v(\"Are you sure?\")])],1),_c('v-card-text',{staticClass:\"pt-3\"},[_c('h3',[_vm._v(\"Are you sure you want to \"+_vm._s(_vm.myMode.toLowerCase())+\" this event?\")]),(_vm.myMode === 'Delete')?_c('div',[_vm._v(\"You will lose all access to it.\")]):_vm._e()]),_c('v-card-actions',[_c('v-row',{attrs:{\"dense\":\"\",\"justify\":\"center\"}},[_c('v-btn',{staticClass:\"mr-3\",attrs:{\"color\":\"success\",\"loading\":_vm.loading},on:{\"click\":function($event){$event.stopPropagation();return _vm.go($event)}}},[_vm._v(\"Yes\")]),_c('v-btn',{attrs:{\"color\":\"error\",\"disabled\":_vm.loading},on:{\"click\":function($event){$event.stopPropagation();_vm.dialog=false}}},[_vm._v(\"No\")])],1)],1)],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\r\n  <v-dialog\r\n    v-model=\"dialog\"\r\n    persistent\r\n    max-width=\"500px\"\r\n    transition=\"dialog-transition\"\r\n  >\r\n    <template v-slot:activator=\"{ on }\">\r\n      <v-btn\r\n        color=\"color3\"\r\n        text\r\n        v-on=\"on\"\r\n        small\r\n      >\r\n        {{myMode}} Event\r\n      </v-btn>\r\n    </template>\r\n    <v-card>\r\n      <v-toolbar color=\"color1 color1Text--text\">\r\n        <v-toolbar-title>Are you sure?</v-toolbar-title>\r\n      </v-toolbar>\r\n      <v-card-text class=\"pt-3\">\r\n        <h3>Are you sure you want to {{myMode.toLowerCase()}} this event?</h3>\r\n        <div v-if=\"myMode === 'Delete'\">You will lose all access to it.</div>\r\n      </v-card-text>\r\n      <v-card-actions>\r\n        <v-row dense justify=\"center\">\r\n          <v-btn color=\"success\" @click.stop=\"go\" :loading=\"loading\" class=\"mr-3\">Yes</v-btn>\r\n          <v-btn color=\"error\" @click.stop=\"dialog=false\" :disabled=\"loading\">No</v-btn>\r\n        </v-row>\r\n      </v-card-actions>\r\n    </v-card>\r\n  </v-dialog>\r\n</template>\r\n\r\n<script>\r\nimport { mapGetters } from 'vuex'\r\n\r\nexport default {\r\n  props: ['mode', 'tournament', 'isEvent'],\r\n  data () {\r\n    return {\r\n      dialog: false,\r\n      loading: false\r\n    }\r\n  },\r\n  computed: {\r\n    ...mapGetters(['user']),\r\n    myMode () {\r\n      return this.mode === 'Delete' ? this.mode : this.tournament.statusId === 101 ? 'Un-cancel' : 'Cancel'\r\n    },\r\n    statusId () {\r\n      return this.mode === 'Delete' ? 999 : this.tournament.statusId === 101 ? 0 : 101\r\n    },\r\n    backToUsername () {\r\n      return this.isEvent ? this.tournament.organizers.length && this.tournament.organizers[0].organization.username : this.tournament.organization.username\r\n    }\r\n  },\r\n  methods: {\r\n    go () {\r\n      this.loading = true\r\n      const dto = {\r\n        id: this.tournament.id,\r\n        statusId: this.statusId\r\n      }\r\n      if (this.isEvent) {\r\n        this.patchSeries(dto)\r\n      } else {\r\n        this.patchTournament(dto)\r\n      }\r\n    },\r\n    patchTournament (dto) {\r\n      this.$VBL.tournament.patch(dto)\r\n        .then((response) => {\r\n          if (this.mode === 'Delete') {\r\n            this.$router.push({ name: 'organization-home', params: { username: this.backToUsername } })\r\n          } else {\r\n            this.dialog = false\r\n          }\r\n        })\r\n        .catch((error) => {\r\n          console.log(error)\r\n        })\r\n        .finally(() => {\r\n          this.loading = false\r\n        })\r\n    },\r\n    patchSeries (dto) {\r\n      this.$VBL.post.series(dto)\r\n        .then((response) => {\r\n          if (this.mode === 'Delete') {\r\n            this.$router.push({ name: 'organization-home', params: { username: this.backToUsername } })\r\n          } else {\r\n            this.dialog = false\r\n          }\r\n        })\r\n        .catch((error) => {\r\n          console.log(error)\r\n        })\r\n        .finally(() => {\r\n          this.loading = false\r\n        })\r\n    }\r\n  }\r\n}\r\n</script>\r\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DeleteCancelDialog.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DeleteCancelDialog.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./DeleteCancelDialog.vue?vue&type=template&id=9954edfe&\"\nimport script from \"./DeleteCancelDialog.vue?vue&type=script&lang=js&\"\nexport * from \"./DeleteCancelDialog.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n  script,\n  render,\n  staticRenderFns,\n  false,\n  null,\n  null,\n  null\n  \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VBtn } from 'vuetify/lib/components/VBtn';\nimport { VCard } from 'vuetify/lib/components/VCard';\nimport { VCardActions } from 'vuetify/lib/components/VCard';\nimport { VCardText } from 'vuetify/lib/components/VCard';\nimport { VDialog } from 'vuetify/lib/components/VDialog';\nimport { VRow } from 'vuetify/lib/components/VGrid';\nimport { VToolbar } from 'vuetify/lib/components/VToolbar';\nimport { VToolbarTitle } from 'vuetify/lib/components/VToolbar';\ninstallComponents(component, {VBtn,VCard,VCardActions,VCardText,VDialog,VRow,VToolbar,VToolbarTitle})\n"],"sourceRoot":""}