|
@@ -10,9 +10,7 @@
|
10
|
10
|
class="btn btn-b-n"
|
11
|
11
|
style="width: 150px; height:40px;"
|
12
|
12
|
data-dismiss="modal"
|
13
|
|
- >
|
14
|
|
- OK
|
15
|
|
- </button>
|
|
13
|
+ >OK</button>
|
16
|
14
|
</div>
|
17
|
15
|
<div v-else>
|
18
|
16
|
<div v-if="!isSaved">
|
|
@@ -84,27 +82,26 @@
|
84
|
82
|
<div v-if="!isSaved" class="container">
|
85
|
83
|
<div class="row">
|
86
|
84
|
<div algin="center" class="col">
|
87
|
|
- <button v-if="isMakeOffer" type="button" @click="SendOffer()" class="btn-solid-blue">
|
88
|
|
- Send Offer
|
89
|
|
- </button>
|
|
85
|
+ <button
|
|
86
|
+ v-if="isMakeOffer"
|
|
87
|
+ type="button"
|
|
88
|
+ @click="SendOffer()"
|
|
89
|
+ class="btn-solid-blue"
|
|
90
|
+ >Send Offer</button>
|
90
|
91
|
<button
|
91
|
92
|
v-if="!isMakeOffer && !isDecline && canEdit"
|
92
|
93
|
type="submit"
|
93
|
94
|
@click="Accept()"
|
94
|
95
|
class="btn btn-b-n"
|
95
|
96
|
style="width: 150px; height:40px;"
|
96
|
|
- >
|
97
|
|
- Accept
|
98
|
|
- </button>
|
|
97
|
+ >Accept</button>
|
99
|
98
|
<button
|
100
|
99
|
v-if="!isMakeOffer && !isDecline && canEdit"
|
101
|
100
|
type="button"
|
102
|
101
|
@click="Decline()"
|
103
|
102
|
class="btn btn-b-n"
|
104
|
103
|
style="width: 150px; height:40px;"
|
105
|
|
- >
|
106
|
|
- Decline
|
107
|
|
- </button>
|
|
104
|
+ >Decline</button>
|
108
|
105
|
</div>
|
109
|
106
|
</div>
|
110
|
107
|
</div>
|
|
@@ -126,9 +123,7 @@
|
126
|
123
|
@click="Complete()"
|
127
|
124
|
class="btn btn-b-n"
|
128
|
125
|
style="width: 150px; height:40px;"
|
129
|
|
- >
|
130
|
|
- Complete
|
131
|
|
- </button>
|
|
126
|
+ >Complete</button>
|
132
|
127
|
<div v-if="isSaved">
|
133
|
128
|
<div class="form-group row">
|
134
|
129
|
<br />
|
|
@@ -142,9 +137,7 @@
|
142
|
137
|
class="btn btn-b-n"
|
143
|
138
|
style="width: 150px; height:40px;"
|
144
|
139
|
data-dismiss="modal"
|
145
|
|
- >
|
146
|
|
- OK
|
147
|
|
- </button>
|
|
140
|
+ >OK</button>
|
148
|
141
|
</div>
|
149
|
142
|
</div>
|
150
|
143
|
</div>
|
|
@@ -163,7 +156,7 @@ export default {
|
163
|
156
|
canEdit: Boolean,
|
164
|
157
|
item: Object,
|
165
|
158
|
bidId: Number,
|
166
|
|
- updateItem: Function
|
|
159
|
+ updateItem: Function,
|
167
|
160
|
},
|
168
|
161
|
data() {
|
169
|
162
|
return {
|
|
@@ -171,28 +164,30 @@ export default {
|
171
|
164
|
isSaved: false,
|
172
|
165
|
message: "",
|
173
|
166
|
isInfo: true,
|
174
|
|
- isLoggedIn: Log.isLoggedIn()
|
|
167
|
+ isLoggedIn: Log.isLoggedIn(),
|
175
|
168
|
};
|
176
|
169
|
},
|
177
|
170
|
methods: {
|
178
|
|
- ...mapActions("bid", ["getBid", "saveBid", "acceptBid", "declineBid"]),
|
|
171
|
+ ...mapActions("bid", ["getTemplate", "saveBid", "acceptBid", "declineBid"]),
|
179
|
172
|
SendOffer() {
|
180
|
|
- alert("Under Development");
|
181
|
|
- // this.getBid(0);
|
182
|
|
- // this.bidItem.id = 0;
|
183
|
|
- // this.bidItem.amount = this.item.offer;
|
184
|
|
- // this.bidItem.comment = this.item.comment;
|
185
|
|
- // if (this.isProperty) {
|
186
|
|
- // this.bidItem.propertyId = this.item.id;
|
187
|
|
- // } else {
|
188
|
|
- // this.bidItem.timeshareWeekId = this.item.id;
|
189
|
|
- // }
|
190
|
|
- // this.saveBid(this.bidItem);
|
|
173
|
+ //alert("Under Development");
|
|
174
|
+ this.bidItem.id = 0;
|
|
175
|
+
|
|
176
|
+ this.bidItem.amount = this.item.offer;
|
|
177
|
+ this.bidItem.comment = this.item.comment;
|
|
178
|
+ if (this.isProperty) {
|
|
179
|
+ this.bidItem.propertyId = this.item.id;
|
|
180
|
+ } else {
|
|
181
|
+ this.bidItem.timeshareWeekId = this.item.id;
|
|
182
|
+ if (this.item.isTender) {
|
|
183
|
+ this.bidItem.tenderWeek = this.item;
|
|
184
|
+ }
|
|
185
|
+ }
|
|
186
|
+ this.saveBid(this.bidItem);
|
191
|
187
|
|
192
|
|
- // this.item = [];
|
193
|
|
- // this.isSaved = true;
|
194
|
|
- // this.message = "Offer was submitted.";
|
195
|
|
- // this.isInfo = true;
|
|
188
|
+ this.isSaved = true;
|
|
189
|
+ this.isInfo = true;
|
|
190
|
+ this.message = "Offer was submitted.";
|
196
|
191
|
},
|
197
|
192
|
Accept() {
|
198
|
193
|
this.acceptBid(this.item.id);
|
|
@@ -208,24 +203,27 @@ export default {
|
208
|
203
|
|
209
|
204
|
const decline = {
|
210
|
205
|
id: this.item.id,
|
211
|
|
- comment: this.item.declineReason
|
|
206
|
+ comment: this.item.declineReason,
|
212
|
207
|
};
|
213
|
208
|
|
214
|
209
|
this.declineBid(decline);
|
215
|
210
|
this.isSaved = true;
|
216
|
211
|
this.message = "Offer Declined.";
|
217
|
212
|
this.isInfo = false;
|
218
|
|
- }
|
|
213
|
+ },
|
219
|
214
|
},
|
220
|
215
|
computed: {
|
221
|
|
- ...mapState("bid", ["bidIt,em"])
|
|
216
|
+ ...mapState("bid", ["bidItem"]),
|
|
217
|
+ },
|
|
218
|
+ mounted() {
|
|
219
|
+ this.getTemplate();
|
222
|
220
|
},
|
223
|
221
|
watch: {
|
224
|
222
|
item() {
|
225
|
223
|
this.isSaved = false;
|
226
|
224
|
this.canEdit = this.item.statusCode === "E1";
|
227
|
|
- }
|
228
|
|
- }
|
|
225
|
+ },
|
|
226
|
+ },
|
229
|
227
|
};
|
230
|
228
|
</script>
|
231
|
229
|
|