Skip to content

Commit

Permalink
Chore - add travel itinerary as another example
Browse files Browse the repository at this point in the history
  • Loading branch information
My Computer authored and My Computer committed Dec 22, 2017
1 parent b88ab27 commit 7edf483
Show file tree
Hide file tree
Showing 4 changed files with 234 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.DS_Store
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Only have **_relevant_** items in your checklist.

# The Problem:

Too many times I see release checklists full of items that **don't apply to this release.**
Too many times I see release checklists full of items that **don't apply to this release.**

This teachs and reinforces people to gloss over items, sometimes missing crucial tasks.

Expand All @@ -40,7 +40,7 @@ function questions(){
return [
{id:1,text:'Is there a downpage?',description:'',default:false}
];
}
}
```

Then tie the tasks to the question.
Expand All @@ -56,7 +56,7 @@ return [
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[],questionsAnyNo:[],role:'Developer',type:'Release',task:'Push Code'},
{questionsRequiredYes:[1],questionsRequiredNo:[],questionsAnyYes:[],questionsAnyNo:[],role:'Developer',type:'Release',task:'Remove Downpage'}
];
}
}
```


Expand Down
133 changes: 133 additions & 0 deletions examples/travel-checklist/checklist.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
<!doctype html>
<html ng-app="Checklist">

<head>
<link rel="stylesheet" type="text/css" href="../../lib/css/bootswatch.css">
<link rel="stylesheet" type="text/css" href="../../lib/css/checklist.css">
<script src="../../lib/js/jquery.js"></script>
<script src="../../lib/js/bootstrap.min.js"></script>
<script src="../../lib/js/angular.min.js"></script>
<script src="../../lib/ng-repeat-array/AngularRepeatArray.js"></script>

<!-- Add your config js file here -->
<script src="config.js"></script>
<!-- Add your config js file here -->

<script src="../../lib/js/checklist.js"></script>

<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>

<body class="container" ng-controller="Controller as checklist">

<ul class="nav nav-tabs">
<li class="active"><a href="#questions" data-toggle="tab" aria-expanded="false">Questions</a></li>
<li class=""><a href="#roles" data-toggle="tab" aria-expanded="false">Roles</a></li>
<li class=""><a href="#checklist" data-toggle="tab" aria-expanded="false">Checklist</a></li>
</ul>

<div id="myTabContent" class="tab-content">

<div class="tab-pane fade active in" id="questions">

<h1> {{checklist.questionsSectionTitle}} </h1>

<table class="table table-striped table-hover ">
<tbody>
<thead>
<tr>
<th>Question</th>
<th>Answer</th>
</tr>
</thead>

<tr ng-repeat="question in checklist.questions">
<td>
{{question.text}}
</td>
<td>
<button
class="btn btn-{{checklist.getBtnStyle(question)}}"
ng-click = "checklist.flipBtnStatus(question)">
{{checklist.getBtnText(question)}}
</button>
</ditdv>
</tr>
</tbody>
</table>

</div>
<div class="tab-pane fade in" id="roles">
<h1> {{checklist.rolesSectionTitle}} </h1>

<table class="table table-striped table-hover ">
<tbody>
<thead>
<tr>
<th>Role</th>
<th>Person</th>

</tr>
</thead>

<tr ng-repeat="role in checklist.roles">

<td>
<h4>{{role.role}}</h4>
</td>

<td>
<input ng-model =newObject[role.role].name ng-change="checklist.changeRoleValue(checklist.roles,'role',role,'name',newObject[role.role].name)"}></input>
</td>

<!-- Example if you wanted username as well -->
<!--<input ng-model =newObject[role.role].username ng-change="checklist.changeRoleValue(checklist.roles,'role',role,'username',newObject[role.role].username)"}></input>-->
</tr>
<tbody>
</table>
</div>
<div class="tab-pane fade in" id="checklist">
<h1> {{checklist.checklistSectionTitle}} </h1>
<hr>

<div ng-repeat="type in checklist.ngArrLoop(checklist.getTypes(),1) track by $index">
<table class="table table-striped table-hover ">
<thead>
<tr>
<th>Completed</th>
<th>Task</th>
<th>Owner</th>
</tr>
</thead>
<tr>
<td>
</td>
<td>
<h3>{{checklist.ngArrProp(checklist.getTypes(),$index,1,1,'value')}}</h3>
</td>
<td>
</td>
</tr>
<tr ng-repeat="item in checklist.getValidTasks(checklist.getTypes()[$index])">
<td>
<!-- If using jira just use html <li class="checkbox" data-inline-task-id="0"><span>&nbsp;</span></li> -->
<!-- If not using jira just use html <input type="checkbox"></input> -->
<input type="checkbox"></input>

</td>
<td>
{{item.task}}
</td>
<td class="text-right">
{{checklist.getOwnerProperty(checklist.roles,'role',item.role,'name')}}
</td>
</tr>
</table>
<br>
<br>
<br>
</div>
</div>
</div>
</body>
</html>
97 changes: 97 additions & 0 deletions examples/travel-checklist/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
function checklistSectionTitle() {
return "Travel Checklist";
}

function rolesSectionTitle() {
return "Fill Out Who Is Covering Each Role";;
}

function questionsSectionTitle() {
return "Travel Questionaire";
}

function questionTypes() {
return [
{value:'Day Before'},
{value:'Night Before'},
{value:'Day Of'}
];
}

function QuestonButtonText() {
var btnMapping = {
defaultFalse:'No',
defaultTrue:'Yes'
};
return btnMapping;
}

function roles() {
return [
{role:'Nick'},
{role:'Other'}
];
}

function questions() {
return [
{id:1,text:'Are you taking a plane?',description:'',default:false},
{id:2,text:'Do you have bread?',description:'',default:false}
];
}

function tasks(){
return [

{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Day Before',task:'Notify Any Mail Service You Are Going Away'},
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Day Before',task:'Wash Any Clothes You Want To Wear'},

// Travel
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Night Before',task:'Pack Suitcase'},
{questionsRequiredYes:[1],questionsRequiredNo:[],questionsAnyYes:[],questionsAnyNo:[],role:'Nick',type:'Night Before',task:'Take Screenshot / Print Boarding Pass'},
{questionsRequiredYes:[1],questionsRequiredNo:[],questionsAnyYes:[],questionsAnyNo:[],role:'Nick',type:'Night Before',task:'Set Out Keys / Phone'},

// Day Of Time Management
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Night Before',task:'Print An Itinerary https://cdn.rawgit.com/clickthisnick/itinerary/master/itinerary.html'},
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Night Before',task:'Set Alarm To Wake Up'},
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Night Before',task:'Set Alarm 5 Minutes Before Having To Leave'},
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Night Before',task:'Set Alarm At Time Have To Leave'},


// Tech For Tomorrow
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Night Before',task:'Charge Phone'},
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Night Before',task:'Charge Phone Battery Pack'},
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Night Before',task:'Charge Computer'},

// Cleanup Before Gone For Awhile
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Night Before',task:'Eat / Remove Perishable Fridgerator / Cupboard Items You Wont Eat Day Of Travel'},

// Phone
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Day Of',task:'Pack Phone Charger'},
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Day Of',task:'Pack Phone Charger Cord'},
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Day Of',task:'Pack Phone Battery Pack'},

// Bathroom
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Day Of',task:'Pack Toothbrush'},
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Day Of',task:'Pack Toothbrush Charger'},
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Day Of',task:'Pack Toothpaste'},
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Day Of',task:'Pack Floss'},
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Day Of',task:'Pack Hairgel'},
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Day Of',task:'Pack Retainer'},
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Day Of',task:'Pack Deordorant'},
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Day Of',task:'Pack Cologne'},
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Day Of',task:'Pack Face Trimmer'},

// Misc
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Day Of',task:'Pack Computer'},
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Day Of',task:'Pack Computer Charger'},
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Day Of',task:'Check You Have Drivers License'},
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Day Of',task:'Turn Off Air Conditioners / Heaters'},

// Clean Up
{questionsRequiredYes:[2],questionsRequiredNo:[],questionsAnyYes:[],questionsAnyNo:[],role:'Nick',type:'Day Of',task:'Put Any Bread In Freezer'},
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Day Of',task:'Eat / Remove Perishable Fridgerator / Cupboard Items'},
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Day Of',task:'Take Out Trash'},
{questionsRequiredYes:[],questionsRequiredNo:[],questionsAnyYes:[1],questionsAnyNo:[],role:'Nick',type:'Day Of',task:'Clean Sink'},
];
}

0 comments on commit 7edf483

Please sign in to comment.