Browse Source

Bid Offer screens

master
George Williams 5 years ago
parent
commit
13da159825

+ 2
- 0
.gitignore View File

@@ -19,3 +19,5 @@ yarn-error.log*
19 19
 *.njsproj
20 20
 *.sln
21 21
 *.sw?
22
+vue.config.js
23
+.gitignore

+ 186
- 0
src/components/processFlow/makeOffer.vue View File

@@ -0,0 +1,186 @@
1
+<template>
2
+  <!-- eslint-disable max-len -->
3
+  <div style="padding-left:50px; padding-right:50px; padding-bottom:50px;">
4
+    <div>
5
+      <br />
6
+      <div v-if="isProperty">
7
+        <div class="form-group row">
8
+          <div class="col-md-6">
9
+            <div class="title-box-d">
10
+              <h3 class="title-d">{{ item.shortDescription }}</h3>
11
+            </div>
12
+          </div>
13
+        </div>
14
+        <div class="form-group row">
15
+          <div class="col-md-12" style="text-align:left">
16
+            <div v-html="item.description"></div>
17
+          </div>
18
+        </div>
19
+      </div>
20
+      <div v-if="!isProperty">
21
+        <div class="form-group row">
22
+          <div class="col-md-6 col-lg-5 section-md-t3">
23
+            <div class="title-box-d">
24
+              <h3 class="title-d">{{ item.resort }}</h3>
25
+            </div>
26
+          </div>
27
+        </div>
28
+        <div class="form-group row">
29
+          <div class="col-md-4">
30
+            <label for="resortunit">Unit</label>
31
+            <input
32
+              class="form-control"
33
+              type="text"
34
+              id="resort"
35
+              name="resortunit"
36
+              disabled
37
+              v-model="item.unit"
38
+            />
39
+          </div>
40
+          <div class="col-md-4">
41
+            <label for="resortWeek">Week</label>
42
+            <input
43
+              class="form-control"
44
+              type="text"
45
+              id="week"
46
+              name="resortWeek"
47
+              disabled
48
+              v-model="item.week"
49
+            />
50
+          </div>
51
+          <div class="col-md-4">
52
+            <label for="resortModule">Module</label>
53
+            <input
54
+              class="form-control"
55
+              type="text"
56
+              id="module"
57
+              name="resortModule"
58
+              disabled
59
+              v-model="item.module"
60
+            />
61
+          </div>
62
+        </div>
63
+      </div>
64
+      <div class="form-group row">
65
+        <div class="col-md-6">
66
+          <label>Current Price</label>
67
+          <div class="input-group mb-3">
68
+            <div class="input-group-prepend">
69
+              <span class="input-group-text">R</span>
70
+            </div>
71
+            <input class="form-control" type="number" v-model="item.price" disabled />
72
+          </div>
73
+        </div>
74
+        <div class="col-md-6">
75
+          <label>Offer</label>
76
+          <div class="input-group mb-3">
77
+            <div class="input-group-prepend">
78
+              <span class="input-group-text">R</span>
79
+            </div>
80
+            <input
81
+              class="form-control"
82
+              type="number"
83
+              step="any"
84
+              id="minPrice"
85
+              name="minPrice"
86
+              v-model="item.offer"
87
+              :disabled="!isMakeOffer"
88
+            />
89
+          </div>
90
+        </div>
91
+      </div>
92
+      <div class="form-group row">
93
+        <div class="col-md-12">
94
+          <label>Comments</label>
95
+          <textarea
96
+            class="form-control editor form-control-lg form-control-a"
97
+            name="description"
98
+            v-model="item.comments"
99
+            :disabled="!isMakeOffer"
100
+          ></textarea>
101
+        </div>
102
+      </div>
103
+    </div>
104
+    <div class="container">
105
+      <button
106
+        v-if="isMakeOffer"
107
+        type="button"
108
+        @click="SendOffer()"
109
+        class="btn btn-b-n"
110
+        style="width: 150px; height:40px;"
111
+        data-dismiss="modal"
112
+      >Send Offer</button>
113
+      <button
114
+        v-if="!isMakeOffer && !isDecline"
115
+        type="submit"
116
+        @click="Accept()"
117
+        class="btn btn-b-n"
118
+        style="width: 150px; height:40px;"
119
+        data-dismiss="modal"
120
+      >Accept</button>
121
+      <button
122
+        v-if="!isMakeOffer && !isDecline"
123
+        type="button"
124
+        @click="Decline()"
125
+        class="btn btn-b-n"
126
+        style="width: 150px; height:40px;"
127
+      >Decline</button>
128
+      <div v-if="isDecline" class="form-group row">
129
+        <div class="col-md-12">
130
+          <br />
131
+          <label>Decline Reason</label>
132
+          <textarea class="form-control editor form-control-lg form-control-a" name="description"></textarea>
133
+        </div>
134
+      </div>
135
+      <button
136
+        v-if="isDecline"
137
+        type="button"
138
+        @click="Complete()"
139
+        class="btn btn-b-n"
140
+        style="width: 150px; height:40px;"
141
+        data-dismiss="modal"
142
+      >Complete</button>
143
+    </div>
144
+  </div>
145
+</template>
146
+
147
+<script>
148
+export default {
149
+  name: 'MakeOffer',
150
+  props: {
151
+    isMakeOffer: Boolean,
152
+    isProperty: Boolean,
153
+    item: Object,
154
+  },
155
+  data() {
156
+    return {
157
+      isDecline: false,
158
+    };
159
+  },
160
+  methods: {
161
+    SendOffer() {
162
+      // Save Offer data
163
+    },
164
+    Accept() {
165
+      // Accept Offer
166
+    },
167
+    Decline() {
168
+      this.isDecline = true;
169
+    },
170
+    Complete() {
171
+      this.isDecline = false;
172
+    },
173
+    Close() {},
174
+  },
175
+};
176
+</script>
177
+
178
+<style scoped>
179
+.myWell {
180
+  width: 100%;
181
+  background-color: rgba(217, 217, 217, 0.85);
182
+  border-radius: 6px;
183
+  padding: 5px;
184
+  margin: 3px;
185
+}
186
+</style>

+ 109
- 0
src/components/processFlow/offers.vue View File

@@ -0,0 +1,109 @@
1
+<template>
2
+  <!-- eslint-disable max-len -->
3
+  <div>
4
+    <div class="container">
5
+      <section class="intro-single">
6
+        <div class="container">
7
+          <div class="row">
8
+            <div class="col-md-12 col-lg-8">
9
+              <div class="title-single-box">
10
+                <h1 class="title-single">Bid Offers</h1>
11
+              </div>
12
+            </div>
13
+          </div>
14
+        </div>
15
+      </section>
16
+    </div>
17
+    <div class="container">
18
+      <table class="table table-bordered">
19
+        <thead>
20
+          <tr>
21
+            <th>Type</th>
22
+            <th>Description</th>
23
+            <th></th>
24
+          </tr>
25
+        </thead>
26
+        <tbody>
27
+          <tr v-for="(item, i) in items" :key="i">
28
+            <td v-if="item.isProperty">Property</td>
29
+            <td v-else>Timeshare</td>
30
+            <td>{{ item.uid }}</td>
31
+            <td>
32
+              <button
33
+                type="button"
34
+                class="btn btn-b-n"
35
+                data-toggle="modal"
36
+                :data-target="'#myModal' + i"
37
+              >View</button>
38
+              <div :id="'myModal' + i" class="modal fade" role="dialog">
39
+                <div class="modal-dialog modal-lg">
40
+                  <!-- Modal content-->
41
+                  <div class="modal-content">
42
+                    <div class="modal-header">
43
+                      <button type="button" class="close" data-dismiss="modal">&times;</button>
44
+                    </div>
45
+                    <div padding-left="20px">
46
+                      <makeOffer
47
+                        name="MakeOffer"
48
+                        :isMakeOffer="false"
49
+                        :isProperty="item.isProperty"
50
+                        :item="item"
51
+                      />
52
+                    </div>
53
+                  </div>
54
+                </div>
55
+              </div>
56
+            </td>
57
+          </tr>
58
+        </tbody>
59
+      </table>
60
+    </div>
61
+  </div>
62
+</template>
63
+
64
+<script>
65
+import makeOffer from './makeOffer.vue';
66
+
67
+export default {
68
+  name: 'offers',
69
+  components: { makeOffer },
70
+  data() {
71
+    return {
72
+      item: {},
73
+      items: [
74
+        {
75
+          isProperty: true,
76
+          uid: '1 - 2 Bedroom House',
77
+          id: 1,
78
+          shortDescription: '2 Bedroom House',
79
+          description: '<div><i>Property Description</i></div>',
80
+          price: 1000,
81
+          offer: 1500,
82
+          comments: 'Bla Bla Bla',
83
+        },
84
+        {
85
+          isProperty: false,
86
+          uid: 'NL N18 359',
87
+          id: 2,
88
+          shortDescription: '',
89
+          description: '',
90
+          price: 85000,
91
+          offer: 90000,
92
+          comments: 'I want to go....',
93
+          resort: 'Ngwenya Lodge',
94
+          unit: '359',
95
+          week: 'N18',
96
+          module: '359/N18 River View',
97
+        },
98
+      ],
99
+    };
100
+  },
101
+  //   methods: {
102
+  //     SetItem(data) {
103
+  //       this.item = data;
104
+  //       const element = this.$refs.modal.$el;
105
+  //       $(element).modal('show');
106
+  //     },
107
+  //   },
108
+};
109
+</script>

+ 28
- 0
src/components/property/propertyPage.vue View File

@@ -96,6 +96,32 @@
96 96
                     </ul>
97 97
                   </div>
98 98
                 </div>
99
+                <div class="col-md-12">
100
+                  <button
101
+                    type="button"
102
+                    class="btn btn-b-n"
103
+                    data-toggle="modal"
104
+                    data-target="#myModal"
105
+                  >Make an Offer</button>
106
+                  <div id="myModal" class="modal fade" role="dialog">
107
+                    <div class="modal-dialog modal-lg">
108
+                      <!-- Modal content-->
109
+                      <div class="modal-content">
110
+                        <div class="modal-header">
111
+                          <button type="button" class="close" data-dismiss="modal">&times;</button>
112
+                        </div>
113
+                        <div padding-left="20px">
114
+                          <makeOffer
115
+                            name="MakeOffer"
116
+                            :isMakeOffer="true"
117
+                            :isProperty="true"
118
+                            :item="{id: property.id, shortDescription: property.shortDescription, description: property.description, price: property.price}"
119
+                          />
120
+                        </div>
121
+                      </div>
122
+                    </div>
123
+                  </div>
124
+                </div>
99 125
                 <div class="col-md-12">
100 126
                   <div class="row section-t3">
101 127
                     <div class="col-sm-12">
@@ -229,11 +255,13 @@
229 255
 <script>
230 256
 import { mapState, mapActions } from 'vuex';
231 257
 import lightBox from '../shared/lightBoxGallery.vue';
258
+import makeOffer from '../processFlow/makeOffer.vue';
232 259
 
233 260
 export default {
234 261
   name: 'property',
235 262
   components: {
236 263
     lightBox,
264
+    makeOffer,
237 265
   },
238 266
   data() {
239 267
     return {};

+ 32
- 2
src/components/timeshare/resort/unitPage.vue View File

@@ -1,4 +1,5 @@
1 1
 <template>
2
+  <!-- eslint-disable max-len -->
2 3
   <section>
3 4
     <section class="intro-single">
4 5
       <div class="container">
@@ -114,10 +115,34 @@
114 115
 
115 116
             <button class="btn btn-b-c even-width mr-auto" type="submit">Enquire Now</button>
116 117
 
117
-            <a
118
+            <!-- <a
118 119
               class="btn btn-b-n even-width mr-auto"
119 120
               href="/share-transfer-initiation-for-purchaser/"
120
-            >Make an Offer</a>
121
+            >Make an Offer</a>-->
122
+            <button
123
+              type="button"
124
+              class="btn btn-b-n even-width mr-auto"
125
+              data-toggle="modal"
126
+              data-target="#myModal"
127
+            >Make an Offer</button>
128
+            <div id="myModal" class="modal fade" role="dialog">
129
+              <div class="modal-dialog modal-lg">
130
+                <!-- Modal content-->
131
+                <div class="modal-content">
132
+                  <div class="modal-header">
133
+                    <button type="button" class="close" data-dismiss="modal">&times;</button>
134
+                  </div>
135
+                  <div padding-left="20px">
136
+                    <makeOffer
137
+                      name="MakeOffer"
138
+                      :isMakeOffer="true"
139
+                      :isProperty="false"
140
+                      :item="{resort: resort.prName, unit: week.unit, week: week.week, module: week.module, price: week.price}"
141
+                    />
142
+                  </div>
143
+                </div>
144
+              </div>
145
+            </div>
121 146
 
122 147
             <a class="btn btn-b-c even-width mr-auto" href="javascript:history.back()">Back</a>
123 148
           </form>
@@ -140,8 +165,13 @@
140 165
 
141 166
 <script>
142 167
 import { mapState, mapActions } from 'vuex';
168
+import makeOffer from '../../processFlow/makeOffer.vue';
143 169
 
144 170
 export default {
171
+  name: 'unit',
172
+  components: {
173
+    makeOffer,
174
+  },
145 175
   props: {
146 176
     resortCode: {},
147 177
     weekId: {},

+ 13
- 0
src/router/index.js View File

@@ -36,6 +36,9 @@ import UnitPage from '../components/timeshare/resort/unitPage.vue';
36 36
 import ContactUs from '../components/misc/contactUs.vue';
37 37
 import PrivacyPolicy from '../components/misc/privacyPolicyPage.vue';
38 38
 
39
+import MakeOffer from '../components/processFlow/makeOffer.vue';
40
+import Offer from '../components/processFlow/offers.vue';
41
+
39 42
 Vue.use(Router);
40 43
 
41 44
 export default new Router({
@@ -197,5 +200,15 @@ export default new Router({
197 200
       component: UnitPage,
198 201
       props: true,
199 202
     },
203
+    {
204
+      path: '/MakeOffer',
205
+      name: 'MakeOffer',
206
+      component: MakeOffer,
207
+    },
208
+    {
209
+      path: '/Offers',
210
+      name: 'Offers',
211
+      component: Offer,
212
+    },
200 213
   ],
201 214
 });

Loading…
Cancel
Save