Browse Source

RegionList - ordered

master
Kobus 5 years ago
parent
commit
78307f43ad

+ 4
- 1
src/components/timeshare/buy/buyPage.vue View File

38
           <div class="row mb-4">
38
           <div class="row mb-4">
39
             <div class="col-md-8">
39
             <div class="col-md-8">
40
               <div class="accordion" id="accordionExample">
40
               <div class="accordion" id="accordionExample">
41
-                <div class="card" v-for="(region, r) in detailedRegion" :key="r">
41
+                <div class="card" v-for="(region, r) in regions" :key="r">
42
                   <a
42
                   <a
43
                     class="btn btn-b-n"
43
                     class="btn btn-b-n"
44
                     type="button"
44
                     type="button"
86
   },
86
   },
87
   computed: {
87
   computed: {
88
     ...mapState('timeshareBuy', ['detailedRegion']),
88
     ...mapState('timeshareBuy', ['detailedRegion']),
89
+    regions(){
90
+      return _.sortBy(this.detailedRegion, r => r.regionName);
91
+    }
89
   },
92
   },
90
   methods: {
93
   methods: {
91
     ...mapActions('timeshareBuy', ['getRegions']),
94
     ...mapActions('timeshareBuy', ['getRegions']),

+ 1
- 0
src/store/modules/timeshare/buyPage.js View File

1
 /* eslint-disable no-restricted-syntax */
1
 /* eslint-disable no-restricted-syntax */
2
 /* eslint-disable guard-for-in */
2
 /* eslint-disable guard-for-in */
3
 import axios from 'axios';
3
 import axios from 'axios';
4
+import _ from 'lodash';
4
 
5
 
5
 export default {
6
 export default {
6
   namespaced: true,
7
   namespaced: true,

Loading…
Cancel
Save