|
@@ -289,13 +289,30 @@
|
289
|
289
|
<div class="section-header" style="margin-top:50px">
|
290
|
290
|
<h2>Detailed Individual Information</h2>
|
291
|
291
|
</div>
|
|
292
|
+
|
292
|
293
|
<div class="form">
|
|
294
|
+ <div v-if="ROLE === 'Super Admin'" class="row mb-4">
|
|
295
|
+ <div class="col">
|
|
296
|
+ <float-label label="SELECT OWNER" fixed>
|
|
297
|
+ <select
|
|
298
|
+ v-model="weekParam.ownerId"
|
|
299
|
+ class="form-control uniSelect mt-3"
|
|
300
|
+ @change="updateCurrentUser()"
|
|
301
|
+ >
|
|
302
|
+ <option v-for="indiv in individuals" :key="indiv.id" :value="indiv.id">{{
|
|
303
|
+ indiv.fullName
|
|
304
|
+ }}</option>
|
|
305
|
+ </select>
|
|
306
|
+ </float-label>
|
|
307
|
+ </div>
|
|
308
|
+ </div>
|
293
|
309
|
<div class="row">
|
294
|
310
|
<div class="form-group col-md-6">
|
295
|
311
|
<float-label>
|
296
|
312
|
<input
|
297
|
313
|
type="text"
|
298
|
314
|
name="name"
|
|
315
|
+ disabled
|
299
|
316
|
class="form-control"
|
300
|
317
|
id="name"
|
301
|
318
|
placeholder="Name"
|
|
@@ -311,6 +328,7 @@
|
311
|
328
|
<float-label>
|
312
|
329
|
<input
|
313
|
330
|
type="text"
|
|
331
|
+ disabled
|
314
|
332
|
class="form-control"
|
315
|
333
|
name="surname"
|
316
|
334
|
id="surname"
|
|
@@ -328,6 +346,7 @@
|
328
|
346
|
<float-label>
|
329
|
347
|
<input
|
330
|
348
|
type="text"
|
|
349
|
+ disabled
|
331
|
350
|
name="idnum"
|
332
|
351
|
class="form-control"
|
333
|
352
|
id="idnum"
|
|
@@ -344,6 +363,7 @@
|
344
|
363
|
<float-label>
|
345
|
364
|
<input
|
346
|
365
|
type="text"
|
|
366
|
+ disabled
|
347
|
367
|
class="form-control"
|
348
|
368
|
name="company"
|
349
|
369
|
id="company"
|
|
@@ -362,6 +382,7 @@
|
362
|
382
|
<float-label>
|
363
|
383
|
<input
|
364
|
384
|
type="text"
|
|
385
|
+ disabled
|
365
|
386
|
class="form-control"
|
366
|
387
|
name="email"
|
367
|
388
|
id="email"
|
|
@@ -379,6 +400,7 @@
|
379
|
400
|
<float-label>
|
380
|
401
|
<input
|
381
|
402
|
type="text"
|
|
403
|
+ disabled
|
382
|
404
|
name="cell"
|
383
|
405
|
class="form-control"
|
384
|
406
|
id="cell"
|
|
@@ -395,6 +417,7 @@
|
395
|
417
|
<float-label>
|
396
|
418
|
<input
|
397
|
419
|
type="text"
|
|
420
|
+ disabled
|
398
|
421
|
class="form-control"
|
399
|
422
|
name="landline"
|
400
|
423
|
id="landline"
|
|
@@ -513,7 +536,8 @@ export default {
|
513
|
536
|
dateParam: {},
|
514
|
537
|
depDateParam: {},
|
515
|
538
|
pubDateParam: {},
|
516
|
|
- boolAwaitingPayment: false
|
|
539
|
+ boolAwaitingPayment: false,
|
|
540
|
+ selectedUser: ""
|
517
|
541
|
};
|
518
|
542
|
},
|
519
|
543
|
components: {
|
|
@@ -560,6 +584,7 @@ export default {
|
560
|
584
|
},
|
561
|
585
|
created() {
|
562
|
586
|
this.initTimeshare(this.weekId);
|
|
587
|
+ this.getIndividuals();
|
563
|
588
|
},
|
564
|
589
|
computed: {
|
565
|
590
|
...mapState("timeshare", [
|
|
@@ -585,6 +610,7 @@ export default {
|
585
|
610
|
person: "authentication/getPerson"
|
586
|
611
|
}),
|
587
|
612
|
...mapState("bank", ["banks"]),
|
|
613
|
+ ...mapState("register", ["individuals", "removeIndividual"]),
|
588
|
614
|
...mapGetters("fees", ["getListingFee"]),
|
589
|
615
|
refAgent() {
|
590
|
616
|
return this.sellItem && this.sellItem.referedByAgent;
|
|
@@ -618,10 +644,26 @@ export default {
|
618
|
644
|
...mapActions("bank", ["getBanks"]),
|
619
|
645
|
...mapActions("myWeeks", ["getItems", "getWeek", "editSave"]),
|
620
|
646
|
...mapActions("status", ["getStatusList"]),
|
|
647
|
+ ...mapActions("register", ["getIndividuals", "deleteIndividual"]),
|
621
|
648
|
newSale() {
|
622
|
649
|
this.weekId = 0;
|
623
|
650
|
this.getBlankWeek();
|
624
|
651
|
},
|
|
652
|
+ updateCurrentUser() {
|
|
653
|
+ this.individuals.forEach(indiv => {
|
|
654
|
+ if (this.weekParam.ownerId === indiv.id) {
|
|
655
|
+ console.log(indiv);
|
|
656
|
+ this.week.owner.name = indiv.name;
|
|
657
|
+ this.week.owner.surname = indiv.surname;
|
|
658
|
+ this.week.owner.idNumer = indiv.idNumber;
|
|
659
|
+ this.week.owner.companyRegNumber = indiv.companyRegNumber;
|
|
660
|
+ this.week.owner.emailAddress = indiv.email;
|
|
661
|
+ this.week.owner.cellNumber = indiv.cellNumber;
|
|
662
|
+ this.week.owner.landlineNumber = indiv.telephone;
|
|
663
|
+ console.log(this.week.owner);
|
|
664
|
+ }
|
|
665
|
+ });
|
|
666
|
+ },
|
625
|
667
|
saveEdit() {
|
626
|
668
|
this.regions.forEach(region => {
|
627
|
669
|
if (region.regionCode === this.selectedRegion) {
|
|
@@ -651,10 +693,10 @@ export default {
|
651
|
693
|
}
|
652
|
694
|
});
|
653
|
695
|
if (this.week.owner.cellNumber === "") {
|
654
|
|
- this.week.owner.cellNumber = "0000000000";
|
|
696
|
+ delete this.week.owner.cellNumber;
|
655
|
697
|
}
|
656
|
698
|
if (this.week.owner.telephone === "") {
|
657
|
|
- this.week.owner.telephone = "0000000000";
|
|
699
|
+ delete this.week.owner.telephone;
|
658
|
700
|
}
|
659
|
701
|
this.weekParam.arrivalDate = new Date(this.dateParam).toISOString().substring(0, 10);
|
660
|
702
|
this.weekParam.departureDate = new Date(this.depDateParam).toISOString().substring(0, 10);
|