{"version":3,"sources":["webpack:///./src/components/Tournament/RepFieldDialog.vue?a744","webpack:///src/components/Tournament/RepFieldDialog.vue","webpack:///./src/components/Tournament/RepFieldDialog.vue?fa58","webpack:///./src/components/Tournament/RepFieldDialog.vue"],"names":["render","_vm","this","_h","$createElement","_c","_self","attrs","dirty","scopedSlots","_u","key","fn","ref","on","_g","staticClass","staticStyle","_v","model","value","callback","$$v","dialog","expression","$event","stopPropagation","cancel","loading","items","division","$set","save","_s","name","staticRenderFns","props","data","repFieldOG","computed","repField","tournamentDto","id","tournament","divisions","map","d","divisionDto","methods","$VBL","patch","dto","watch","n","component","VBtn","VCard","VCol","VContainer","VDialog","VIcon","VRow","VSelect","VSpacer","VToolbar","VToolbarTitle"],"mappings":"wHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,WAAW,CAACE,MAAM,CAAC,WAAaN,EAAIO,MAAM,YAAY,QAAQ,WAAa,qBAAqBC,YAAYR,EAAIS,GAAG,CAAC,CAACC,IAAI,YAAYC,GAAG,SAASC,GACpP,IAAIC,EAAKD,EAAIC,GACb,MAAO,CAACT,EAAG,QAAQJ,EAAIc,GAAG,CAACC,YAAY,YAAYC,YAAY,CAAC,YAAY,SAASV,MAAM,CAAC,MAAQ,GAAG,MAAQ,SAAS,KAAO,KAAKO,GAAI,CAACb,EAAIiB,GAAG,oBAAoBC,MAAM,CAACC,MAAOnB,EAAU,OAAEoB,SAAS,SAAUC,GAAMrB,EAAIsB,OAAOD,GAAKE,WAAW,WAAW,CAACnB,EAAG,SAAS,CAACA,EAAG,YAAY,CAACE,MAAM,CAAC,MAAQ,4BAA4B,CAACF,EAAG,kBAAkB,CAACJ,EAAIiB,GAAG,eAAeb,EAAG,YAAYA,EAAG,QAAQ,CAACE,MAAM,CAAC,MAAQ,aAAa,KAAO,GAAG,KAAO,IAAIO,GAAG,CAAC,MAAQ,SA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AAR,aAEA,mBAAQ,OAAR,2BACA,oBACQ,EAAR,eAGIxB,OAdJ,WAeMzB,KAAK4B,SAASU,SAAWtC,KAAKoC,WAC9BpC,KAAKqB,QAAS,IAGlB6B,MAAO,CACL7B,OAAQ,SAAZ,KACU8B,IACFnD,KAAKoC,WAAapC,KAAK4B,SAASU,aCjJ+T,I,qKCOnWc,EAAY,eACd,EACAtD,EACAmC,GACA,EACA,KACA,KACA,MAIa,aAAAmB,EAAiB,QAehC,IAAkBA,EAAW,CAACC,OAAA,KAAKC,QAAA,KAAMC,OAAA,KAAKC,aAAA,KAAWC,UAAA,KAAQC,QAAA,KAAMC,OAAA,KAAKC,UAAA,KAAQC,UAAA,KAAQC,WAAA,KAASC,cAAA","file":"js/chunk-770ddcba.983e1f77.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-dialog',{attrs:{\"persistent\":_vm.dirty,\"max-width\":\"500px\",\"transition\":\"dialog-transition\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nreturn [_c('v-btn',_vm._g({staticClass:\"ma-0 pa-0\",staticStyle:{\"font-size\":\"small\"},attrs:{\"small\":\"\",\"color\":\"color3\",\"text\":\"\"}},on),[_vm._v(\"Rep Field\")])]}}]),model:{value:(_vm.dialog),callback:function ($$v) {_vm.dialog=$$v},expression:\"dialog\"}},[_c('v-card',[_c('v-toolbar',{attrs:{\"color\":\"color2 color2Text--text\"}},[_c('v-toolbar-title',[_vm._v(\"Rep Field\")]),_c('v-spacer'),_c('v-btn',{attrs:{\"color\":\"color2Text\",\"icon\":\"\",\"text\":\"\"},on:{\"click\":function($event){$event.stopPropagation();return _vm.cancel($event)}}},[_c('v-icon',[_vm._v(\"fas fa-times\")])],1)],1),_c('loading-bar',{attrs:{\"value\":_vm.loading}}),_c('v-container',[_c('v-row',{attrs:{\"dense\":\"\"}},[_c('v-col',{attrs:{\"cols\":\"12\"}},[_vm._v(\" The \\\"Rep Field\\\" is the field that shows next to a team on the team list and pool sheets. \")]),_c('v-col',{attrs:{\"cols\":\"12\"}},[_c('v-select',{attrs:{\"color\":\"color3\",\"item-color\":\"color3\",\"items\":_vm.items,\"label\":\"Rep Field\"},model:{value:(_vm.division.repField),callback:function ($$v) {_vm.$set(_vm.division, \"repField\", $$v)},expression:\"division.repField\"}})],1)],1),_c('v-row',{attrs:{\"dense\":\"\",\"justify\":\"center\"}},[_c('v-col',{attrs:{\"cols\":\"10\"}},[_c('v-btn',{attrs:{\"color\":\"color3 color3Text--text\",\"block\":\"\",\"disabled\":!_vm.dirty || _vm.loading},on:{\"click\":function($event){$event.stopPropagation();return _vm.save(true)}}},[_vm._v(\"Save for \"+_vm._s(_vm.division.name))])],1),_c('v-col',{attrs:{\"cols\":\"10\"}},[_c('v-btn',{attrs:{\"color\":\"color3 color3Text--text\",\"block\":\"\",\"disabled\":!_vm.dirty || _vm.loading},on:{\"click\":function($event){$event.stopPropagation();return _vm.save(false)}}},[_vm._v(\"Save for all divisions\")])],1),_c('v-col',{attrs:{\"cols\":\"10\"}},[_c('v-btn',{attrs:{\"color\":\"color3 color3Text--text\",\"block\":\"\",\"disabled\":!_vm.dirty || _vm.loading},on:{\"click\":function($event){$event.stopPropagation();_vm.dialog = false}}},[_vm._v(\"Just for me... Don't save\")])],1),_c('v-col',{attrs:{\"cols\":\"10\"}},[_c('v-btn',{attrs:{\"color\":\"red white--text\",\"block\":\"\",\"disabled\":_vm.loading},on:{\"click\":function($event){$event.stopPropagation();return _vm.cancel($event)}}},[_vm._v(\"Cancel\")])],1)],1)],1)],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\r\n  <v-dialog\r\n    v-model=\"dialog\"\r\n    :persistent=\"dirty\"\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        v-on=\"on\"\r\n        small\r\n        color=\"color3\"\r\n        text\r\n        class=\"ma-0 pa-0\"\r\n        style=\"font-size: small\"\r\n      >Rep Field</v-btn>\r\n    </template>\r\n    <v-card>\r\n      <v-toolbar color=\"color2 color2Text--text\">\r\n        <v-toolbar-title>Rep Field</v-toolbar-title>\r\n        <v-spacer></v-spacer>\r\n        <v-btn color=\"color2Text\" icon text @click.stop=\"cancel\">\r\n          <v-icon>fas fa-times</v-icon>\r\n        </v-btn>\r\n      </v-toolbar>\r\n      <loading-bar :value=\"loading\"></loading-bar>\r\n      <v-container>\r\n        <v-row dense>\r\n          <v-col cols=\"12\">\r\n            The \"Rep Field\" is the field that shows next to a team on the team list and pool sheets.\r\n          </v-col>\r\n          <v-col cols=\"12\">\r\n            <v-select\r\n              color=\"color3\"\r\n              item-color=\"color3\"\r\n              :items=\"items\"\r\n              v-model=\"division.repField\"\r\n              label=\"Rep Field\"\r\n            ></v-select>\r\n          </v-col>\r\n        </v-row>\r\n        <v-row dense justify=\"center\">\r\n          <v-col cols=\"10\">\r\n            <v-btn color=\"color3 color3Text--text\"\r\n              block\r\n              @click.stop=\"save(true)\"\r\n              :disabled=\"!dirty || loading\"\r\n            >Save for {{division.name}}</v-btn>\r\n          </v-col>\r\n          <v-col cols=\"10\">\r\n            <v-btn color=\"color3 color3Text--text\"\r\n              block\r\n              @click.stop=\"save(false)\"\r\n              :disabled=\"!dirty || loading\"\r\n            >Save for all divisions</v-btn>\r\n          </v-col>\r\n          <v-col cols=\"10\">\r\n            <v-btn color=\"color3 color3Text--text\"\r\n              block\r\n              @click.stop=\"dialog = false\"\r\n              :disabled=\"!dirty || loading\"\r\n            >Just for me... Don't save</v-btn>\r\n          </v-col>\r\n          <v-col cols=\"10\">\r\n            <v-btn color=\"red white--text\"\r\n              block\r\n              @click.stop=\"cancel\"\r\n              :disabled=\"loading\"\r\n            >Cancel</v-btn>\r\n          </v-col>\r\n        </v-row>\r\n      </v-container>\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: ['division'],\r\n  data () {\r\n    return {\r\n      dialog: false,\r\n      loading: false,\r\n      repFieldOG: null\r\n    }\r\n  },\r\n  computed: {\r\n    ...mapGetters(['tournament']),\r\n    dirty () {\r\n      return this.repFieldOG !== this.division.repField\r\n    },\r\n    items () {\r\n      return [\r\n        { text: 'Club', value: 'club' },\r\n        { text: 'City, State', value: 'citystate' },\r\n        { text: 'School', value: 'hs' }\r\n      ]\r\n    },\r\n    tournamentDto () {\r\n      return {\r\n        id: this.tournament.id,\r\n        divisions: this.tournament.divisions.map(d => {\r\n          return {\r\n            id: d.id,\r\n            repField: this.division.repField\r\n          }\r\n        })\r\n      }\r\n    },\r\n    divisionDto () {\r\n      return {\r\n        id: this.tournament.id,\r\n        divisions: [\r\n          {\r\n            id: this.division.id,\r\n            repField: this.division.repField\r\n          }\r\n        ]\r\n      }\r\n    }\r\n  },\r\n  methods: {\r\n    save (toDivision) {\r\n      const dto = toDivision ? this.divisionDto : this.tournamentDto\r\n      this.loading = true\r\n      this.$VBL.patch.tournament(dto)\r\n        .then(response => {\r\n          this.division.repFieldOG = this.division.repField\r\n          this.dialog = false\r\n        })\r\n        .catch(err => console.log(err.response))\r\n        .finally(() => {\r\n          this.loading = false\r\n        })\r\n    },\r\n    cancel () {\r\n      this.division.repField = this.repFieldOG\r\n      this.dialog = false\r\n    }\r\n  },\r\n  watch: {\r\n    dialog: function (n, o) {\r\n      if (n) {\r\n        this.repFieldOG = this.division.repField\r\n      }\r\n    }\r\n  }\r\n}\r\n</script>\r\n\r\n<style>\r\n\r\n</style>\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!./RepFieldDialog.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!./RepFieldDialog.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./RepFieldDialog.vue?vue&type=template&id=c1115e6e&\"\nimport script from \"./RepFieldDialog.vue?vue&type=script&lang=js&\"\nexport * from \"./RepFieldDialog.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 { VCol } from 'vuetify/lib/components/VGrid';\nimport { VContainer } from 'vuetify/lib/components/VGrid';\nimport { VDialog } from 'vuetify/lib/components/VDialog';\nimport { VIcon } from 'vuetify/lib/components/VIcon';\nimport { VRow } from 'vuetify/lib/components/VGrid';\nimport { VSelect } from 'vuetify/lib/components/VSelect';\nimport { VSpacer } from 'vuetify/lib/components/VGrid';\nimport { VToolbar } from 'vuetify/lib/components/VToolbar';\nimport { VToolbarTitle } from 'vuetify/lib/components/VToolbar';\ninstallComponents(component, {VBtn,VCard,VCol,VContainer,VDialog,VIcon,VRow,VSelect,VSpacer,VToolbar,VToolbarTitle})\n"],"sourceRoot":""}