Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion resources/assets/js/pages/api_stats/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ import StatsCard from '~/pages/api_stats/components/StatsCard'
import APIApplicationsTable from '~/pages/api_stats/components/APIApplicationsTable'
import APIEndpointsTable from '~/pages/api_stats/components/APIEndpointsTable'
import { formatDate } from '~/utils/time'
import SelectSociety from '~/pages/content/selectSociety'
import SelectSociety from '~/pages/content/simpleSocietyPicker'
import SelectRegion from '~/pages/content/regionPicker'
import { languages } from 'countries-list'
import SelectHazard from '~/pages/content/simpleHazardTypePicker'
Expand Down
3 changes: 2 additions & 1 deletion resources/assets/js/pages/content/selectSociety.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ export default {
handler (val) {
if (val) {
this.setLocalStorage()
}
}
this.$emit('optionUpdated', val)
},
deep: true
}
Expand Down
12 changes: 9 additions & 3 deletions resources/assets/js/pages/view_data/whatnow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<b-col class="d-flex flex-column justify-content-center" sm="12" md="10">
<h1 class="font-weight-bold whatnow-choose-header">{{ $t('view_data.which')}}</h1>
<div>
<selectSociety :selected.sync="selectedSoc" :staynull="true" :dontfilter="true"></selectSociety>
<selectSociety :selected.sync="selectedSoc" :staynull="true" :dontfilter="true" :countryCode="countryCode"></selectSociety>
</div>
</b-col>
</b-row>
Expand All @@ -17,7 +17,7 @@

<b-row v-if="hazardsList" class="ml-4 mr-4 pl-4 pr-4 pb-3 pt-3 selects-container d-flex align-items-center justify-content-start" v-show="selectedSoc">
<b-col cols="auto" class="d-flex align-items-center">
<selectSociety :selected.sync="selectedSoc" :staynull="true" :dontfilter="true"></selectSociety>
<selectSociety :selected.sync="selectedSoc" :staynull="true" :dontfilter="true" @optionUpdated="watchOptionUpdated"></selectSociety>
<p class="ml-2 mb-0">{{ selectedSoc ? selectedSoc.label : 'Select a society' }}</p>
</b-col>
<b-col cols="auto" v-if="hazardsList" class="d-flex align-items-center">
Expand Down Expand Up @@ -145,7 +145,13 @@ export default {
return flattened
})
}
}
},
watchOptionUpdated (val) {
console.log('watchOptionUpdated', val)
if (!val) {
this.$router.push({ path: '/data/whatnow' });
}
},
},
metaInfo () {
return { title: this.$t('content.whatnow.whatnow') }
Expand Down
Loading