소스 검색

Check in of navbar change and listview control

master
Kobus 5 년 전
부모
커밋
92092f5276

+ 0
- 5
babel.config.js 파일 보기

@@ -1,5 +0,0 @@
1
-module.exports = {
2
-  presets: [
3
-    '@vue/app',
4
-  ],
5
-};

+ 11909
- 0
public/css/bootstrap.css
파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
파일 보기


+ 11909
- 0
public/css/bootstrap.min.css
파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
파일 보기


+ 1
- 1
public/index.html 파일 보기

@@ -10,11 +10,11 @@
10 10
   <title>Uni-Vate Properties</title>
11 11
 
12 12
   <link href="https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700" rel="stylesheet">
13
-  <link href="lib/bootstrap/css/bootstrap.min.css" rel="stylesheet">
14 13
   <link href="lib/font-awesome/css/font-awesome.min.css" rel="stylesheet">
15 14
   <link href="lib/animate/animate.min.css" rel="stylesheet">
16 15
   <link href="lib/ionicons/css/ionicons.min.css" rel="stylesheet">
17 16
   <link href="lib/owlcarousel/assets/owl.carousel.min.css" rel="stylesheet">
17
+  <link href="css/bootstrap.min.css" rel="stylesheet">
18 18
   <link href="css/style.css" rel="stylesheet">
19 19
   <link rel="stylesheet" href="css/dragndrop.table.columns.css" />
20 20
 </head>

+ 11
- 9
src/App.vue 파일 보기

@@ -6,6 +6,7 @@
6 6
     <div class="click-closed"></div>
7 7
     <SearchTab />
8 8
     <NavBar @routerGoTo="routerGoTo" />
9
+    <div class="pushDown"></div>
9 10
     <router-view />
10 11
     <FooterSection />
11 12
   </div>
@@ -13,16 +14,16 @@
13 14
 
14 15
 <script>
15 16
 // import HomePage from './components/home/homePage.vue';
16
-import SearchTab from './components/shared/searchTab.vue';
17
-import NavBar from './components/shared/navBar.vue';
18
-import FooterSection from './components/shared/footerSection.vue';
17
+import SearchTab from "./components/shared/searchTab.vue";
18
+import NavBar from "./components/shared/navBar.vue";
19
+import FooterSection from "./components/shared/footerSection.vue";
19 20
 
20 21
 export default {
21
-  name: 'app',
22
+  name: "app",
22 23
   components: {
23 24
     SearchTab,
24 25
     NavBar,
25
-    FooterSection,
26
+    FooterSection
26 27
   },
27 28
   // created() {
28 29
   //   this.$http.interceptors.response.use(undefined, (err) => {
@@ -37,8 +38,8 @@ export default {
37 38
   methods: {
38 39
     routerGoTo(goTo) {
39 40
       this.$router.push(goTo);
40
-    },
41
-  },
41
+    }
42
+  }
42 43
 };
43 44
 </script>
44 45
 
@@ -55,9 +56,10 @@ a:hover {
55 56
   -moz-osx-font-smoothing: grayscale;
56 57
   text-align: center;
57 58
   color: #2c3e50;
58
-  margin-top: 60px;
59 59
 }
60
-
60
+.pushDown {
61
+  height: 70px;
62
+}
61 63
 .cursor-pointer {
62 64
   cursor: pointer;
63 65
 }

+ 1
- 1
src/components/shared/basePagination.vue 파일 보기

@@ -11,7 +11,7 @@
11 11
         <li class="page-item" v-for="item in paginationItems" :key="item">
12 12
           <BasePaginationItem
13 13
             :pageNumber="item"
14
-            :disable="item === currentPage"
14
+            :isCurrentPage="item === currentPage"
15 15
             @loadPage="onLoadPage"
16 16
           />
17 17
         </li>

+ 4
- 5
src/components/shared/basePaginationItem.vue 파일 보기

@@ -1,6 +1,6 @@
1 1
 <template>
2
-  <div>
3
-    <div v-if="disable">
2
+  <div :class="isCurrentPage ? 'page-item active' : 'page-item'">
3
+    <div v-if="isCurrentPage">
4 4
       <span class="page-link disabled">{{pageNumber}}</span>
5 5
     </div>
6 6
     <div v-else @click="onClick">
@@ -15,7 +15,7 @@ export default {
15 15
       type: Number,
16 16
       required: true,
17 17
     },
18
-    disable: undefined,
18
+    isCurrentPage: undefined,
19 19
   },
20 20
   methods: {
21 21
     onClick() {
@@ -25,8 +25,7 @@ export default {
25 25
 };
26 26
 </script>
27 27
 <style scoped>
28
-.disabled {
28
+.isCurrentPage {
29 29
   cursor: arrow;
30
-  background-color: lightgray;
31 30
 }
32 31
 </style>

+ 25
- 0
src/components/shared/checkItem.vue 파일 보기

@@ -0,0 +1,25 @@
1
+<template>
2
+  <div class="row p-2" @click="checkItem">
3
+    <div class="custom-control custom-checkbox">
4
+      <input type="checkbox" class="custom-control-input" :checked="checked" />
5
+      <label class="custom-control-label">{{title}}</label>
6
+    </div>
7
+  </div>
8
+</template>
9
+
10
+<script>
11
+export default {
12
+  props: ['title'],
13
+  data() {
14
+    return {
15
+      checked: true,
16
+    };
17
+  },
18
+  methods: {
19
+    checkItem() {
20
+      this.checked = !this.checked;
21
+      this.$emit('checkItem', this.title, this.checked);
22
+    },
23
+  },
24
+};
25
+</script>

+ 8
- 8
src/components/shared/lightBoxGallery.vue 파일 보기

@@ -45,29 +45,29 @@ export default {
45 45
     return {
46 46
       bg: false,
47 47
       currentImage: 0,
48
-      count: true,
48
+      count: true
49 49
     };
50 50
   },
51 51
   props: {
52 52
     thumbnails: {
53 53
       type: Array,
54
-      default: () => [],
54
+      default: () => []
55 55
     },
56 56
     largeImages: {
57 57
       type: Array,
58
-      default: () => [],
58
+      default: () => []
59 59
     },
60 60
     captions: {
61 61
       type: Array,
62
-      default: () => [],
62
+      default: () => []
63 63
     },
64 64
     thumbnailsPath: {
65 65
       type: String,
66
-      default: '',
66
+      default: ""
67 67
     },
68 68
     largePath: {
69 69
       type: String,
70
-      default: '',
70
+      default: ""
71 71
     },
72 72
     caption: true
73 73
   },
@@ -91,8 +91,8 @@ export default {
91 91
       } else {
92 92
         this.currentImage = this.largeImages.length - 1;
93 93
       }
94
-    },
95
-  },
94
+    }
95
+  }
96 96
 };
97 97
 </script>
98 98
 

+ 81
- 70
src/components/shared/listView.vue 파일 보기

@@ -3,53 +3,47 @@
3 3
 <template>
4 4
   <div>
5 5
     <div class="container">
6
-      <div class="row">
7
-        <div class="col-md-12">
8
-          <input
9
-            v-model="searchItem"
10
-            class="form-control"
11
-            placeholder="Filter users by name or age"
12
-          />
13
-          <table id="table" class="table table-bordered table-hover">
14
-            <thead>
15
-              <tr class="dnd-moved">
16
-                <th v-for="(column, c) in Columns" :key="c">
17
-                  <div @click="sortBy(column)">{{ column }}</div>
18
-                </th>
19
-              </tr>
20
-            </thead>
21
-            <tbody>
22
-              <tr v-for="(item, i) in DisplayItems" :key="i" class="text-left dnd-moved">
23
-                <td v-for="(column, c) in Columns" :key="c">{{ item[column] }}</td>
24
-              </tr>
25
-            </tbody>
26
-          </table>
27
-          <div class="d-flex justify-content-between">
28
-            <div class="p-1">{{ currentPage + ' / ' + PageCount }}</div>
29
-            <div class="p-1">
30
-              <BasePagination
31
-                :currentPage="currentPage"
32
-                :pageCount="PageCount"
33
-                @nextPage="pageChangeHandle('next')"
34
-                @previousPage="pageChangeHandle('previous')"
35
-                @loadPage="pageChangeHandle"
36
-              />
37
-            </div>
38
-            <div class="p-2">
39
-              <div class="d-flex flex-row">
40
-                <div>
41
-                  <select
42
-                    class="form-control"
43
-                    id="agent"
44
-                    name="agent"
45
-                    v-model="visibleItemsPerPageCount"
46
-                    @change="onChangeItemsPerPage()"
47
-                  >
48
-                    <option v-for="(item, i) in itemsPerPageList" :key="i">{{ item }}</option>
49
-                  </select>
50
-                </div>
51
-              </div>
52
-            </div>
6
+      <div class="d-flex justify-content-between">
7
+        <div class="p-2">
8
+          <input v-model="searchItem" class="form-control" placeholder="Search ..." />
9
+        </div>
10
+      </div>
11
+    </div>
12
+    <table id="table" class="table table-bordered table-hover">
13
+      <thead>
14
+        <tr class="dnd-moved">
15
+          <th v-for="(column, c) in Columns" :key="c">
16
+            <div @click="sortBy(column)">{{ column }}</div>
17
+          </th>
18
+        </tr>
19
+      </thead>
20
+      <tbody>
21
+        <tr v-for="(item, i) in DisplayItems" :key="i" class="text-left dnd-moved">
22
+          <td v-for="(column, c) in Columns" :key="c">{{ item[column] }}</td>
23
+        </tr>
24
+      </tbody>
25
+    </table>
26
+    <div class="d-flex justify-content-between">
27
+      <div class="p-1">{{ currentPage + ' / ' + PageCount }}</div>
28
+      <div class="p-1">
29
+        <BasePagination
30
+          :currentPage="currentPage"
31
+          :pageCount="PageCount"
32
+          @nextPage="pageChangeHandle('next')"
33
+          @previousPage="pageChangeHandle('previous')"
34
+          @loadPage="pageChangeHandle"
35
+        />
36
+      </div>
37
+      <div class="p-2">
38
+        <div class="d-flex flex-row">
39
+          <div>
40
+            <select
41
+              class="form-control"
42
+              v-model="visibleItemsPerPageCount"
43
+              @change="onChangeItemsPerPage()"
44
+            >
45
+              <option v-for="(item, i) in itemsPerPageList" :key="i">{{ item }}</option>
46
+            </select>
53 47
           </div>
54 48
         </div>
55 49
       </div>
@@ -58,13 +52,13 @@
58 52
 </template>
59 53
 
60 54
 <script>
61
-import _ from "lodash";
62
-import ItemsPerPageList from "../../assets/staticData/itemsPerPage";
63
-import BasePagination from "../shared/basePagination.vue";
55
+import _ from 'lodash';
56
+import ItemsPerPageList from '../../assets/staticData/itemsPerPage';
57
+import BasePagination from './basePagination.vue';
64 58
 
65 59
 export default {
66 60
   components: {
67
-    BasePagination
61
+    BasePagination,
68 62
   },
69 63
   mounted() {
70 64
     try {
@@ -78,19 +72,33 @@ export default {
78 72
     }
79 73
   },
80 74
   props: {
81
-    items: undefined
75
+    items: undefined,
82 76
   },
83 77
   data() {
84 78
     return {
85
-      sortKey: "",
79
+      showControl: false,
80
+      sortKey: '',
86 81
       reverse: false,
87
-      searchItem: "",
82
+      searchItem: '',
88 83
       itemsPerPageList: ItemsPerPageList,
89 84
       visibleItemsPerPageCount: 0,
90
-      currentPage: 1
85
+      currentPage: 1,
91 86
     };
92 87
   },
93 88
   methods: {
89
+    changeColumn(title, checked) {
90
+      if (checked) {
91
+        this.myColumns.push(title);
92
+      } else {
93
+        const ind = this.myColumns.indexOf(title);
94
+        if (ind > -1) {
95
+          this.myColumns.splice(ind, 1);
96
+        }
97
+      }
98
+    },
99
+    onControlVisibilityChange() {
100
+      this.showControl = !this.showControl;
101
+    },
94 102
     sortBy(sortKey) {
95 103
       this.reverse = this.sortKey === sortKey ? !this.reverse : false;
96 104
       this.sortKey = sortKey;
@@ -98,10 +106,10 @@ export default {
98 106
     async pageChangeHandle(value) {
99 107
       console.log(value);
100 108
       switch (value) {
101
-        case "next":
109
+        case 'next':
102 110
           this.currentPage += 1;
103 111
           break;
104
-        case "previous":
112
+        case 'previous':
105 113
           this.currentPage -= 1;
106 114
           break;
107 115
         default:
@@ -112,11 +120,17 @@ export default {
112 120
       if (this.currentPage !== 1) {
113 121
         this.currentPage = 1;
114 122
       }
115
-    }
123
+    },
116 124
   },
117 125
   computed: {
126
+    ListWidth() {
127
+      if (this.showControl) {
128
+        return 'col-md-9';
129
+      }
130
+      return 'col-md-12';
131
+    },
118 132
     SortDirection() {
119
-      return this.reverse ? "desc" : "asc";
133
+      return this.reverse ? 'desc' : 'asc';
120 134
     },
121 135
     PageCount() {
122 136
       return this.visibleItemsPerPageCount !== 0
@@ -130,8 +144,8 @@ export default {
130 144
           const item = this.items[i];
131 145
           for (const o in Object.keys(item)) {
132 146
             if (
133
-              !list.includes(Object.keys(item)[o]) &&
134
-              !Array.isArray(Object.values(item)[o])
147
+              !list.includes(Object.keys(item)[o])
148
+              && !Array.isArray(Object.values(item)[o])
135 149
             ) {
136 150
               list.push(Object.keys(item)[o]);
137 151
             }
@@ -141,14 +155,11 @@ export default {
141 155
       return list;
142 156
     },
143 157
     FilteredItems() {
144
-      const list = _.filter(this.items, item =>
145
-        Object.values(item).some(
146
-          i =>
147
-            JSON.stringify(i)
158
+      const list = _.filter(this.items, item => Object.values(item).some(
159
+          i => JSON.stringify(i)
148 160
               .toLowerCase()
149
-              .indexOf(this.searchItem) > -1
150
-        )
151
-      );
161
+              .indexOf(this.searchItem) > -1,
162
+        ),);
152 163
       return _.orderBy(list, this.sortKey, this.SortDirection);
153 164
     },
154 165
     DisplayItems() {
@@ -159,8 +170,8 @@ export default {
159 170
         endSlice = list.length;
160 171
       }
161 172
       return list.slice(startSlice, endSlice);
162
-    }
163
-  }
173
+    },
174
+  },
164 175
 };
165 176
 </script>
166 177
 <style scoped>

+ 24
- 0
src/components/shared/listViewControl.vue 파일 보기

@@ -0,0 +1,24 @@
1
+<template>
2
+  <div>
3
+    <div v-for="item in items" :key="item">
4
+      <CheckItem :title="item" @checkItem="changeColumn" />
5
+    </div>
6
+  </div>
7
+</template>
8
+<script>
9
+import CheckItem from './checkItem.vue';
10
+
11
+export default {
12
+  components: {
13
+    CheckItem,
14
+  },
15
+  props: {
16
+    items: undefined,
17
+  },
18
+  methods: {
19
+    changeColumn(title, checked) {
20
+      this.$emit('changeColumn', title, checked);
21
+    },
22
+  },
23
+};
24
+</script>

+ 12
- 11
src/components/shared/navBar.vue 파일 보기

@@ -1,6 +1,7 @@
1 1
 <template>
2 2
   <!-- eslint-disable max-len -->
3
-  <nav class="navbar navbar-default navbar-trans navbar-expand-lg fixed-top">
3
+
4
+  <nav class="navbar navbar-light bg-light navbar-expand-lg fixed-top" style="font-size:18px;">
4 5
     <div class="container-fluid">
5 6
       <div class="col-md-2">
6 7
         <button
@@ -43,7 +44,7 @@
43 44
             <!-- <li class="nav-item">
44 45
             <a class="nav-link active" @click="routerGoTo('/')">Home</a>
45 46
             </li>-->
46
-            <li class="nav-item dropdown">
47
+            <li class="nav-item dropdowsn">
47 48
               <a
48 49
                 class="nav-link dropdown-toggle"
49 50
                 href="#"
@@ -227,7 +228,7 @@
227 228
 </template>
228 229
 
229 230
 <script>
230
-import { mapGetters, mapActions } from "vuex";
231
+import { mapGetters, mapActions } from 'vuex';
231 232
 
232 233
 export default {
233 234
   data() {
@@ -235,23 +236,23 @@ export default {
235 236
   },
236 237
   computed: {
237 238
     showLogout() {
238
-      return this.$store.state.authentication.status === "success";
239
+      return this.$store.state.authentication.status === 'success';
239 240
     },
240 241
     hideLogin() {
241
-      return this.$store.state.authentication.status !== "success";
242
+      return this.$store.state.authentication.status !== 'success';
242 243
     },
243 244
     Logout() {
244 245
       return this.$store.state.authentication.methods.logout;
245
-    }
246
+    },
246 247
   },
247 248
 
248 249
   methods: {
249
-    ...mapGetters("authentication", ["isLoggedIn"]),
250
-    ...mapActions("authentication", ["logout"]),
250
+    ...mapGetters('authentication', ['isLoggedIn']),
251
+    ...mapActions('authentication', ['logout']),
251 252
 
252 253
     routerGoTo(goTo) {
253
-      this.$emit("routerGoTo", goTo);
254
-    }
255
-  }
254
+      this.$emit('routerGoTo', goTo);
255
+    },
256
+  },
256 257
 };
257 258
 </script>

+ 37
- 43
src/components/timeshare/sell/sellPage.vue 파일 보기

@@ -26,27 +26,21 @@
26 26
           <hr />
27 27
           <div class="form-group row">
28 28
             <div class="col-md-4">
29
-              <label>Were you referred by an agent?</label>
30
-              <br />
31
-              <div class="form-check form-check-inline">
32
-                <input
33
-                  class="form-check-input radiogroup"
34
-                  type="radio"
35
-                  value="true"
36
-                  :checked="refAgent"
37
-                  @change="changeRef"
38
-                />
39
-                <label class="form-check-label" for="referedBy">Yes</label>
40
-              </div>
41
-              <div class="form-check form-check-inline">
42
-                <input
43
-                  class="form-check-input radiogroup"
44
-                  type="radio"
45
-                  value="false"
46
-                  :checked="!refAgent"
47
-                  @change="changeRef"
48
-                />
49
-                <label class="form-check-label" for="referedBy">No</label>
29
+              <div class="form-group">
30
+                <label>Were you referred by an agent?</label>
31
+                <div class="custom-control custom-switch">
32
+                  <input
33
+                    type="checkbox"
34
+                    class="custom-control-input"
35
+                    id="customSwitch1"
36
+                    :checked="refAgent"
37
+                    @change="changeRef"
38
+                  />
39
+                  <label
40
+                    class="custom-control-label"
41
+                    for="customSwitch1"
42
+                  >{{refAgent ? 'Yes' : 'No'}}</label>
43
+                </div>
50 44
               </div>
51 45
             </div>
52 46
             <div class="col-md-4" v-if="refAgent">
@@ -539,34 +533,34 @@
539 533
   </div>
540 534
 </template>
541 535
 <script>
542
-import { mapState, mapActions } from 'vuex';
543
-import DetailIndividual from '../../user/timeshareIndividual.vue';
544
-import BankDetails from '../../shared/bankAccount.vue';
545
-import Address from '../../misc/address.vue';
536
+import { mapState, mapActions } from "vuex";
537
+import DetailIndividual from "../../user/timeshareIndividual.vue";
538
+import BankDetails from "../../shared/bankAccount.vue";
539
+import Address from "../../misc/address.vue";
546 540
 
547 541
 export default {
548
-  name: 'TimeshareToSell',
542
+  name: "TimeshareToSell",
549 543
   components: { DetailIndividual, BankDetails, Address },
550 544
   created() {
551 545
     this.initTimeshare();
552 546
   },
553 547
   computed: {
554
-    ...mapState('timeshare', [
555
-      'resorts',
556
-      'regions',
557
-      'detailedRegion',
558
-      'seasons',
559
-      'result',
560
-      'resortBedrooms',
561
-      'maxSleep',
562
-      'bankedEntities',
563
-      'sellItem',
564
-      'agencies',
565
-      'agents',
548
+    ...mapState("timeshare", [
549
+      "resorts",
550
+      "regions",
551
+      "detailedRegion",
552
+      "seasons",
553
+      "result",
554
+      "resortBedrooms",
555
+      "maxSleep",
556
+      "bankedEntities",
557
+      "sellItem",
558
+      "agencies",
559
+      "agents"
566 560
     ]),
567 561
     refAgent() {
568 562
       return this.sellItem && this.sellItem.referedByAgent;
569
-    },
563
+    }
570 564
   },
571 565
   methods: {
572 566
     submitSale() {
@@ -593,10 +587,10 @@ export default {
593 587
     resortChange() {
594 588
       this.onResortChange({
595 589
         resortName: this.sellItem.resort.resortName,
596
-        resortCode: this.sellItem.resort.resortCode,
590
+        resortCode: this.sellItem.resort.resortCode
597 591
       });
598 592
 
599
-      if (this.sellItem && this.sellItem.resort === 'Other') {
593
+      if (this.sellItem && this.sellItem.resort === "Other") {
600 594
         this.sellItem.otherResortName = undefined;
601 595
         this.sellItem.otherResort = true;
602 596
       } else {
@@ -609,8 +603,8 @@ export default {
609 603
         ? this.sellItem.region.id
610 604
         : 1;
611 605
     },
612
-    ...mapActions('timeshare', ['initTimeshare', 'onResortChange', 'saveWeek']),
613
-  },
606
+    ...mapActions("timeshare", ["initTimeshare", "onResortChange", "saveWeek"])
607
+  }
614 608
 };
615 609
 </script>
616 610
 <style>

Loading…
취소
저장