You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

weekListComponent.vue 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <template>
  2. <div>
  3. <div v-if="filteredWeeks.length > 0">
  4. <table class="table table-bordered">
  5. <thead>
  6. <tr>
  7. <th>Province</th>
  8. <th>Resort</th>
  9. <th>Unit</th>
  10. <th>Week</th>
  11. <th>Arrival</th>
  12. <th>Departure</th>
  13. <th>Bedrooms</th>
  14. <th style="width:15%">Price</th>
  15. <!-- <th>Status</th> -->
  16. <th>Interested</th>
  17. </tr>
  18. </thead>
  19. <tbody>
  20. <tr v-for="(item, i) in filteredWeeks" :key="i">
  21. <td>{{item.region ? item.region.regionName : ''}}</td>
  22. <td>{{item.resort ? item.resort.resortName : ''}}</td>
  23. <td>{{item.unitNumber}}</td>
  24. <td>{{item.weekNumber}}</td>
  25. <td>{{item.arrivalDate | toDate}}</td>
  26. <td>{{item.departureDate | toDate}}</td>
  27. <td>{{item.bedrooms}}</td>
  28. <td>{{item.sellPrice | toCurrency}}</td>
  29. <!-- <td>{{item.status ? item.status.description : ''}}</td> -->
  30. <td>
  31. <div class="col-md-12">
  32. <button
  33. type="button"
  34. class="btn btn-b-n"
  35. data-toggle="modal"
  36. data-target="#myModal"
  37. >Make an Offer</button>
  38. <div id="myModal" 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="true"
  49. :isProperty="false"
  50. :item="item"
  51. />
  52. </div>
  53. </div>
  54. </div>
  55. </div>
  56. </div>
  57. </td>
  58. </tr>
  59. </tbody>
  60. </table>
  61. </div>
  62. <div v-else>
  63. <div class="row">
  64. <div class="col-md-12">
  65. <hr />No Results Found
  66. <hr />
  67. </div>
  68. </div>
  69. </div>
  70. </div>
  71. </template>
  72. <script>
  73. import { mapState, mapActions, mapGetters } from 'vuex';
  74. import makeOffer from '../../processFlow/makeOffer.vue';
  75. export default {
  76. props: {
  77. resortCode: undefined,
  78. },
  79. components: {
  80. makeOffer,
  81. },
  82. computed: {
  83. ...mapState('weekList', ['weeks']),
  84. ...mapGetters({
  85. filteredWeeks: 'weekList/filteredWeeks',
  86. }),
  87. },
  88. mounted() {
  89. if (this.resortCode) {
  90. this.applyResortFilter(this.resortCode);
  91. }
  92. this.getWeeks();
  93. },
  94. methods: {
  95. ...mapActions('weekList', ['getWeeks', 'applyResortFilter']),
  96. },
  97. };
  98. </script>
  99. <style>
  100. </style>