{"version":3,"sources":["webpack:///./src/api/rosters.ts","webpack:///./src/config/frequency-times.ts","webpack:///./src/components/dashboard/DashboardPage.vue?ea1f","webpack:///./src/components/dashboard/DashboardPage.vue","webpack:///./src/components/dashboard/DashboardPage.vue?f3db","webpack:///./src/components/dashboard/DashboardPage.vue?4940","webpack:///./src/components/_global/DataFetcher.vue?0fc9","webpack:///./src/components/_global/DataFetcher.vue?77e7","webpack:///./src/components/_global/DataFetcher.vue","webpack:///./src/components/_global/DataFetcher.vue?6448","webpack:///./src/components/_global/DataFetcher.vue?d9b7"],"names":["fetchRosters","teamID","get","data","fetchTeamCharacters","refreshRoster","rosterID","patch","refreshAllRosters","saveAll","rosters","put","createRoster","post","deleteRoster","delete","SYNC_GUILD_MEMBERS_PERIOD","SYNC_ROSTERS_CHARACTERS_ITEMS_FAST_PERIOD","render","_vm","this","_h","$createElement","_c","_self","staticClass","attrs","fetch","length","currentTabIndex","_v","_s","$t","_l","r","isDisabled","_e","key","id","urlRosterButton","$route","name","canSyncCurrentRoster","isLoading","on","handleSyncClick","oneOfTheRosters","$vuetify","breakpoint","lgAndUp","lgOnly","lastSync","getTimeSince","staticRenderFns","teamModule","classes","roles","now","getTime","Date","parse","$teamHub","$on","onTeamSync","$off","redirectToRosterRoute","to","from","next","params","rosterId","$router","push","find","x","currentTeam","handleAPIError","route","routePathSplit","path","split","filter","subPath","State","components","DataFetcher","SummaryTable","UsersRepartitionTable","component","VBtn","VCol","VContainer","VIcon","VRow","_t","loading","silentLoading","handleLoad","hideLoading","useSilentLoading","handleSecondaryLoad","$emit","fetchData","error","secondaryFetchData","type","Function","required","Boolean","default"],"mappings":"sJAKe,QACRA,aADQ,oEACKC,GADL,iGAEC,iBAAQC,IAAR,2BAAgCD,IAFjC,uCAE4CE,MAF5C,oGAIRC,oBAJQ,oEAIYH,GAJZ,iGAKC,iBAAQC,IAAR,iBAAsBD,EAAtB,iBALD,uCAK8CE,MAL9C,oGAORE,cAPQ,oEAOMC,GAPN,iGAQ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7CmB,EAAW,gBAD/B,QACoB,WC/BmY,I,wBCQpZrB,EAAY,eACd,EACAtE,EACAmC,GACA,EACA,KACA,WACA,MAIa,OAAAmC,E","file":"dist/js/chunk-0619a607.6e02f3ae.js","sourcesContent":["import axios from \"@/utils/axios\";\nimport { Guid } from \"@/domain/guid\";\nimport { GetRostersResponse } from \"@/api/rosters/get-rosters.response\";\n\n\nexport default {\n\tasync fetchRosters(teamID: Guid): Promise {\n\t\treturn (await axios().get(`/rosters/?teamID=${teamID}`)).data;\n\t},\n\tasync fetchTeamCharacters(teamID: Guid): Promise {\n\t\treturn (await axios().get(`/teams/${teamID}/characters/`)).data;\n\t},\n\tasync refreshRoster(rosterID: Guid): Promise {\n\t\treturn (await axios().patch(`/rosters/${rosterID}/characters/items/`)).data;\n\t},\n\tasync refreshAllRosters(teamID: Guid): Promise {\n\t\treturn (await axios().patch(`/rosters/characters/items/?teamID=${teamID}`)).data;\n\t},\n\tasync saveAll(rosters: any[]): Promise {\n\t\treturn (await axios().put(\"/rosters/\", rosters)).data;\n\t},\n\tasync createRoster(teamID: Guid): Promise {\n\t\treturn (await axios().post(`/teams/${teamID}/rosters/`)).data;\n\t},\n\tasync deleteRoster(rosterID: Guid): Promise {\n\t\treturn (await axios().delete(`/rosters/${rosterID}`)).data;\n\t}\n};","/**\n * Can be retrieved from the server\n */\n\nexport const SYNC_GUILD_MEMBERS_PERIOD = 1000 * 3600 * 1; // 1 hour\n\nexport const SYNC_ROSTERS_CHARACTERS_ITEMS_PERIOD = 1000 * 3600 * 1; // 1 hour\nexport const SYNC_ROSTERS_CHARACTERS_ITEMS_FAST_PERIOD = 1000 * 60 * 15; // 15 minutes\n\nexport const SYNC_BNET_CHARACTERS_PERIOD = 1000 * 3600;\n\nexport const CHARACTERS_FILTER_LAST_MODIFIED_THRESHOLD = 1000 * 3600 * 24 * 30;","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"fill-height\"},[_c('data-fetcher',{attrs:{\"fetch-data\":_vm.fetch}},[(_vm.rosters != null && _vm.rosters.length > 0)?_c('v-container',{attrs:{\"fluid\":\"\",\"grid-list-xl\":\"\",\"px-0\":\"\"}},[(_vm.currentTabIndex === 0)?_c('v-row',{staticClass:\"mb-0\"},[_c('v-col',{staticClass:\"d-flex flex-wrap gap-x-3 gap-y-3\",attrs:{\"cols\":\"12\",\"lg\":\"9\"}},[_c('v-btn',{attrs:{\"depressed\":\"\",\"disabled\":\"\",\"text\":\"\"}},[_vm._v(_vm._s(_vm.$t(\"dashboard.rosters\")))]),_vm._l((_vm.rosters),function(r){return [(!r.isDisabled)?_c('v-btn',{key:r.id,staticClass:\"flex-grow-1 flex-lg-grow-0\",attrs:{\"to\":_vm.urlRosterButton(_vm.$route, r.id),\"depressed\":\"\",\"exact\":\"\"}},[_vm._v(_vm._s(r.name)+\"\\n\\t\\t\\t\\t\\t\\t\")]):_vm._e()]})],2),_c('v-col',{attrs:{\"cols\":\"12\",\"lg\":\"3\"}},[_c('v-btn',{attrs:{\"dark\":_vm.canSyncCurrentRoster,\"loading\":_vm.isLoading,\"disabled\":!_vm.canSyncCurrentRoster,\"color\":\"teal\",\"block\":\"\"},on:{\"click\":_vm.handleSyncClick}},[(_vm.oneOfTheRosters.isSynchronizing)?_c('span',[_vm._v(_vm._s(_vm.$t(\"dashboard.synchronizing_\")))]):_c('span',[_c('v-icon',{attrs:{\"left\":\"\"}},[_vm._v(\"fas fa-sync\")]),(_vm.$vuetify.breakpoint.lgAndUp || _vm.$vuetify.breakpoint.lgOnly)?_c('span',[_vm._v(_vm._s(_vm.$t(\"dashboard.synchronized_\")))]):_vm._e(),_c('strong',[_vm._v(_vm._s(_vm.oneOfTheRosters.lastSync ? _vm.getTimeSince(_vm.oneOfTheRosters.lastSync) + \" ago\" : _vm.$t(\"global.never\")))])],1)])],1)],1):_vm._e()],1):_c('app-centered-message',{attrs:{\"icon\":\"dashboard\",\"message\":\"Looks like your dashboard is empty\"}}),(_vm.rosters != null)?_c('router-view',{attrs:{\"rosters\":_vm.rosters}}):_vm._e()],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Component, Mixins } from \"vue-property-decorator\";\nimport { NavigationGuardNext, Route } from \"vue-router\";\nimport { namespace } from \"vuex-class\";\n\n/**\n * Utils\n */\nimport classes from \"@/config/wow/classes\";\nimport * as externalLinks from \"@/config/external-links\";\nimport * as imageLinks from \"@/config/image-links\";\nimport armorTypes from \"@/config/wow/armor-types\";\nimport roles from \"@/config/wow/roles\";\n\nimport { getTimeSince } from \"@/utils/date-helpers\";\nimport { teamUrl } from \"@/utils/url-helpers\";\nimport { SYNC_ROSTERS_CHARACTERS_ITEMS_FAST_PERIOD } from \"@/config/frequency-times\";\n\n\n/**\n * Components\n */\nimport SummaryTable from \"./components/SummaryTable.vue\";\nimport UsersRepartitionTable from \"./components/UsersRepartitionTable.vue\";\n\n/**\n * API\n */\nimport rostersAPI from \"@/api/rosters\";\nimport { GetOneTeamResponse } from \"@/api/teams/get-one-team.response\";\nimport { GetRostersResponse } from \"@/api/rosters/get-rosters.response\";\n\n/**\n * Mixins\n */\nimport mixinNow from \"@/mixins/now-mixin\";\nimport DataFetcher from \"@/components/_global/DataFetcher.vue\";\n\n\n/**\n * Types\n */\n\n\n/**\n * VueX Modules\n */\nconst teamModule = namespace(\"team\");\n\n/**\n * Team's dashboard page.\n */\n@Component({\n\tcomponents: {\n\t\tDataFetcher,\n\t\tSummaryTable,\n\t\tUsersRepartitionTable\n\t}\n})\nexport default class DashboardPage extends Mixins(mixinNow) {\n\t/// Injections\n\tclasses = classes;\n\texternalLinks = externalLinks;\n\timageLinks = imageLinks;\n\troles = roles;\n\tarmorTypes = armorTypes;\n\n\tgetTimeSince = getTimeSince;\n\tteamUrl = teamUrl;\n\n\n\t/// Attributes\n\tisLoading = false;\n\tcurrentTabIndex = 0;\n\ttabs = [\n\t\t{\n\t\t\tname: \"Summary\",\n\t\t},\n\t\t{\n\t\t\tname: \"Users\"\n\t\t}\n\t];\n\trosters: GetRostersResponse.Roster[] | null = null;\n\n\n\t/// VueX Modules\n\t@teamModule.State(\"team\")\n\tcurrentTeam!: GetOneTeamResponse;\n\n\n\t/**\n\t * One of the rosters.\n\t */\n\tget oneOfTheRosters(): GetRostersResponse.Roster | null {\n\t\treturn this.rosters && this.rosters.length > 0 ? this.rosters[0] : null;\n\t}\n\n\t/**\n\t * Can the current roster be synchronized (updated / refreshed) ?\n\t */\n\tget canSyncCurrentRoster(): boolean {\n\t\treturn !this.isLoading && (this.oneOfTheRosters?.lastSync == null || (this.now.getTime() - Date.parse(this.oneOfTheRosters.lastSync)) > SYNC_ROSTERS_CHARACTERS_ITEMS_FAST_PERIOD);\n\t}\n\n\t/// Methods\n\tasync created() {\n\t\t//this.isLoading = true;\n\t\tthis.$teamHub.$on(\"team-sync\", this.onTeamSync);\n\t\t//this.isLoading = false;\n\t}\n\n\tbeforeDestroy() {\n\t\tthis.$teamHub.$off(\"team-sync\", this.onTeamSync);\n\t}\n\n\tasync fetch() {\n\t\tawait this.fetchRosters();\n\t\tawait this.redirectToRosterRoute(this.$route);\n\t}\n\n\tasync beforeRouteUpdate(to: Route, from: Route, next: NavigationGuardNext) {\n\t\tif (await this.redirectToRosterRoute(to)) {\n\t\t\treturn;\n\t\t}\n\t\tnext();\n\t}\n\n\tasync redirectToRosterRoute(to: Route) {\n\t\tif (!to.params.rosterId && this.rosters && this.rosters.length > 0) {\n\t\t\ttry {\n\t\t\t\tawait this.$router.push(this.urlRosterButton(to, this.rosters[0].id));\n\t\t\t} catch (error) {\n\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\tif (to.params.rosterId && this.rosters && this.rosters.length > 0 && this.rosters.find(x => x.id == to.params.rosterId) == null) {\n\t\t\tawait this.$router.push(\"/teams\");\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tasync fetchRosters() {\n\t\tthis.rosters = await rostersAPI.fetchRosters(this.currentTeam.id);\n\t}\n\n\tasync handleSyncClick() {\n\t\tthis.isLoading = true;\n\t\ttry {\n\t\t\tawait rostersAPI.refreshAllRosters(this.currentTeam.id);\n\t\t\tawait this.fetchRosters();\n\t\t} catch (error) {\n\t\t\tthis.handleAPIError(error);\n\t\t}\n\t\tthis.isLoading = false;\n\t}\n\n\tasync onTeamSync() {\n\t\tawait this.fetchRosters();\n\t}\n\n\turlRosterButton(route: Route, rosterID: string) {\n\t\tconst routePathSplit = route.path.split(\"/\").filter(x => x != \"\");\n\t\tlet subPath = \"\";\n\t\tif (route.params.rosterId) {\n\t\t\t// Case: already on a roster specific tracking page\n\t\t\tsubPath = routePathSplit[routePathSplit.length - 2];\n\t\t}\n\t\telse {\n\t\t\tsubPath = routePathSplit[routePathSplit.length - 1];\n\t\t\tif (subPath == \"dashboard\") {\n\t\t\t\tsubPath = \"overview\";\n\t\t\t}\n\t\t}\n\n\t\treturn teamUrl(this.currentTeam, `/dashboard/${subPath}/${rosterID}`);\n\t}\n}\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DashboardPage.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DashboardPage.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./DashboardPage.vue?vue&type=template&id=4781d1fa&\"\nimport script from \"./DashboardPage.vue?vue&type=script&lang=ts&\"\nexport * from \"./DashboardPage.vue?vue&type=script&lang=ts&\"\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 { VCol } from 'vuetify/lib/components/VGrid';\nimport { VContainer } from 'vuetify/lib/components/VGrid';\nimport { VIcon } from 'vuetify/lib/components/VIcon';\nimport { VRow } from 'vuetify/lib/components/VGrid';\ninstallComponents(component, {VBtn,VCol,VContainer,VIcon,VRow})\n","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DataFetcher.vue?vue&type=style&index=0&id=452e8cc9&scoped=true&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.error)?_c('div',[_vm._t(\"message\",function(){return [_c('p',[_vm._v(\"Something went wrong. Please try again.\")])]}),_c('button',{attrs:{\"disabled\":_vm.loading || _vm.silentLoading},on:{\"click\":_vm.handleLoad}},[_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.loading ? \"Retrying...\" : \"Retry\")+\"\\n\\t\")])],2):(_vm.loading && !_vm.silentLoading && !_vm.hideLoading)?_c('div',{staticClass:\"fill-height\"},[_c('app-loading')],1):_c('div',{staticClass:\"fill-height\"},[_vm._t(\"default\")],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Vue, Component, Prop, Watch } from \"vue-property-decorator\";\n\n@Component\nexport default class DataFetcher extends Vue {\n\t@Prop() id?: string; // ID passed as a prop (from route)\n\n\t@Prop({\n\t\ttype: Function,\n\t\trequired: true\n\t})\n\treadonly fetchData!: () => Promise;\n\n\t@Prop({\n\t\ttype: Function,\n\t\trequired: false\n\t})\n\treadonly secondaryFetchData?: () => Promise;\n\n\t@Prop({\n\t\ttype: Boolean,\n\t\trequired: false,\n\t\tdefault: false\n\t})\n\treadonly useSilentLoading!: boolean;\n\n\t@Prop({\n\t\ttype: Boolean,\n\t\trequired: false,\n\t\tdefault: false\n\t})\n\treadonly hideLoading!: boolean;\n\n\tloading = false;\n\tsilentLoading = false;\n\terror = false;\n\n\tasync created() {\n\t\tawait this.handleLoad();\n\t}\n\n\n\t// Watch for route param changes (id change)\n\t@Watch(\"id\")\n\tasync onIdChange() {\n\t\tif (this.useSilentLoading) {\n\t\t\tthis.silentLoading = true;\n\t\t}\n\t\tawait this.handleSecondaryLoad();\n\t}\n\n\tasync handleLoad() {\n\t\tthis.loading = true;\n\t\tthis.$emit(\"update:isLoading\", this.loading);\n\n\t\ttry {\n\t\t\tawait this.fetchData();\n\t\t\tthis.error = false;\n\t\t} catch (error) {\n\t\t\tthis.error = true;\n\t\t}\n\t\tthis.loading = false;\n\t\tthis.$emit(\"update:isLoading\", this.loading);\n\n\t\tthis.silentLoading = false;\n\t}\n\n\tasync handleSecondaryLoad() {\n\t\tthis.loading = true;\n\t\tthis.$emit(\"update:isLoading\", this.loading);\n\n\t\ttry {\n\t\t\tif (this.secondaryFetchData) {\n\t\t\t\tawait this.secondaryFetchData();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tawait this.fetchData();\n\t\t\t}\n\t\t\tthis.error = false;\n\t\t} catch (error) {\n\t\t\tthis.error = true;\n\t\t}\n\t\tthis.loading = false;\n\t\tthis.$emit(\"update:isLoading\", this.loading);\n\n\t\tthis.silentLoading = false;\n\t}\n}\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DataFetcher.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DataFetcher.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./DataFetcher.vue?vue&type=template&id=452e8cc9&scoped=true&\"\nimport script from \"./DataFetcher.vue?vue&type=script&lang=ts&\"\nexport * from \"./DataFetcher.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./DataFetcher.vue?vue&type=style&index=0&id=452e8cc9&scoped=true&lang=css&\"\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 \"452e8cc9\",\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}