Lene Scholtz преди 5 години
родител
ревизия
950841af65

+ 34
- 0
README.md Целия файл

@@ -54,3 +54,37 @@ See [Configuration Reference](https://cli.vuejs.org/config/).
54 54
 └── modules
55 55
 ├── cart.js # cart module
56 56
 └── products.js # products module
57
+
58
+### Tender Weeks
59
+
60
+http://www.unipoint-consoft.co.za/nph-srep.exe?cluvavail.sch&CLUB=LPA&RESORT=ALL&SUMMARY=N&HEAD=Y
61
+
62
+that is the url to call the tender week
63
+
64
+HEAD=Y will give a heading = HEAD=N (no headings)
65
+
66
+ok i have done the "banking" option for UV to hold a week
67
+
68
+i have created a test option to run on backup data so you can test
69
+
70
+for available units
71
+
72
+http://www.unipoint-consoft.co.za/nph-srep.exe?cluvavail_test.sch&CLUB=LPA&RESORT=ALL&SUMMARY=N&HEAD=Y
73
+
74
+the call with \_test on the end uses the daily backed up test data
75
+
76
+for the live data then leave the \_test off
77
+
78
+ok to put a week on hold got Univate - ie if client is interested - theis will remove it from availability while documentation etc is being done
79
+
80
+http://www.unipoint-consoft.co.za/nph-srep.exe?cluvbank_test.sch&CLUB=LPA&TYPE=BANK&RESORT=KK&UNIT=009&MODULE=32&YEAR=2020&BANKTO=UV
81
+
82
+the TYPE= BANK puts the week on HOLD for UNIVATE - YEAR=2019 for this year or 2020 for next year
83
+
84
+if you want to cancel the booking use
85
+
86
+http://www.unipoint-consoft.co.za/nph-srep.exe?cluvbank_test.sch&CLUB=LPA&TYPE=CANCEL&RESORT=KK&UNIT=009&MODULE=32&YEAR=2020&BANKTO=UV
87
+
88
+if you get a SUCCESS response it means it worked
89
+
90
+otherwise will return error messages to tell you what the issue is

+ 4
- 0
src/App.vue Целия файл

@@ -46,6 +46,10 @@ hr {
46 46
   border: white solid 3px;
47 47
   border-radius: 15px;
48 48
 }
49
+.myBackground {
50
+  border-color: #60cbeb;
51
+  background-color: #60cbeb;
52
+}
49 53
 .myFill {
50 54
   fill: #60cbeb;
51 55
   color: #60cbeb;

+ 206
- 0
src/components/communication/templateDetail.vue Целия файл

@@ -0,0 +1,206 @@
1
+<template>
2
+  <div style="padding:10px;">
3
+    <div class="container" style="background-color:rgba(215,215,215,0.75);padding:20px;">
4
+      <div class="row">
5
+        <div class="col-md-12">
6
+          <div class="d-flex">
7
+            <div class="p-2 mr-auto">
8
+              <h2>Detailed Item</h2>
9
+            </div>
10
+            <div class="p-2">
11
+              <div class="btn btn-primary myBackground">Add New</div>
12
+            </div>
13
+            <div class="p-2">
14
+              <div class="btn btn-primary myBackground">Edit</div>
15
+            </div>
16
+            <div class="p-2">
17
+              <div class="btn btn-primary myBackground">Close</div>
18
+            </div>
19
+          </div>
20
+        </div>
21
+        <div class="col-md-12">
22
+          <hr />
23
+        </div>
24
+        <div class="col-md-4 text-left">
25
+          <label>Id</label>
26
+          <div class="input-group mb-3">
27
+            <div class="input-group-prepend">
28
+              <span class="input-group-text" style="color: #60CBEB">
29
+                <b>I</b>
30
+              </span>
31
+            </div>
32
+            <input class="form-control" type="number" step="any" name="levy" v-model="item.id" />
33
+          </div>
34
+        </div>
35
+        <div class="col-md-8 text-left">
36
+          <label for="Sleeps maximum">Name</label>
37
+          <div class="input-group mb-3">
38
+            <div class="input-group-prepend">
39
+              <span class="input-group-text" style="color: #60CBEB">
40
+                <b>N</b>
41
+              </span>
42
+            </div>
43
+            <input class="form-control" type="text" step="any" name="levy" v-model="item.name" />
44
+          </div>
45
+        </div>
46
+        <div class="col-md-12">
47
+          <hr />
48
+        </div>
49
+        <div class="col-md-12 text-left">
50
+          <label for="Sleeps maximum">Subject</label>
51
+          <div class="input-group mb-3">
52
+            <div class="input-group-prepend">
53
+              <span class="input-group-text" style="color: #60CBEB">
54
+                <b>S</b>
55
+              </span>
56
+            </div>
57
+            <input class="form-control" type="text" step="any" name="levy" v-model="item.subject" />
58
+          </div>
59
+        </div>
60
+        <div class="col-md-12">
61
+          <ul class="nav nav-tabs" id="myTab" role="tablist">
62
+            <li class="nav-item">
63
+              <a
64
+                class="nav-link active"
65
+                id="directions-tab"
66
+                data-toggle="tab"
67
+                href="#directions"
68
+                role="tab"
69
+                aria-controls="directions"
70
+                aria-selected="false"
71
+              >Html</a>
72
+            </li>
73
+            <li class="nav-item">
74
+              <a
75
+                class="nav-link"
76
+                id="resort-layout-tab"
77
+                data-toggle="tab"
78
+                href="#resort-layout"
79
+                role="tab"
80
+                aria-controls="resort-layout"
81
+                aria-selected="true"
82
+              >Preview</a>
83
+            </li>
84
+          </ul>
85
+          <div
86
+            class="tab-content"
87
+            id="myTabContent"
88
+            style="background-color:rgba(255,255,255,0.75);padding:10px;"
89
+          >
90
+            <div
91
+              class="tab-pane fade show active"
92
+              style="background-color:rgba(255,255,255,0.75);padding:10px;"
93
+              id="directions"
94
+              role="tabpanel"
95
+              aria-labelledby="directions-tab"
96
+            >
97
+              <div class="text-left">
98
+                <label for="Sleeps maximum">Body</label>
99
+                <div class="input-group mb-3">
100
+                  <div class="input-group-prepend">
101
+                    <span class="input-group-text" style="color: #60CBEB">
102
+                      <b>B</b>
103
+                    </span>
104
+                  </div>
105
+                  <textarea
106
+                    class="form-control"
107
+                    type="text"
108
+                    rows="10"
109
+                    step="any"
110
+                    name="levy"
111
+                    v-model="item.body"
112
+                  />
113
+                </div>
114
+              </div>
115
+            </div>
116
+            <div
117
+              class="tab-pane fade"
118
+              id="resort-layout"
119
+              role="tabpanel"
120
+              aria-labelledby="resort-layout-tab"
121
+            >
122
+              <div class="no-style" v-html="item.body"></div>
123
+            </div>
124
+          </div>
125
+        </div>
126
+        <div class="col-md-12">
127
+          <hr />
128
+        </div>
129
+        <div class="col-md-12">
130
+          <div class="d-flex">
131
+            <div class="p-2 mr-auto">
132
+              <h2>Coded Fields</h2>
133
+            </div>
134
+            <div class="p-2">
135
+              <div class="btn btn-primary myBackground" @click="addClose()">{{btnCaption}}</div>
136
+            </div>
137
+          </div>
138
+        </div>
139
+        <div
140
+          class="col-md-12"
141
+          v-if="showNew"
142
+          style="background-color:rgba(255,255,255,1); border-radius:5px;padding:10px;"
143
+        >
144
+          <TemplateInnerItem />
145
+        </div>
146
+        <div class="col-md-12">
147
+          <hr />
148
+        </div>
149
+        <div class="col-md-12">
150
+          <ListView :items="item.placeHolders" :hideSearch="true" />
151
+        </div>
152
+      </div>
153
+    </div>
154
+  </div>
155
+</template>
156
+<script>
157
+import ListView from '../shared/listView.vue';
158
+import TemplateInnerItem from './templateInnerItem.vue';
159
+
160
+export default {
161
+  data() {
162
+    return {
163
+      showNew: false,
164
+    };
165
+  },
166
+  components: {
167
+    ListView,
168
+    TemplateInnerItem,
169
+  },
170
+  props: {
171
+    item: {},
172
+  },
173
+  computed: {
174
+    btnCaption() {
175
+      return this.showNew ? 'Close' : 'New';
176
+    },
177
+  },
178
+  methods: {
179
+    addClose() {
180
+      if (this.showNew) {
181
+        this.showNew = false;
182
+      } else this.showNew = true;
183
+    },
184
+  },
185
+};
186
+</script>
187
+<style>
188
+.no-style {
189
+  background: #fff;
190
+  border: none;
191
+  color: #000;
192
+  display: block;
193
+  font: initial;
194
+  height: auto;
195
+  letter-spacing: normal;
196
+  line-height: normal;
197
+  margin: 0;
198
+  padding: 0;
199
+  text-transform: none;
200
+  visibility: visible;
201
+  width: auto;
202
+  word-spacing: normal;
203
+  z-index: auto;
204
+  text-align: left;
205
+}
206
+</style>

+ 54
- 0
src/components/communication/templateInnerItem.vue Целия файл

@@ -0,0 +1,54 @@
1
+<template>
2
+  <div class="row">
3
+    <div class="col-md-3">
4
+      <input
5
+        class="form-control"
6
+        type="text"
7
+        step="any"
8
+        name="levy"
9
+        placeholder="Name"
10
+        v-model="item.name"
11
+      />
12
+    </div>
13
+    <div class="col-md-3">
14
+      <select class="form-control" v-model="item.class" @change="onClassChanged()">
15
+        <option v-for="(item, i) in classes" :key="i" :value="item">{{item.name}}</option>
16
+      </select>
17
+    </div>
18
+    <div class="col-md-3">
19
+      <select class="form-control" v-model="item.property">
20
+        <option v-for="(item, i) in properties" :key="i">{{item}}</option>
21
+      </select>
22
+    </div>
23
+    <div class="col-md-3">
24
+      <div class="btn btn-primary myBackground w-100">Add</div>
25
+    </div>
26
+  </div>
27
+</template>
28
+<script>
29
+import { mapState, mapActions } from 'vuex';
30
+
31
+export default {
32
+  mounted() {
33
+    this.init();
34
+  },
35
+  data() {
36
+    return {
37
+      item: {
38
+        name: undefined,
39
+        class: undefined,
40
+        property: undefined,
41
+      },
42
+    };
43
+  },
44
+  computed: {
45
+    ...mapState('info', ['classes', 'properties']),
46
+  },
47
+  methods: {
48
+    ...mapActions('info', ['init', 'getClasses', 'getProperties']),
49
+    onClassChanged() {
50
+      this.getProperties(this.item.class);
51
+    },
52
+  },
53
+};
54
+</script>

+ 58
- 0
src/components/communication/templatePage.vue Целия файл

@@ -0,0 +1,58 @@
1
+<template>
2
+  <div>
3
+    <br />
4
+    <hr />
5
+    <hr />
6
+    <hr />
7
+    <hr />
8
+    <hr />
9
+    <div class="row">
10
+      <div :class="listClass">
11
+        <ListView :items="list" @onRowClick="onRowClick" />
12
+      </div>
13
+      <div class="col-md-6" v-if="showDetailView">
14
+        <DetailView :item="detailItem" />
15
+      </div>
16
+    </div>
17
+    <hr />
18
+  </div>
19
+</template>
20
+
21
+<script>
22
+import { mapState, mapActions } from 'vuex';
23
+import ListView from '../shared/listView.vue';
24
+import DetailView from './templateDetail.vue';
25
+
26
+export default {
27
+  data() {
28
+    return {
29
+      detailItem: undefined,
30
+    };
31
+  },
32
+  components: {
33
+    ListView,
34
+    DetailView,
35
+  },
36
+  mounted() {
37
+    this.getList();
38
+  },
39
+  computed: {
40
+    ...mapState('template', ['list', 'item']),
41
+    showDetailView() {
42
+      return this.detailItem !== undefined && this.detailItem != null;
43
+    },
44
+    listClass() {
45
+      return this.detailItem !== undefined && this.detailItem != null
46
+        ? 'col-md-6'
47
+        : 'col-md-12';
48
+    },
49
+  },
50
+  methods: {
51
+    ...mapActions('template', ['getList']),
52
+    onRowClick(item) {
53
+      console.log(item);
54
+      this.detailItem = item;
55
+    },
56
+  },
57
+};
58
+</script>

+ 13
- 2
src/components/shared/listView.vue Целия файл

@@ -3,7 +3,7 @@
3 3
 <template>
4 4
   <div>
5 5
     <div class="container">
6
-      <div class="d-flex justify-content-between">
6
+      <div class="d-flex justify-content-between" v-if="!hideSearch">
7 7
         <div class="p-2">
8 8
           <input v-model="searchItem" class="form-control" placeholder="Search ..." />
9 9
         </div>
@@ -18,7 +18,12 @@
18 18
         </tr>
19 19
       </thead>
20 20
       <tbody>
21
-        <tr v-for="(item, i) in DisplayItems" :key="i" class="text-left dnd-moved">
21
+        <tr
22
+          v-for="(item, i) in DisplayItems"
23
+          :key="i"
24
+          class="text-left dnd-moved"
25
+          @click="onRowClick(item)"
26
+        >
22 27
           <td v-for="(column, c) in Columns" :key="c">{{ item[column] }}</td>
23 28
         </tr>
24 29
       </tbody>
@@ -72,6 +77,9 @@ export default {
72 77
     }
73 78
   },
74 79
   props: {
80
+    hideSearch: {
81
+      default: false,
82
+    },
75 83
     items: undefined,
76 84
   },
77 85
   data() {
@@ -86,6 +94,9 @@ export default {
86 94
     };
87 95
   },
88 96
   methods: {
97
+    onRowClick(item) {
98
+      this.$emit('onRowClick', item);
99
+    },
89 100
     changeColumn(title, checked) {
90 101
       if (checked) {
91 102
         this.myColumns.push(title);

+ 194
- 193
src/router/index.js Целия файл

@@ -45,6 +45,8 @@ import Offer from '../components/processFlow/offers.vue';
45 45
 import searchLog from '../components/admin/logs/SearchLogs.vue';
46 46
 // import store from '../store';
47 47
 
48
+import TemplatePage from '../components/communication/templatePage.vue';
49
+
48 50
 Vue.use(Router);
49 51
 
50 52
 export default new Router({
@@ -55,198 +57,197 @@ export default new Router({
55 57
       y: 0,
56 58
     };
57 59
   },
58
-  routes: [
59
-    {
60
-      path: '/',
61
-      name: 'Home',
62
-      component: HomePage,
63
-    },
64
-    {
65
-      path: '/about/us',
66
-      name: 'aboutus',
67
-      component: AboutUs,
68
-    },
69
-    {
70
-      path: '/about/timeshare',
71
-      name: 'abouttimeshare',
72
-      component: AboutTimeshare,
73
-    },
74
-    {
75
-      path: '/timeshare/sell',
76
-      name: 'TimeshareSell',
77
-      component: TimeshareSell,
78
-    },
79
-    {
80
-      path: '/timeshare/buy',
81
-      name: 'TimeshareBuy',
82
-      component: TimeshareBuy,
83
-    },
84
-    {
85
-      path: '/timeshare/faq',
86
-      name: 'TimeshareFAQ',
87
-      component: TimeshareFAQ,
88
-    },
89
-    {
90
-      path: '/timeshare/myWeeks',
91
-      name: 'MyWeeks',
92
-      component: MyWeeksPage,
93
-    },
94
-    {
95
-      path: '/user/login',
96
-      name: 'Login',
97
-      component: Login,
98
-    },
99
-    {
100
-      path: '/user/updateProfileInfo',
101
-      name: 'UpdateInfo',
102
-      component: UpdateInfo,
103
-    },
104
-    {
105
-      path: '/user/register',
106
-      name: 'PrivateIndividual',
107
-      component: PrivateIndividual,
108
-    },
109
-    {
110
-      path: '/user/registeragency',
111
-      name: 'Agency',
112
-      component: Agency,
113
-    },
114
-    {
115
-      path: '/property/property/:id',
116
-      name: 'PropertyPage',
117
-      component: PropertyPage,
118
-    },
119
-    {
120
-      path: '/property/:propertyUsageType/search',
121
-      name: 'PropertySearch',
122
-      component: PropertySearch,
123
-    },
124
-    {
125
-      path: '/property/search',
126
-      name: 'PropertySearchTab',
127
-      component: PropertySearch,
128
-    },
129
-    {
130
-      path: '/property/new/:saleType',
131
-      name: 'PropertyNew',
132
-      component: PropertyEdit,
133
-    },
134
-    {
135
-      path: '/property/new/:propertyUsageType/:saleType',
136
-      name: 'PropertyNewFromSearch',
137
-      component: PropertyEdit,
138
-    },
139
-    {
140
-      path: '/property/edit/:id/:propType/:saleType',
141
-      name: 'PropertyEdit',
142
-      component: PropertyEdit,
143
-    },
144
-    {
145
-      path: '/property/admin/list/:by',
146
-      name: 'PropertyListAdmin',
147
-      component: PropertyList,
148
-    },
149
-    {
150
-      path: '/propertyTypes/list',
151
-      name: 'PropertyTypeList',
152
-      component: PropertyTypeList,
153
-    },
154
-    {
155
-      path: '/propertyType/new',
156
-      name: 'PropertyTypeNew',
157
-      component: PropertyType,
158
-    },
159
-    {
160
-      path: '/propertyType/:id',
161
-      name: 'PropertyTypeEdit',
162
-      component: PropertyType,
163
-    },
164
-    {
165
-      path: '/userDefinedGroups/list',
166
-      name: 'UserDefinedGroupsList',
167
-      component: UserDefinedGroups,
168
-    },
169
-    {
170
-      path: '/userDefinedGroups/userDefinedGroup/:id',
171
-      name: 'UserDefinedGroupEdit',
172
-      component: UserDefinedGroup,
173
-    },
174
-    {
175
-      path: '/userDefinedGroups/userDefinedGroup',
176
-      name: 'UserDefinedGroupNew',
177
-      component: UserDefinedGroup,
178
-    },
179
-    {
180
-      path: '/status/list',
181
-      name: 'StatusList',
182
-      component: Status,
183
-    },
184
-    {
185
-      path: '/status/timeshareAdmin',
186
-      name: 'TimeshareAdmin',
187
-      component: timeshareAdminPage,
188
-    },
189
-    {
190
-      path: '/status/tenderWeekAdmin',
191
-      name: 'TenderWeekAdmin',
192
-      component: tenderWeekAdminPage,
193
-    },
194
-    {
195
-      path: '/status/userManagementPage',
196
-      name: 'userManagementPage',
197
-      component: userManagementPage,
198
-    },
199
-    {
200
-      path: '/status/changeLogPage',
201
-      name: 'changeLogPage',
202
-      component: changeLogPage,
203
-    },
204
-    {
205
-      path: '/unitConfiguration/list',
206
-      name: 'UnitConfiguration',
207
-      component: UnitConfiguration,
208
-    },
209
-    {
210
-      path: '/contactus',
211
-      name: 'ContactUs',
212
-      component: ContactUs,
213
-    },
214
-    {
215
-      path: '/privacypolicy',
216
-      name: 'PrivacyPolicy',
217
-      component: PrivacyPolicy,
218
-    },
219
-    {
220
-      path: '/resort/:resortCode',
221
-      name: 'ResortPage',
222
-      component: ResortPage,
223
-      props: true,
224
-    },
225
-    {
226
-      path: '/resort/:resortCode/:weekId',
227
-      name: 'UnitPage',
228
-      component: UnitPage,
229
-      props: true,
230
-    },
231
-    {
232
-      path: '/MakeOffer',
233
-      name: 'MakeOffer',
234
-      component: MakeOffer,
235
-    },
236
-    {
237
-      path: '/Offers',
238
-      name: 'Offers',
239
-      component: Offer,
240
-    },
241
-    {
242
-      path: '/timeshare/search',
243
-      name: 'TimeshareSearch',
244
-      component: TimeshareSearch,
245
-    },
246
-    {
247
-      path: '/searchLog',
248
-      name: 'SearchLog',
249
-      component: searchLog,
250
-    },
60
+  routes: [{
61
+    path: '/',
62
+    name: 'Home',
63
+    component: HomePage,
64
+  },
65
+  {
66
+    path: '/about/us',
67
+    name: 'aboutus',
68
+    component: AboutUs,
69
+  },
70
+  {
71
+    path: '/about/timeshare',
72
+    name: 'abouttimeshare',
73
+    component: AboutTimeshare,
74
+  },
75
+  {
76
+    path: '/communication/template',
77
+    name: 'template',
78
+    component: TemplatePage,
79
+  },
80
+  {
81
+    path: '/timeshare/sell',
82
+    name: 'TimeshareSell',
83
+    component: TimeshareSell,
84
+  },
85
+  {
86
+    path: '/timeshare/buy',
87
+    name: 'TimeshareBuy',
88
+    component: TimeshareBuy,
89
+  },
90
+  {
91
+    path: '/timeshare/faq',
92
+    name: 'TimeshareFAQ',
93
+    component: TimeshareFAQ,
94
+  },
95
+  {
96
+    path: '/timeshare/myWeeks',
97
+    name: 'MyWeeks',
98
+    component: MyWeeksPage,
99
+  },
100
+  {
101
+    path: '/user/login',
102
+    name: 'Login',
103
+    component: Login,
104
+  },
105
+  {
106
+    path: '/user/register',
107
+    name: 'PrivateIndividual',
108
+    component: PrivateIndividual,
109
+  },
110
+  {
111
+    path: '/user/registeragency',
112
+    name: 'Agency',
113
+    component: Agency,
114
+  },
115
+  {
116
+    path: '/property/property/:id',
117
+    name: 'PropertyPage',
118
+    component: PropertyPage,
119
+  },
120
+  {
121
+    path: '/property/:propertyUsageType/search',
122
+    name: 'PropertySearch',
123
+    component: PropertySearch,
124
+  },
125
+  {
126
+    path: '/property/search',
127
+    name: 'PropertySearchTab',
128
+    component: PropertySearch,
129
+  },
130
+  {
131
+    path: '/property/new/:saleType',
132
+    name: 'PropertyNew',
133
+    component: PropertyEdit,
134
+  },
135
+  {
136
+    path: '/property/new/:propertyUsageType/:saleType',
137
+    name: 'PropertyNewFromSearch',
138
+    component: PropertyEdit,
139
+  },
140
+  {
141
+    path: '/property/edit/:id/:propType/:saleType',
142
+    name: 'PropertyEdit',
143
+    component: PropertyEdit,
144
+  },
145
+  {
146
+    path: '/property/admin/list/:by',
147
+    name: 'PropertyListAdmin',
148
+    component: PropertyList,
149
+  },
150
+  {
151
+    path: '/propertyTypes/list',
152
+    name: 'PropertyTypeList',
153
+    component: PropertyTypeList,
154
+  },
155
+  {
156
+    path: '/propertyType/new',
157
+    name: 'PropertyTypeNew',
158
+    component: PropertyType,
159
+  },
160
+  {
161
+    path: '/propertyType/:id',
162
+    name: 'PropertyTypeEdit',
163
+    component: PropertyType,
164
+  },
165
+  {
166
+    path: '/userDefinedGroups/list',
167
+    name: 'UserDefinedGroupsList',
168
+    component: UserDefinedGroups,
169
+  },
170
+  {
171
+    path: '/userDefinedGroups/userDefinedGroup/:id',
172
+    name: 'UserDefinedGroupEdit',
173
+    component: UserDefinedGroup,
174
+  },
175
+  {
176
+    path: '/userDefinedGroups/userDefinedGroup',
177
+    name: 'UserDefinedGroupNew',
178
+    component: UserDefinedGroup,
179
+  },
180
+  {
181
+    path: '/status/list',
182
+    name: 'StatusList',
183
+    component: Status,
184
+  },
185
+  {
186
+    path: '/status/timeshareAdmin',
187
+    name: 'TimeshareAdmin',
188
+    component: timeshareAdminPage,
189
+  },
190
+  {
191
+    path: '/status/tenderWeekAdmin',
192
+    name: 'TenderWeekAdmin',
193
+    component: tenderWeekAdminPage,
194
+  },
195
+  {
196
+    path: '/status/userManagementPage',
197
+    name: 'userManagementPage',
198
+    component: userManagementPage,
199
+  },
200
+  {
201
+    path: '/status/changeLogPage',
202
+    name: 'changeLogPage',
203
+    component: changeLogPage,
204
+  },
205
+  {
206
+    path: '/unitConfiguration/list',
207
+    name: 'UnitConfiguration',
208
+    component: UnitConfiguration,
209
+  },
210
+  {
211
+    path: '/contactus',
212
+    name: 'ContactUs',
213
+    component: ContactUs,
214
+  },
215
+  {
216
+    path: '/privacypolicy',
217
+    name: 'PrivacyPolicy',
218
+    component: PrivacyPolicy,
219
+  },
220
+  {
221
+    path: '/resort/:resortCode',
222
+    name: 'ResortPage',
223
+    component: ResortPage,
224
+    props: true,
225
+  },
226
+  {
227
+    path: '/resort/:resortCode/:weekId',
228
+    name: 'UnitPage',
229
+    component: UnitPage,
230
+    props: true,
231
+  },
232
+  {
233
+    path: '/MakeOffer',
234
+    name: 'MakeOffer',
235
+    component: MakeOffer,
236
+  },
237
+  {
238
+    path: '/Offers',
239
+    name: 'Offers',
240
+    component: Offer,
241
+  },
242
+  {
243
+    path: '/timeshare/search',
244
+    name: 'TimeshareSearch',
245
+    component: TimeshareSearch,
246
+  },
247
+  {
248
+    path: '/searchLog',
249
+    name: 'SearchLog',
250
+    component: searchLog,
251
+  },
251 252
   ],
252 253
 });

+ 4
- 0
src/store/index.js Целия файл

@@ -20,6 +20,8 @@ import Bid from './modules/processFlow/bid';
20 20
 import Authentication from './modules/user/authentication';
21 21
 import PropertySearch from './modules/property/propertySearch';
22 22
 import SearchLog from './modules/logs/searchLog';
23
+import Template from './modules/communication/template';
24
+import Info from './modules/communication/info';
23 25
 
24 26
 Vue.use(Vuex);
25 27
 /* eslint no-param-reassign: ["error", { "props": false }] */
@@ -45,5 +47,7 @@ export default new Vuex.Store({
45 47
     authentication: Authentication,
46 48
     propertySearch: PropertySearch,
47 49
     searchLog: SearchLog,
50
+    template: Template,
51
+    info: Info,
48 52
   },
49 53
 });

+ 46
- 0
src/store/modules/communication/info.js Целия файл

@@ -0,0 +1,46 @@
1
+import axios from 'axios';
2
+
3
+export default {
4
+  namespaced: true,
5
+  state: {
6
+    classes: [],
7
+    properties: [],
8
+  },
9
+  mutations: {
10
+    setClasses(state, list) {
11
+      state.classes = list;
12
+    },
13
+    setProperties(state, list) {
14
+      state.properties = list;
15
+    },
16
+    clearAll(state) {
17
+      state.classes = [];
18
+      state.properties = [];
19
+    },
20
+  },
21
+  getters: {},
22
+  actions: {
23
+    init({
24
+      dispatch,
25
+    }) {
26
+      dispatch('clearAll');
27
+      dispatch('getClasses');
28
+    },
29
+    getClasses({
30
+      commit,
31
+    }) {
32
+      axios
33
+        .get('api/info/getAllClasses')
34
+        .then(result => commit('setClasses', result.data))
35
+        .catch(console.error);
36
+    },
37
+    getProperties({
38
+      commit,
39
+    }, obj) {
40
+      axios
41
+        .get(`api/info/${obj.fullName}`)
42
+        .then(result => commit('setProperties', result.data))
43
+        .catch(console.error);
44
+    },
45
+  },
46
+};

+ 25
- 0
src/store/modules/communication/template.js Целия файл

@@ -0,0 +1,25 @@
1
+import axios from 'axios';
2
+
3
+export default {
4
+  namespaced: true,
5
+  state: {
6
+    list: [],
7
+    item: {},
8
+  },
9
+  mutations: {
10
+    setList(state, list) {
11
+      state.list = list;
12
+    },
13
+  },
14
+  getters: {},
15
+  actions: {
16
+    getList({
17
+      commit,
18
+    }) {
19
+      axios
20
+        .get('/api/template/getSimple')
21
+        .then(result => commit('setList', result.data))
22
+        .catch(console.error);
23
+    },
24
+  },
25
+};

Loading…
Отказ
Запис