Skip to content

Commit

Permalink
Added a new campground type
Browse files Browse the repository at this point in the history
  • Loading branch information
jasondbca committed Mar 14, 2023
1 parent 76c1510 commit 89303bd
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
7 changes: 6 additions & 1 deletion parkstay/frontend/searchavail/src/parkfinder.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,18 @@
Operated by Parks and Wildlife partner
</div>

<div class='slick-slide-card-notavailabile' v-else-if="f.campground_type == 4" >
Booking by application
</div>


<div v-else ><div>&nbsp;</div></div>
<p v-if="f.price_hint && Number(f.price_hint)"><i><small>From ${{ f.price_hint }} per night</small></i></p>
<!-- This line has to be changed to use a v-if/else clause
Changed again to utilize changes in api to further enable forwarding offline sites to availability app
-->
<a v-if="(f.campground_type == 0 && campgroundAvailablity[f.id].total_bookable) > 0 && (booking_arrival_days <= f.max_advance_booking || permission_to_make_advanced_booking == true)" class="button formButton1" style="width:100%;" v-bind:href="parkstayUrl+'/search-availability/campground/?site_id='+f.id+'&'+bookingParam" target="_self">Book now</a>
<a v-else-if="f.campground_type == 1" class="button formButton" style="width:100%;" v-bind:href="parkstayUrl+'/search-availability/campground/?site_id='+f.id+'&'+bookingParam" target="_blank">More Info</a>
<a v-else-if="f.campground_type == 1 || f.campground_type == 4" class="button formButton" style="width:100%;" v-bind:href="parkstayUrl+'/search-availability/campground/?site_id='+f.id+'&'+bookingParam" target="_blank">More Info</a>
<a v-else class="button formButton2" v-bind:href="parkstayUrl+'/search-availability/campground/?site_id='+f.id+'&'+bookingParam" style="width:100%;" target="_blank">More info</a>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions parkstay/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ class Campground(models.Model):
(1, 'Not Bookable Online'),
(2, 'Other Accomodation'),
(3, 'Unpublished'),
(4, 'Booking by application')
)
CAMPGROUND_PRICE_LEVEL_CHOICES = (
(0, 'Campground level'),
Expand Down
2 changes: 1 addition & 1 deletion parkstay/static/searchavail/js/map.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
git+https://github.com/dbca-wa/webtemplate2.git#egg=webtemplate_dbca
git+https://github.com/dbca-wa/[email protected]#egg=dbca-utils
psycopg2-binary==2.8.5
Django==3.2.16
Django==3.2.18
django-extensions==1.9.8
ipython==7.19.0
social-auth-app-django==2.1.0
Expand Down

0 comments on commit 89303bd

Please sign in to comment.