Переглянути джерело

List View and Random Styles

master
30117125 4 роки тому
джерело
коміт
4f7433d048

+ 2
- 0
src/components/admin/status/timeshareAdminPage.vue Переглянути файл

@@ -68,6 +68,7 @@
68 68
             :CustomActionHeading="'Publish'"
69 69
             :showColumnChooser="false"
70 70
             :displayColumns="columns"
71
+            :displayFormats="displayFormats"
71 72
             @onRowClick="onRowClick"
72 73
             @onClearSelected="onClearSelected"
73 74
             @onEdit="onEdit"
@@ -117,6 +118,7 @@ export default {
117 118
         "region",
118 119
         "sellPrice"
119 120
       ],
121
+      displayFormats: ["", "", "", "", "", "", "", "", "money"],
120 122
       // selectedItems: [],
121 123
       showMessage: false,
122 124
       region: ""

+ 15
- 9
src/components/property/commercial/commercialSearchResults.vue Переглянути файл

@@ -1,12 +1,18 @@
1 1
 <template>
2 2
   <main id="main" style="margin-top:-20px; padding-bottom:50px">
3 3
     <div v-if="wait" id="preloader"></div>
4
-    <section v-if="properties.length > 0">
4
+    <div class="row pt-5 justify-content-md-center">
5
+      <h3 v-if="propertySearch.salesType === 'Sale'">COMMERCIAL PROPERTIES FOR SALE</h3>
6
+      <h3 v-else-if="propertySearch.salesType === 'Rent'">COMMERCIAL PROPERTIES FOR RENT</h3>
7
+    </div>
8
+    <propertyCard
9
+      v-if="properties.length > 0"
10
+      name="propertyholder"
11
+      :properties="properties"
12
+      :showSort="false"
13
+    />
14
+    <!-- <section v-if="properties.length > 0">
5 15
       <div class="container">
6
-        <div class="row pt-5 justify-content-md-center">
7
-          <h3 v-if="propertySearch.salesType === 'Sale'">COMMERCIAL PROPERTIES FOR SALE</h3>
8
-          <h3 v-else-if="propertySearch.salesType === 'Rent'">COMMERCIAL PROPERTIES FOR RENT</h3>
9
-        </div>
10 16
         <div class="row justify-content-md-center">
11 17
           <div
12 18
             class="col-lg-3 col-md-6 col-sm-6"
@@ -19,12 +25,12 @@
19 25
                 <h4>{{ currentProperty.displayPrice }}</h4>
20 26
                 <p>
21 27
                   {{ currentProperty.suburb }}, {{ currentProperty.city }} |
22
-                  {{ currentProperty.area }}M<sup>2</sup>
28
+                  {{ currentProperty.area }}
23 29
                 </p>
24 30
                 <p>{{ currentProperty.shortDescription }}</p>
25 31
                 <br />
26 32
 
27
-                <!-- <a href="commercialproperty-page.php" class="btn-white-border">VIEW</a> -->
33
+                <a href="commercialproperty-page.php" class="btn-white-border">VIEW</a>
28 34
                 <router-link
29 35
                   class="btn-white-border"
30 36
                   :to="`/property/commercial/property/${currentProperty.id}`"
@@ -35,7 +41,7 @@
35 41
           </div>
36 42
         </div>
37 43
       </div>
38
-    </section>
44
+    </section> -->
39 45
     <section v-else id="intro" style="margin-bottom:-50px">
40 46
       <div class="container">
41 47
         <div class="row d-flex justify-content-center">
@@ -72,7 +78,7 @@
72 78
 <script>
73 79
 /* eslint-disable */
74 80
 import { mapState, mapActions } from "vuex";
75
-import propertyCard from "../propertyCard";
81
+import propertyCard from "../propertyCardSearch";
76 82
 import carousel from "vue-owl-carousel";
77 83
 
78 84
 export default {

+ 11
- 9
src/components/property/propertyCard.vue Переглянути файл

@@ -12,11 +12,13 @@
12 12
               <div class="portfolio-item p-4 wow fadeInUp justify-content-md-center">
13 13
                 <div class="feature-top pt-3 mb-2">
14 14
                   <h3>{{ currentProperty.displayPrice }}</h3>
15
-                  <img
16
-                    style="max-height:165px; object-fit: cover;"
17
-                    :src="currentProperty.displayImage"
18
-                    alt
19
-                  />
15
+                  <div>
16
+                    <img
17
+                      style="max-height:165px; object-fit: cover;"
18
+                      :src="currentProperty.displayImage"
19
+                      alt
20
+                    />
21
+                  </div>
20 22
                 </div>
21 23
                 <h1>{{ currentProperty.suburb }}</h1>
22 24
                 <p>
@@ -30,7 +32,7 @@
30 32
                   <strong>{{ currentProperty.available }}</strong>
31 33
                 </p>
32 34
                 <p
33
-                  v-if="currentProperty.isSale  && currentProperty.hasPendingOffer"
35
+                  v-if="currentProperty.isSale && currentProperty.hasPendingOffer"
34 36
                   class="pendingOffer"
35 37
                 >
36 38
                   <strong>{{ currentProperty.available }}</strong>
@@ -71,7 +73,7 @@ export default {
71 73
   props: {
72 74
     properties: { type: Array, default: () => [] },
73 75
     showSort: { type: Boolean, default: true },
74
-    salesType: { type: String, default: "Rent" },
76
+    salesType: { type: String, default: "Rent" }
75 77
   },
76 78
   methods: {
77 79
     sortHighPrice() {
@@ -109,8 +111,8 @@ export default {
109 111
       }
110 112
 
111 113
       return this.properties.sort(compare);
112
-    },
113
-  },
114
+    }
115
+  }
114 116
 };
115 117
 </script>
116 118
 

+ 117
- 0
src/components/property/propertyCardSearch.vue Переглянути файл

@@ -0,0 +1,117 @@
1
+<template>
2
+  <section id="portfolio">
3
+    <div class="container-fluid">
4
+      <div class="row">
5
+        <div
6
+          class="col-lg-3 col-md-6 col-sm-6 my-3"
7
+          v-for="currentProperty in properties"
8
+          :key="currentProperty.id"
9
+        >
10
+          <div v-if="currentProperty.propertyUsageType === 'Residential'">
11
+            <router-link :to="`/property/residential/property/${currentProperty.id}`">
12
+              <div class="portfolio-item p-4 wow fadeInUp justify-content-md-center">
13
+                <div class="feature-top pt-3 mb-2">
14
+                  <h3 style="color:white !important">{{ currentProperty.displayPrice }}</h3>
15
+                  <img
16
+                    style="max-height:165px; object-fit: cover;"
17
+                    :src="currentProperty.displayImage"
18
+                    alt
19
+                  />
20
+                </div>
21
+                <h1>{{ currentProperty.suburb }}</h1>
22
+                <p>
23
+                  <strong>Property Reference</strong>
24
+                  {{ currentProperty.propertyReference }}
25
+                </p>
26
+                <p
27
+                  v-if="!currentProperty.isSale"
28
+                  :class="[currentProperty.hasPendingOffer ? 'pendingOffer' : 'normalText']"
29
+                >
30
+                  <strong>{{ currentProperty.available }}</strong>
31
+                </p>
32
+                <p
33
+                  v-if="currentProperty.isSale && currentProperty.hasPendingOffer"
34
+                  class="pendingOffer"
35
+                >
36
+                  <strong>{{ currentProperty.available }}</strong>
37
+                </p>
38
+              </div>
39
+            </router-link>
40
+          </div>
41
+          <div v-else-if="currentProperty.propertyUsageType === 'Commercial'">
42
+            <router-link :to="`/property/commercial/property/${currentProperty.id}`">
43
+              <div class="portfolio-item p-4 wow fadeInUp justify-content-md-center">
44
+                <div class="feature-top pt-3 mb-2">
45
+                  <h3>{{ currentProperty.displayPrice }}</h3>
46
+                  <img
47
+                    style="max-height:165px; object-fit: cover;"
48
+                    :src="currentProperty.displayImage"
49
+                    alt
50
+                  />
51
+                </div>
52
+                <h1>{{ currentProperty.suburb }}</h1>
53
+                <p>
54
+                  <strong>Property Reference</strong>
55
+                  {{ currentProperty.propertyReference }}
56
+                </p>
57
+              </div>
58
+            </router-link>
59
+          </div>
60
+        </div>
61
+      </div>
62
+    </div>
63
+  </section>
64
+  <!-- #listings -->
65
+</template>
66
+
67
+<script>
68
+/* eslint-disable */
69
+
70
+export default {
71
+  props: {
72
+    properties: { type: Array, default: () => [] },
73
+    showSort: { type: Boolean, default: true },
74
+    salesType: { type: String, default: "Rent" }
75
+  },
76
+  methods: {
77
+    sortHighPrice() {
78
+      function compare(a, b) {
79
+        if (a.price < b.price) return 1;
80
+        if (a.price > b.price) return -1;
81
+        return 0;
82
+      }
83
+
84
+      return this.properties.sort(compare);
85
+    },
86
+    sortLowPrice() {
87
+      function compare(a, b) {
88
+        if (a.price < b.price) return -1;
89
+        if (a.price > b.price) return 1;
90
+        return 0;
91
+      }
92
+
93
+      return this.properties.sort(compare);
94
+    },
95
+    sortNewest() {
96
+      function compare(a, b) {
97
+        if (a.dateCreated < b.dateCreated) return 1;
98
+        if (a.dateCreated > b.dateCreated) return -1;
99
+        return 0;
100
+      }
101
+
102
+      return this.properties.sort(compare);
103
+    },
104
+    sortDateAvailable() {
105
+      function compare(a, b) {
106
+        if (a.dateAvailable > b.dateAvailable) return 1;
107
+        if (a.dateAvailable < b.dateAvailable) return -1;
108
+        return 0;
109
+      }
110
+
111
+      return this.properties.sort(compare);
112
+    }
113
+  }
114
+};
115
+</script>
116
+
117
+<style lang="scss" scoped></style>

+ 14
- 8
src/components/property/residential/residentialSearchResults.vue Переглянути файл

@@ -1,12 +1,18 @@
1 1
 <template>
2 2
   <main id="main" style="margin-top:-20px; padding-bottom:50px">
3 3
     <div v-if="wait" id="preloader"></div>
4
-    <section v-if="properties.length > 0">
4
+    <div class="row pt-5 justify-content-md-center">
5
+      <h3 v-if="propertySearch.salesType === 'Sale'">RESIDENTIAL PROPERTIES FOR SALE</h3>
6
+      <h3 v-else-if="propertySearch.salesType === 'Rent'">RESIDENTIAL PROPERTIES FOR RENT</h3>
7
+    </div>
8
+    <propertyCard
9
+      v-if="properties.length > 0"
10
+      name="propertyholder"
11
+      :properties="properties"
12
+      :showSort="false"
13
+    />
14
+    <!-- <section v-if="properties.length > 0">
5 15
       <div class="container">
6
-        <div class="row pt-5 justify-content-md-center">
7
-          <h3 v-if="propertySearch.salesType === 'Sale'">RESIDENTIAL PROPERTIES FOR SALE</h3>
8
-          <h3 v-else-if="propertySearch.salesType === 'Rent'">RESIDENTIAL PROPERTIES FOR RENT</h3>
9
-        </div>
10 16
         <div class="row justify-content-md-center">
11 17
           <div
12 18
             class="col-lg-3 col-md-6 col-sm-6"
@@ -21,7 +27,7 @@
21 27
                 <p>{{ currentProperty.shortDescription }}</p>
22 28
                 <br />
23 29
 
24
-                <!-- <a href="commercialproperty-page.php" class="btn-white-border">VIEW</a> -->
30
+                <a href="commercialproperty-page.php" class="btn-white-border">VIEW</a>
25 31
                 <router-link
26 32
                   class="btn-white-border"
27 33
                   :to="`/property/residential/property/${currentProperty.id}`"
@@ -32,7 +38,7 @@
32 38
           </div>
33 39
         </div>
34 40
       </div>
35
-    </section>
41
+    </section> -->
36 42
     <section v-else id="intro" style="margin-bottom:-50px">
37 43
       <div class="container">
38 44
         <div class="row d-flex justify-content-center">
@@ -69,7 +75,7 @@
69 75
 <script>
70 76
 /* eslint-disable */
71 77
 import { mapState, mapActions } from "vuex";
72
-import propertyCard from "../propertyCard";
78
+import propertyCard from "../propertyCardSearch";
73 79
 
74 80
 export default {
75 81
   name: "propertysearch",

+ 26
- 19
src/components/property/residential/singleView/contentSection.vue Переглянути файл

@@ -91,27 +91,34 @@
91 91
                 <p v-html="property.description"></p>
92 92
               </div>
93 93
             </div>
94
-          </div>
95
-          <div>
96
-            <router-link
97
-              style="float:right"
98
-              class="btn-solid-blue mt-3"
99
-              :to="{ name: 'EnquireNow', params: { id: $route.params.id } }"
100
-              >MORE INFO...</router-link
101
-            >
102
-            <h4>Property Features</h4>
103
-            {{ propertyFeatures }}
104
-            <div v-for="(data, i) in property.displayData" :key="i" class="row my-3">
105
-              <div v-for="(field, j) in data.values" :key="j" class="col-md-6">
106
-                <div v-if="field.value.toUpperCase() != 'TRUE'">
107
-                  <i class="fa fa-check-circle"></i>
108
-                  {{ field.value }} {{ field.name }}
109
-                </div>
110
-                <div v-else>
111
-                  <i class="fa fa-check-circle"></i>
112
-                  {{ field.name }}
94
+            <div class="row">
95
+              <div class="col">
96
+                <h4>Property Features</h4>
97
+              </div>
98
+            </div>
99
+            <div class="row">
100
+              <div class="col-md-8">
101
+                <div v-for="(data, i) in property.displayData" :key="i" class="row my-3">
102
+                  <div v-for="(field, j) in data.values" :key="j" class="col-md-6">
103
+                    <div v-if="field.value !== 'yes'">
104
+                      <i class="fa fa-check-circle"></i>
105
+                      {{ field.value }} {{ field.name }}
106
+                    </div>
107
+                    <div v-else>
108
+                      <i class="fa fa-check-circle"></i>
109
+                      {{ field.name }}
110
+                    </div>
111
+                  </div>
113 112
                 </div>
114 113
               </div>
114
+              <div class="col-md-4">
115
+                <router-link
116
+                  style="float:right"
117
+                  class="btn-solid-blue mt-3"
118
+                  :to="{ name: 'EnquireNow', params: { id: $route.params.id } }"
119
+                  >MORE INFO...</router-link
120
+                >
121
+              </div>
115 122
             </div>
116 123
           </div>
117 124
           <h4 v-if="property.video != null" class="mt-5">Video Tour</h4>

+ 78
- 77
src/components/shared/listView.vue Переглянути файл

@@ -1,24 +1,25 @@
1 1
 /* eslint-disable no-restricted-syntax */ /* eslint-disable guard-for-in */
2 2
 <template>
3 3
   <div>
4
-    <div style="height:5px"></div>
5
-    <div class="d-flex justify-content-between">
6
-      <div class="p-2" v-if="!hideSearch">
7
-        <float-label label="SEARCH">
8
-          <input v-model="searchItem" class="form-control uniInput mt-3" placeholder="Search..." />
4
+    <div class="row">
5
+      <div align="center" class="col">
6
+        <float-label class="mb-3" label="SEARCH" style="width:50%; float:center">
7
+          <input v-model="searchItem" class="form-control uniInput mt-3" placeholder="SEARCH" />
9 8
         </float-label>
10 9
       </div>
10
+    </div>
11
+
12
+    <div class="d-flex justify-content-between">
13
+      <div class="p-2" v-if="!hideSearch"></div>
11 14
       <div class="p-2" v-if="title">
12 15
         <h2>{{ title }}</h2>
13 16
       </div>
14 17
       <div class="p-2">
15 18
         <div class="d-flex flex-row">
16 19
           <div class="p2" v-if="showColumnChooser">
17
-            <div
18
-              class="btn-solid-blue cursor-pointer"
19
-              data-toggle="modal"
20
-              data-target="#myModal"
21
-            >Column Chooser</div>
20
+            <div class="btn-solid-blue cursor-pointer" data-toggle="modal" data-target="#myModal">
21
+              Column Chooser
22
+            </div>
22 23
             <div class="col-md-12">
23 24
               <div id="myModal" class="modal fade" role="dialog">
24 25
                 <div class="modal-dialog modal-lg" style="width:500px">
@@ -37,7 +38,9 @@
37 38
             </div>
38 39
           </div>
39 40
           <div class="p2" v-if="selectedItems.length > 0">
40
-            <div class="btn-solid-blue cursor-pointer" @click="onClearSelected()">Clear Selected</div>
41
+            <div class="btn-solid-blue cursor-pointer" @click="onClearSelected()">
42
+              Clear Selected
43
+            </div>
41 44
           </div>
42 45
           <div class="p2" v-if="showNew">
43 46
             <div class="btn-solid-blue cursor-pointer" @click="onNew()">New</div>
@@ -62,14 +65,12 @@
62 65
                 :class="{ active: hover === c }"
63 66
               >
64 67
                 <div class="d-flex bd-highlight">
65
-                  <div
66
-                    v-if="displayHeaders.length === 0"
67
-                    class="p-2 w-100 bd-highlight"
68
-                  >{{ column | toProper }}</div>
69
-                  <div
70
-                    v-else
71
-                    class="p-2 w-100 bd-highlight"
72
-                  >{{ displayHeaders[c] !== "" ? displayHeaders[c] : column | toProper }}</div>
68
+                  <div v-if="displayHeaders.length === 0" class="p-2 w-100 bd-highlight">
69
+                    {{ column | toProper }}
70
+                  </div>
71
+                  <div v-else class="p-2 w-100 bd-highlight">
72
+                    {{ displayHeaders[c] !== "" ? displayHeaders[c] : column | toProper }}
73
+                  </div>
73 74
                   <div class="p-2 flex-shrink-1 bd-highlight">
74 75
                     <img
75 76
                       src="../../../public/img/sort-up.png"
@@ -90,7 +91,8 @@
90 91
             <th v-if="deleteable"></th>
91 92
           </tr>
92 93
         </thead>
93
-        <tbody class="table">
94
+
95
+        <tbody>
94 96
           <tr
95 97
             v-for="(item, i) in DisplayItems"
96 98
             :key="i"
@@ -98,29 +100,32 @@
98 100
             :class="{ selected: isSelected(i), 'cursor-pointer': allowSelect }"
99 101
           >
100 102
             <td v-for="(column, c) in Columns" :key="c">
101
-              <div
102
-                v-if="displayFormats.length === 0"
103
-              >{{ isObject(item[column]) ? item[column].display : item[column] }}</div>
103
+              <div v-if="displayFormats.length === 0">
104
+                {{ isObject(item[column]) ? item[column].display : item[column] }}
105
+              </div>
104 106
               <div v-else-if="displayFormats.length > 0 && displayFormats[c] === 'date'">
105
-                <div
106
-                  v-if="item[column] !== '0001-01-01T00:00:00'"
107
-                >{{ isObject(item[column]) ? item[column].display : item[column] | toDate }}</div>
107
+                <div v-if="item[column] !== '0001-01-01T00:00:00'">
108
+                  {{ isObject(item[column]) ? item[column].display : item[column] | toDate }}
109
+                </div>
108 110
               </div>
109 111
               <div
112
+                style="padding-left:10px;white-space: nowrap;"
110 113
                 v-else-if="displayFormats.length > 0 && displayFormats[c] === 'money'"
111
-              >{{ isObject(item[column]) ? item[column].display : item[column] | toCurrency }}</div>
114
+              >
115
+                {{ isObject(item[column]) ? item[column].display : item[column] | toCurrency }}
116
+              </div>
112 117
               <div v-else-if="displayFormats.length > 0 && displayFormats[c] === 'image'">
113 118
                 <img :src="item[column]" style="height:100px; width:100px; object-fit: cover;" />
114 119
               </div>
115 120
               <div v-else>{{ isObject(item[column]) ? item[column].display : item[column] }}</div>
116 121
             </td>
117 122
             <td v-if="showCustomAction" class="my-width">
118
-              <button
119
-                type="button"
120
-                class="btn my-btn"
121
-                @click="onCustomClick(item)"
122
-              >{{ CustomActionHeading }}</button>
123
+              <button type="button" class="btn my-btn" @click="onCustomClick(item)">
124
+                <p v-if="CustomActionHeading !== 'Publish'">{{ CustomActionHeading }}</p>
125
+                <img v-else src="../../../public/img/icons/Upload.png" height="25" width="25" />
126
+              </button>
123 127
             </td>
128
+
124 129
             <td v-if="editable" class="my-width">
125 130
               <a @click="onEdit(item)" class="p-3">
126 131
                 <img src="../../../public/img/icons/Edit.png" height="25" width="25" />
@@ -139,10 +144,10 @@
139 144
       <div class="d-flex justify-content-between" v-if="showPager">
140 145
         <div class="p-1">
141 146
           {{
142
-          currentPage +
143
-          " / " +
144
-          PageCount +
145
-          (!hideItemCount ? " - (" + FilteredItems.length + " items)" : "")
147
+            currentPage +
148
+              " / " +
149
+              PageCount +
150
+              (!hideItemCount ? " - (" + FilteredItems.length + " items)" : "")
146 151
           }}
147 152
         </div>
148 153
         <div class="p-1">
@@ -187,7 +192,7 @@ export default {
187 192
   components: {
188 193
     BasePagination,
189 194
     Alert,
190
-    ListViewControl,
195
+    ListViewControl
191 196
   },
192 197
   mounted() {
193 198
     try {
@@ -203,75 +208,75 @@ export default {
203 208
   },
204 209
   props: {
205 210
     compact: {
206
-      default: true,
211
+      default: false
207 212
     },
208 213
     allowSelect: {
209
-      default: true,
214
+      default: true
210 215
     },
211 216
     allowMultipleSelect: {
212
-      default: false,
217
+      default: false
213 218
     },
214 219
     hideSearch: {
215
-      default: false,
220
+      default: false
216 221
     },
217 222
     showNew: {
218
-      default: true,
223
+      default: true
219 224
     },
220 225
     items: undefined,
221 226
     editable: {
222
-      default: false,
227
+      default: false
223 228
     },
224 229
     deleteable: {
225
-      default: false,
230
+      default: false
226 231
     },
227 232
     columnCount: {
228
-      default: 6,
233
+      default: 6
229 234
     },
230 235
     showPager: {
231
-      default: true,
236
+      default: true
232 237
     },
233 238
     title: {
234
-      default: undefined,
239
+      default: undefined
235 240
     },
236 241
     sortKey: {
237
-      default: "id",
242
+      default: "id"
238 243
     },
239 244
     hideItemCount: {
240
-      default: false,
245
+      default: false
241 246
     },
242 247
     currentPage: {
243
-      default: 1,
248
+      default: 1
244 249
     },
245 250
     bordered: {
246
-      default: true,
251
+      default: false
247 252
     },
248 253
     striped: {
249
-      default: true,
254
+      default: true
250 255
     },
251 256
     showColumnChooser: {
252
-      default: true,
257
+      default: true
253 258
     },
254 259
     displayColumns: {
255 260
       type: Array,
256
-      default: () => [],
261
+      default: () => []
257 262
     },
258 263
     displayFormats: {
259 264
       type: Array,
260
-      default: () => [],
265
+      default: () => []
261 266
     },
262 267
     displayHeaders: {
263 268
       type: Array,
264
-      default: () => [],
269
+      default: () => []
265 270
     },
266 271
     showCustomAction: {
267
-      default: false,
272
+      default: false
268 273
     },
269 274
     CustomActionHeading: {
270
-      default: "",
275
+      default: ""
271 276
     },
272 277
     CustomActionCondition: {
273
-      default: "",
274
-    },
278
+      default: ""
279
+    }
275 280
   },
276 281
   data() {
277 282
     return {
@@ -284,7 +289,7 @@ export default {
284 289
       visibleItemsPerPageCount: 20,
285 290
       itemsPerPageList: ItemsPerPageList,
286 291
       visibleColumn: [],
287
-      allColumn: [],
292
+      allColumn: []
288 293
     };
289 294
   },
290 295
   methods: {
@@ -306,16 +311,12 @@ export default {
306 311
         for (const i in Object.keys(this.items)) {
307 312
           const item = this.items[i];
308 313
           for (const o in Object.keys(item)) {
309
-            if (
310
-              !listAll.includes(Object.keys(item)[o]) &&
311
-              !Array.isArray(Object.values(item)[o])
312
-            ) {
314
+            if (!listAll.includes(Object.keys(item)[o]) && !Array.isArray(Object.values(item)[o])) {
313 315
               const columnName = Object.keys(item)[o];
314
-              if (!listAll.some((x) => x.column === columnName)) {
316
+              if (!listAll.some(x => x.column === columnName)) {
315 317
                 listAll.push({
316 318
                   column: columnName,
317
-                  show:
318
-                    _.filter(listAll, (x) => x.show).length < this.columnCount,
319
+                  show: _.filter(listAll, x => x.show).length < this.columnCount
319 320
                 });
320 321
               }
321 322
             }
@@ -330,7 +331,7 @@ export default {
330 331
     },
331 332
     isSelected(i) {
332 333
       const ind = this.getActualIndex(i);
333
-      return _.some(this.selectedItems, (x) => x === ind);
334
+      return _.some(this.selectedItems, x => x === ind);
334 335
     },
335 336
     onNew() {
336 337
       this.$emit("onNew");
@@ -366,8 +367,8 @@ export default {
366 367
     },
367 368
     onRowClick(item, i) {
368 369
       const ind = this.getActualIndex(i);
369
-      if (_.some(this.selectedItems, (x) => x === ind)) {
370
-        this.selectedItems = this.selectedItems.filter((x) => x !== ind);
370
+      if (_.some(this.selectedItems, x => x === ind)) {
371
+        this.selectedItems = this.selectedItems.filter(x => x !== ind);
371 372
       } else {
372 373
         if (!this.allowMultipleSelect) {
373 374
           this.selectedItems = [];
@@ -420,7 +421,7 @@ export default {
420 421
         if (array[i] === value) return true;
421 422
       }
422 423
       return false;
423
-    },
424
+    }
424 425
   },
425 426
   computed: {
426 427
     ListWidth() {
@@ -447,7 +448,7 @@ export default {
447 448
           listColumns.push(this.displayColumns[i]);
448 449
         }
449 450
       } else {
450
-        const list = _.filter(this.allColumn, (x) => x.show);
451
+        const list = _.filter(this.allColumn, x => x.show);
451 452
         for (const i in list) {
452 453
           const item = list[i];
453 454
           if (item) {
@@ -464,9 +465,9 @@ export default {
464 465
       return list;
465 466
     },
466 467
     FilteredItems() {
467
-      const list = _.filter(this.items, (item) =>
468
+      const list = _.filter(this.items, item =>
468 469
         Object.values(item).some(
469
-          (i) =>
470
+          i =>
470 471
             JSON.stringify(i)
471 472
               .toLowerCase()
472 473
               .indexOf(this.searchItem.toLowerCase()) > -1
@@ -484,8 +485,8 @@ export default {
484 485
       return list.slice(startSlice, endSlice);
485 486
     },
486 487
 
487
-    GetAllColumn() {},
488
-  },
488
+    GetAllColumn() {}
489
+  }
489 490
 };
490 491
 </script>
491 492
 <style scoped>

+ 1
- 1
src/main.js Переглянути файл

@@ -63,7 +63,7 @@ Vue.filter("toCurrency", value => {
63 63
     return value;
64 64
   }
65 65
   const formatter = new Intl.NumberFormat("en-US", {
66
-    minimumFractionDigits: 2
66
+    minimumFractionDigits: 0
67 67
   });
68 68
   return `R ${formatter.format(value)}`;
69 69
 });

Завантаження…
Відмінити
Зберегти