Skip to content

Commit

Permalink
** add status field. Mark Natreum and 10K ( Anoka) as inactive.
Browse files Browse the repository at this point in the history
  • Loading branch information
senthilrajasek committed Sep 21, 2023
1 parent fb5170c commit ab4b91e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
7 changes: 6 additions & 1 deletion data.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
"friday": null,
"saturday": null
},
"status": "inactive",
"booker": {
"name": "Frankie Runquist",
"url": "https://www.facebook.com/frankie.runquist"
Expand Down Expand Up @@ -394,6 +395,8 @@
"name": "Grant Winkels",
"url": "https://www.facebook.com/grant.winkels"
}],
"city": "Minneapolis",
"status": "active",
"days": {
"sunday": null,
"monday": null,
Expand All @@ -407,13 +410,15 @@
"notes": "Open mic sign up from 6:00-7:00pm with the list posted at 7:15. First time trying stand-up at Sisyphus? Put a ⭐ by your name to guarantee stage time."
},
{
"name": "Thursday Night Stand-up Comedy!",
"name": "Thursday Night Stand-up Comedy! (On Hold)",
"venue": "10K Brewing, Anoka, MN",
"url": "https://10kbrew.com/",
"booker": {
"name": "Casey Flesch",
"url": "https://www.facebook.com/CaseyFleschComedy"
},
"city": "Anoka",
"status": "active",
"days": {
"sunday": null,
"monday": null,
Expand Down
15 changes: 11 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -176,17 +176,24 @@ <h2>{{day}}s</h2>

this.days.push.apply( this.days, this.days.splice(0, dayNum));
},
venue_lookup: function (day, city = 'twincities') {
venue_lookup: function (day, city = 'minneapolis', status = 'active') {
var isTwincities = function ( city){
var cities = [ 'minneapolis', 'st.paul', 'anoka']
return cities.includes( city.toLowerCase());
};
if( this.venues === null) {
return null;
}
let result = this.venues.filter(function (v) {
day = day.toLowerCase();
if (v.city == null) {
v.city = 'twincities';
v.city = 'minneapolis';
}
return v.days[day] && v.city == city;
})
if ( v.status == null) {
v.status = 'active';
}
return v.days[day] && isTwincities( v.city) && v.status == 'active' ;
});
if( result != null && Array.isArray( result) && result.length != 0) {
result.map( function( v) {
v.showtime = v.days[day];
Expand Down

0 comments on commit ab4b91e

Please sign in to comment.