diff --git a/README.md b/README.md index bf0a20a..99456fe 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,14 @@ # MinWageCalc For calculating the minimum wage +# Useful Links + +* Municipal Code: https://www.municode.com/library/wa/seattle/codes/municipal_code?nodeId=TIT14HURI_CH14.19MIWAMICORAEMPEWOSE +* Definitions: https://www.municode.com/library/wa/seattle/codes/municipal_code?nodeId=TIT14HURI_CH14.19MIWAMICORAEMPEWOSE_14.19.010DE +* PDF of the Ordinance: http://www.seattle.gov/council/issues/minimumwage/attachments/Ord_124490.pdf +* Mayor Murray's summary: http://murray.seattle.gov/minimumwage/ +* City Council Committee's summary: http://www.seattle.gov/council/issues/MinimumWage/default.html + # Building Releases ## Android diff --git a/platforms/browser/build/package.zip b/platforms/browser/build/package.zip index 023952d..84b9c66 100644 Binary files a/platforms/browser/build/package.zip and b/platforms/browser/build/package.zip differ diff --git a/platforms/browser/www/index.html b/platforms/browser/www/index.html index 59322ee..4ad8d20 100644 --- a/platforms/browser/www/index.html +++ b/platforms/browser/www/index.html @@ -16,7 +16,8 @@ @@ -52,8 +64,41 @@

What should your hourly wage be?

{{/each}}
Are you making less than this per hour? You may be a victim of wage theft. Please take action and:
- Report It! + Report It! +
Further Reading:
+ Full Text of the Ordinance + Office of Labor Standards + + + + + + @@ -69,6 +114,10 @@

What should your hourly wage be?

+ + + + diff --git a/platforms/browser/www/js/DefinitionsView.js b/platforms/browser/www/js/DefinitionsView.js new file mode 100644 index 0000000..131ecd8 --- /dev/null +++ b/platforms/browser/www/js/DefinitionsView.js @@ -0,0 +1,20 @@ +var DefinitionsView = function (definitionService) { + this.initialize = function () { + // Define a div wrapper for the view (used to attach events) + this.$el = $('
'); + this.render(); + }; + + this.render = function() { + var definitions = definitionService.getDefinitions(); + for(var i in definitions){ + definitions[i].id = i.replace(/\s/g,"-"); + definitions[i].text = i; + } + this.$el.html(this.template(definitions)); + return this; + }; + + this.initialize(); +} + diff --git a/platforms/browser/www/js/NoteView.js b/platforms/browser/www/js/NoteView.js new file mode 100644 index 0000000..84bab3c --- /dev/null +++ b/platforms/browser/www/js/NoteView.js @@ -0,0 +1,14 @@ +var NoteView = function(note) { + this.initialize = function() { + this.$el = $('
'); + this.render(); + }; + + this.render = function() { + this.$el.html(this.template(note)); + return this; + }; + + this.initialize(); +} + diff --git a/platforms/browser/www/js/QuestionView.js b/platforms/browser/www/js/QuestionView.js index 44ebd38..a7d3903 100644 --- a/platforms/browser/www/js/QuestionView.js +++ b/platforms/browser/www/js/QuestionView.js @@ -1,8 +1,11 @@ -var QuestionView = function(question, answerService) { +var QuestionView = function(question, answerService, definitionService) { + var definitionsView; this.initialize = function() { this.$el = $('
'); + definitionsView = new DefinitionsView(definitionService); this.$el.on('click', '.answer', this.saveAnswer); + this.render(); }; this.saveAnswer = function(event) { @@ -14,6 +17,7 @@ var QuestionView = function(question, answerService) { this.render = function() { this.$el.html(this.template(question)); + $('.definitions', this.$el).html(definitionsView.$el); return this; }; diff --git a/platforms/browser/www/js/app.js b/platforms/browser/www/js/app.js index f95c4e8..d010ef3 100755 --- a/platforms/browser/www/js/app.js +++ b/platforms/browser/www/js/app.js @@ -5,14 +5,18 @@ HomeView.prototype.template = Handlebars.compile($("#home-tpl").html()); QuestionView.prototype.template = Handlebars.compile($("#question-tpl").html()); ResultView.prototype.template = Handlebars.compile($("#result-tpl").html()); + DefinitionsView.prototype.template = Handlebars.compile($('#definitions-tpl').html()); + NoteView.prototype.template = Handlebars.compile($('#note-tpl').html()); var slider = new PageSlider($('body')); var questionService = new QuestionService(); var answerService = new AnswerService(); var wageService = new WageService(); + var definitionService = new DefinitionService(); + var noteService = new NoteService(); - $.when([questionService.initialize(), answerService.initialize(), wageService.initialize()]).done(function() { + $.when([questionService.initialize(), answerService.initialize(), wageService.initialize(), definitionService.initialize(), noteService.initialize()]).done(function() { router.addRoute('', function() { slider.slidePage(new HomeView(answerService).render().$el); }); @@ -32,7 +36,13 @@ router.addRoute('question/:id', function(id) { questionService.findById(id).done(function(question) { - slider.slidePage(new QuestionView(question, answerService).render().$el); + slider.slidePage(new QuestionView(question, answerService, definitionService).render().$el); + }); + }); + + router.addRoute('note/:id', function(id) { + noteService.findById(id).done(function(note) { + slider.slidePage(new NoteView(note).render().$el); }); }); diff --git a/platforms/browser/www/js/services/memory/DefinitionService.js b/platforms/browser/www/js/services/memory/DefinitionService.js new file mode 100644 index 0000000..fd23d34 --- /dev/null +++ b/platforms/browser/www/js/services/memory/DefinitionService.js @@ -0,0 +1,93 @@ +var DefinitionService = function() { + this.initialize = function() { + // No Initialization required + var deferred = $.Deferred(); + deferred.resolve(); + return deferred.promise(); + } + + this.findByWord = function(word) { + return definitions[word.toLowerCase()]; + } + + this.getDefinitions = function() { + return definitions; + } + + var definitions = { + "actuarial value": { + "text": "the percentage of total average costs for covered benefits that a health benefits package will cover;" + }, + "bonuses": { + "text": "non-discretionary payments in addition to hourly, salary, commission, or piece-rate payments paid under an agreement between the employer and employee;" + }, + "commissions": { + "text": "a sum of money paid to an employee upon completion of a task, usually selling a certain amount of goods or services;" + }, + "department": { + "text": "the Department of Finance and Administrative Services;" + }, + "director": { + "text": "the Director of the Department of Finance and Administrative Services, or his or her designee;" + }, + "employ": { + "text": "to permit to work;" + }, + "employee": { + "text": "\"employee,\" as defined under Section 12A.28.200<\/a> . Employee does not include individuals performing services under a work study agreement;" + }, + "employer": { + "text": "any individual, partnership, association, corporation, business trust, or any person or group of persons acting directly or indirectly in the interest of an employer in relation to an employee;" + }, + "franchise": { + "text": "a written agreement by which:", + "children": [ + {"text": "A person is granted the right to engage in the business of offering, selling, or distributing goods or services under a marketing plan prescribed or suggested in substantial part by the grantor or its affiliate;"}, + {"text": "The operation of the business is substantially associated with a trademark, service mark, trade name, advertising, or other commercial symbol; designating, owned by, or licensed by the grantor or its affiliate; and"}, + {"text": "The person pays, agrees to pay, or is required to pay, directly or indirectly, a franchise fee;"} + ] + }, + "franchisee": { + "text": "a person to whom a franchise is offered or granted;" + }, + "franchisor": { + "text": "a person who grants a franchise to another person;" + }, + "hearing Examiner": { + "text": "the official appointed by the Council and designated as the Hearing Examiner, or that person's designee (Deputy Hearing Examiner, Hearing Examiner Pro Tem, etc.);" + }, + "hourly minimum compensation": { + "text": "the minimum compensation due to an employee for each hour worked during a pay period;" + }, + "hourly minimum wage": { + "text": "the minimum wage due to an employee for each hour worked during a pay period;" + }, + "medical benefits plan": { + "text": "a silver or higher level essential health benefits package, as defined in 42 U.S.C. \u00a7 18022, or an equivalent plan that is designed to provide benefits that are actuarially equivalent to 70 percent of the full actuarial value of the benefits provided under the plan, whichever is greater;" + }, + "minimum compensation": { + "text": "the minimum wage in addition to tips actually received by the employee and reported to the Internal Revenue Service, and money paid by the employer towards an individual employee's medical benefits plan;" + }, + "minimum wage": { + "text": "all wages, commissions, piece-rate, and bonuses actually received by the employee and reported to the Internal Revenue Service;" + }, + "piece-rate": { + "text": "a price paid per unit of work;" + }, + "rate of inflation": { + "text": "the Consumer Price Index annual percent change for urban wage earners and clerical workers, termed CPI-W, or a successor index, for the twelve months prior to each September 1st as calculated by the United States Department of Labor;" + }, + "schedule 1 employer": { + "text": "all employers that employ more than 500 employees in the United States, regardless of where those employees are employed in the United States, and all franchisees associated with a franchisor or a network of franchises with franchisees that employ more than 500 employees in aggregate in the United States;" + }, + "schedule 2 employer": { + "text": "all employers that employ 500 or fewer employees regardless of where those employees are employed in the United States. Schedule 2 employers do not include franchisees associated with a franchisor or a network of franchises with franchisees that employ more than 500 employees in aggregate in the United States;" + }, + "tips": { + "text": "a verifiable sum to be presented by a customer as a gift or gratuity in recognition of some service performed for the customer by the employee receiving the tip;" + }, + "wage": { + "text": "compensation due to an employee by reason of employment, payable in legal tender of the United States or checks on banks convertible into cash on demand at full face value, subject to such deductions, charges, or allowances as may be permitted by rules of the Director. Commissions, piece-rate, and bonuses are included in wages. Tips and employer payments toward a medical benefits plan do not constitute wages for purposes of this Chapter." + }, + } +}; diff --git a/platforms/browser/www/js/services/memory/NoteService.js b/platforms/browser/www/js/services/memory/NoteService.js new file mode 100644 index 0000000..dc6a59f --- /dev/null +++ b/platforms/browser/www/js/services/memory/NoteService.js @@ -0,0 +1,48 @@ +var NoteService = function() { + + this.initialize = function() { + // No Initialization required + var deferred = $.Deferred(); + deferred.resolve(); + return deferred.promise(); + } + + this.findById = function(id) { + var deferred = $.Deferred(); + var note = null; + var l = notes.length; + for (var i=0; i < l; i++) { + if (notes[i].id == id) { + note = notes[i]; + break; + } + } + deferred.resolve(note); + return deferred.promise(); + } + + var notes = [ + { + "id": "part-time-seattle", + "title":"Part Time in Seattle", + "text": ["Employees should receive the minimum wage for each hour worked within the geographic boundaries of Seattle, provided that an employee who performs work in Seattle on an occasional basis should receive the appropriate minimum wage in a two-week period only if the employee performs more than two hours of work for an employer within Seattle during that two-week period.","Time spent in Seattle solely for the purpose of travelling through Seattle from a point of origin outside Seattle to a destination outside Seattle, with no employment-related or commercial stops in Seattle except for refueling or the employee's personal meals or errands, are not included."], + "ordinance": { "section": "A", "href": "https://www.municode.com/library/wa/seattle/codes/municipal_code?nodeId=TIT14HURI_CH14.19MIWAMICORAEMPEWOSE_14.19.020EMSEEMSCDE" }, + "next":"#question/number-employees", + "skip": function(answers) { + return false + } + }, + { + "id": "minimum-compensation", + "title":"Minimum Compensation", + "text":["Employers can meet the applicable hourly minimum compensation requirement through wages (including applicable commissions, piece-rate, and bonuses), tips and money paid by an employer towards an individual employee's medical benefits plan, provided that the Schedule 2 employer also meets the applicable hourly minimum wage requirements."], + "ordinance": { "section":"B", "href": "https://www.municode.com/library/wa/seattle/codes/municipal_code?nodeId=TIT14HURI_CH14.19MIWAMICORAEMPEWOSE_14.19.050HOMICOCH2EM"}, + "next":"#results", + "skip": function(answers) { + return answers["health-insurance"] == "yes" || answers["tips"] == "yes"; + } + }, + ]; + +} + diff --git a/platforms/browser/www/js/services/memory/QuestionService.js b/platforms/browser/www/js/services/memory/QuestionService.js index a79d7a7..2f4cebf 100755 --- a/platforms/browser/www/js/services/memory/QuestionService.js +++ b/platforms/browser/www/js/services/memory/QuestionService.js @@ -14,7 +14,6 @@ var QuestionService = function() { for (var i=0; i < l; i++) { if (questions[i].id == id) { question = questions[i]; - console.log("Returning question: " + question); break; } } @@ -25,19 +24,32 @@ var QuestionService = function() { var questions = [ {"id": "work-seattle", "summary":"Employed in Seattle", "prompt":"Is your place of employment located in Seattle?", choices:[ {"next": "#question/number-employees", "value": "yes", "text": "Yes"}, - {"next": "#results", "value": "no", "text": "No"} + {"next": "#results", "value": "no", "text": "No"}, + {"next": "#note/part-time-seattle", "value": "yes", "text": "Sometimes"}, + {"next": "#question/methods-for-determining-in-seattle", "value": "", "text": "I Don't Know"} + ]}, + {"id": "methods-for-determining-in-seattle", "summary":"Employed in Seattle?", "prompt":"Choose one of these methods to determine if you are employed in Seattle?", choices:[ + {"next": "#employer-determination/nearby", "text": "Choose from Nearest 20 Businesses"}, + {"next": "#employer-determination/address", "text": "Enter The Address Where You Work"}, + {"next": "#employer-determination/business-name", "text": "Enter Business Name"}, + {"next": "#employer-determination/top-50", "text": "Choose From Top 50 Employers In The State"}, + {"next": "#employer-determination/map", "text": "Indicate Where You Work On A Map"}, ]}, {"id": "number-employees", "summary":"Number of Employees", "prompt":"How many people work at your employer across the USA?", choices:[ - {"next": "#question/min-compensation", "value": "1-500", "text": "1 - 500"}, + {"next": "#question/health-insurance", "value": "1-500", "text": "1 - 500"}, {"next": "#question/medical-benefits", "value": ">500", "text": "Over 500"} ]}, {"id": "medical-benefits", "summary":"Medical Benefits", "prompt":"Does your employer provide medical benefits to you?", choices:[ {"next": "#results", "value": "yes", "text": "Yes"}, {"next": "#results", "value": "no", "text": "No"} ]}, - {"id": "min-compensation", "summary":"Minimum Compensation", "prompt":"Does your employer provide minimum compensation?", choices:[ - {"next": "#results", "value": "yes", "text": "Yes"}, - {"next": "#results", "value": "no", "text": "No"} + {"id": "health-insurance", "summary":"Health Insurance", "prompt":"Does your employer pay for any of your health insurance?", choices:[ + {"next": "#question/tips", "value": "yes", "text": "Yes"}, + {"next": "#question/tips", "value": "no", "text": "No"} + ]}, + {"id": "tips", "summary":"Tips", "prompt":"Do you receive tips?", choices:[ + {"next": "#note/minimum-compensation", "value": "yes", "text": "Yes"}, + {"next": "#note/minimum-compensation", "value": "no", "text": "No"} ]}, ]; diff --git a/www/index.html b/www/index.html index 59322ee..7eb06b6 100644 --- a/www/index.html +++ b/www/index.html @@ -16,7 +16,8 @@ @@ -52,8 +64,41 @@

What should your hourly wage be?

{{/each}}
Are you making less than this per hour? You may be a victim of wage theft. Please take action and:
-
Report It! + Report It! +
Further Reading:
+ Full Text of the Ordinance + Office of Labor Standards +
+ + + + + @@ -69,6 +114,10 @@

What should your hourly wage be?

+ + + + diff --git a/www/js/DefinitionsView.js b/www/js/DefinitionsView.js new file mode 100644 index 0000000..131ecd8 --- /dev/null +++ b/www/js/DefinitionsView.js @@ -0,0 +1,20 @@ +var DefinitionsView = function (definitionService) { + this.initialize = function () { + // Define a div wrapper for the view (used to attach events) + this.$el = $('
'); + this.render(); + }; + + this.render = function() { + var definitions = definitionService.getDefinitions(); + for(var i in definitions){ + definitions[i].id = i.replace(/\s/g,"-"); + definitions[i].text = i; + } + this.$el.html(this.template(definitions)); + return this; + }; + + this.initialize(); +} + diff --git a/www/js/NoteView.js b/www/js/NoteView.js new file mode 100644 index 0000000..84bab3c --- /dev/null +++ b/www/js/NoteView.js @@ -0,0 +1,14 @@ +var NoteView = function(note) { + this.initialize = function() { + this.$el = $('
'); + this.render(); + }; + + this.render = function() { + this.$el.html(this.template(note)); + return this; + }; + + this.initialize(); +} + diff --git a/www/js/QuestionView.js b/www/js/QuestionView.js index 44ebd38..a7d3903 100644 --- a/www/js/QuestionView.js +++ b/www/js/QuestionView.js @@ -1,8 +1,11 @@ -var QuestionView = function(question, answerService) { +var QuestionView = function(question, answerService, definitionService) { + var definitionsView; this.initialize = function() { this.$el = $('
'); + definitionsView = new DefinitionsView(definitionService); this.$el.on('click', '.answer', this.saveAnswer); + this.render(); }; this.saveAnswer = function(event) { @@ -14,6 +17,7 @@ var QuestionView = function(question, answerService) { this.render = function() { this.$el.html(this.template(question)); + $('.definitions', this.$el).html(definitionsView.$el); return this; }; diff --git a/www/js/app.js b/www/js/app.js index f95c4e8..d010ef3 100755 --- a/www/js/app.js +++ b/www/js/app.js @@ -5,14 +5,18 @@ HomeView.prototype.template = Handlebars.compile($("#home-tpl").html()); QuestionView.prototype.template = Handlebars.compile($("#question-tpl").html()); ResultView.prototype.template = Handlebars.compile($("#result-tpl").html()); + DefinitionsView.prototype.template = Handlebars.compile($('#definitions-tpl').html()); + NoteView.prototype.template = Handlebars.compile($('#note-tpl').html()); var slider = new PageSlider($('body')); var questionService = new QuestionService(); var answerService = new AnswerService(); var wageService = new WageService(); + var definitionService = new DefinitionService(); + var noteService = new NoteService(); - $.when([questionService.initialize(), answerService.initialize(), wageService.initialize()]).done(function() { + $.when([questionService.initialize(), answerService.initialize(), wageService.initialize(), definitionService.initialize(), noteService.initialize()]).done(function() { router.addRoute('', function() { slider.slidePage(new HomeView(answerService).render().$el); }); @@ -32,7 +36,13 @@ router.addRoute('question/:id', function(id) { questionService.findById(id).done(function(question) { - slider.slidePage(new QuestionView(question, answerService).render().$el); + slider.slidePage(new QuestionView(question, answerService, definitionService).render().$el); + }); + }); + + router.addRoute('note/:id', function(id) { + noteService.findById(id).done(function(note) { + slider.slidePage(new NoteView(note).render().$el); }); }); diff --git a/www/js/services/memory/DefinitionService.js b/www/js/services/memory/DefinitionService.js new file mode 100644 index 0000000..fd23d34 --- /dev/null +++ b/www/js/services/memory/DefinitionService.js @@ -0,0 +1,93 @@ +var DefinitionService = function() { + this.initialize = function() { + // No Initialization required + var deferred = $.Deferred(); + deferred.resolve(); + return deferred.promise(); + } + + this.findByWord = function(word) { + return definitions[word.toLowerCase()]; + } + + this.getDefinitions = function() { + return definitions; + } + + var definitions = { + "actuarial value": { + "text": "the percentage of total average costs for covered benefits that a health benefits package will cover;" + }, + "bonuses": { + "text": "non-discretionary payments in addition to hourly, salary, commission, or piece-rate payments paid under an agreement between the employer and employee;" + }, + "commissions": { + "text": "a sum of money paid to an employee upon completion of a task, usually selling a certain amount of goods or services;" + }, + "department": { + "text": "the Department of Finance and Administrative Services;" + }, + "director": { + "text": "the Director of the Department of Finance and Administrative Services, or his or her designee;" + }, + "employ": { + "text": "to permit to work;" + }, + "employee": { + "text": "\"employee,\" as defined under Section 12A.28.200<\/a> . Employee does not include individuals performing services under a work study agreement;" + }, + "employer": { + "text": "any individual, partnership, association, corporation, business trust, or any person or group of persons acting directly or indirectly in the interest of an employer in relation to an employee;" + }, + "franchise": { + "text": "a written agreement by which:", + "children": [ + {"text": "A person is granted the right to engage in the business of offering, selling, or distributing goods or services under a marketing plan prescribed or suggested in substantial part by the grantor or its affiliate;"}, + {"text": "The operation of the business is substantially associated with a trademark, service mark, trade name, advertising, or other commercial symbol; designating, owned by, or licensed by the grantor or its affiliate; and"}, + {"text": "The person pays, agrees to pay, or is required to pay, directly or indirectly, a franchise fee;"} + ] + }, + "franchisee": { + "text": "a person to whom a franchise is offered or granted;" + }, + "franchisor": { + "text": "a person who grants a franchise to another person;" + }, + "hearing Examiner": { + "text": "the official appointed by the Council and designated as the Hearing Examiner, or that person's designee (Deputy Hearing Examiner, Hearing Examiner Pro Tem, etc.);" + }, + "hourly minimum compensation": { + "text": "the minimum compensation due to an employee for each hour worked during a pay period;" + }, + "hourly minimum wage": { + "text": "the minimum wage due to an employee for each hour worked during a pay period;" + }, + "medical benefits plan": { + "text": "a silver or higher level essential health benefits package, as defined in 42 U.S.C. \u00a7 18022, or an equivalent plan that is designed to provide benefits that are actuarially equivalent to 70 percent of the full actuarial value of the benefits provided under the plan, whichever is greater;" + }, + "minimum compensation": { + "text": "the minimum wage in addition to tips actually received by the employee and reported to the Internal Revenue Service, and money paid by the employer towards an individual employee's medical benefits plan;" + }, + "minimum wage": { + "text": "all wages, commissions, piece-rate, and bonuses actually received by the employee and reported to the Internal Revenue Service;" + }, + "piece-rate": { + "text": "a price paid per unit of work;" + }, + "rate of inflation": { + "text": "the Consumer Price Index annual percent change for urban wage earners and clerical workers, termed CPI-W, or a successor index, for the twelve months prior to each September 1st as calculated by the United States Department of Labor;" + }, + "schedule 1 employer": { + "text": "all employers that employ more than 500 employees in the United States, regardless of where those employees are employed in the United States, and all franchisees associated with a franchisor or a network of franchises with franchisees that employ more than 500 employees in aggregate in the United States;" + }, + "schedule 2 employer": { + "text": "all employers that employ 500 or fewer employees regardless of where those employees are employed in the United States. Schedule 2 employers do not include franchisees associated with a franchisor or a network of franchises with franchisees that employ more than 500 employees in aggregate in the United States;" + }, + "tips": { + "text": "a verifiable sum to be presented by a customer as a gift or gratuity in recognition of some service performed for the customer by the employee receiving the tip;" + }, + "wage": { + "text": "compensation due to an employee by reason of employment, payable in legal tender of the United States or checks on banks convertible into cash on demand at full face value, subject to such deductions, charges, or allowances as may be permitted by rules of the Director. Commissions, piece-rate, and bonuses are included in wages. Tips and employer payments toward a medical benefits plan do not constitute wages for purposes of this Chapter." + }, + } +}; diff --git a/www/js/services/memory/NoteService.js b/www/js/services/memory/NoteService.js new file mode 100644 index 0000000..dc6a59f --- /dev/null +++ b/www/js/services/memory/NoteService.js @@ -0,0 +1,48 @@ +var NoteService = function() { + + this.initialize = function() { + // No Initialization required + var deferred = $.Deferred(); + deferred.resolve(); + return deferred.promise(); + } + + this.findById = function(id) { + var deferred = $.Deferred(); + var note = null; + var l = notes.length; + for (var i=0; i < l; i++) { + if (notes[i].id == id) { + note = notes[i]; + break; + } + } + deferred.resolve(note); + return deferred.promise(); + } + + var notes = [ + { + "id": "part-time-seattle", + "title":"Part Time in Seattle", + "text": ["Employees should receive the minimum wage for each hour worked within the geographic boundaries of Seattle, provided that an employee who performs work in Seattle on an occasional basis should receive the appropriate minimum wage in a two-week period only if the employee performs more than two hours of work for an employer within Seattle during that two-week period.","Time spent in Seattle solely for the purpose of travelling through Seattle from a point of origin outside Seattle to a destination outside Seattle, with no employment-related or commercial stops in Seattle except for refueling or the employee's personal meals or errands, are not included."], + "ordinance": { "section": "A", "href": "https://www.municode.com/library/wa/seattle/codes/municipal_code?nodeId=TIT14HURI_CH14.19MIWAMICORAEMPEWOSE_14.19.020EMSEEMSCDE" }, + "next":"#question/number-employees", + "skip": function(answers) { + return false + } + }, + { + "id": "minimum-compensation", + "title":"Minimum Compensation", + "text":["Employers can meet the applicable hourly minimum compensation requirement through wages (including applicable commissions, piece-rate, and bonuses), tips and money paid by an employer towards an individual employee's medical benefits plan, provided that the Schedule 2 employer also meets the applicable hourly minimum wage requirements."], + "ordinance": { "section":"B", "href": "https://www.municode.com/library/wa/seattle/codes/municipal_code?nodeId=TIT14HURI_CH14.19MIWAMICORAEMPEWOSE_14.19.050HOMICOCH2EM"}, + "next":"#results", + "skip": function(answers) { + return answers["health-insurance"] == "yes" || answers["tips"] == "yes"; + } + }, + ]; + +} + diff --git a/www/js/services/memory/QuestionService.js b/www/js/services/memory/QuestionService.js index a79d7a7..2f4cebf 100755 --- a/www/js/services/memory/QuestionService.js +++ b/www/js/services/memory/QuestionService.js @@ -14,7 +14,6 @@ var QuestionService = function() { for (var i=0; i < l; i++) { if (questions[i].id == id) { question = questions[i]; - console.log("Returning question: " + question); break; } } @@ -25,19 +24,32 @@ var QuestionService = function() { var questions = [ {"id": "work-seattle", "summary":"Employed in Seattle", "prompt":"Is your place of employment located in Seattle?", choices:[ {"next": "#question/number-employees", "value": "yes", "text": "Yes"}, - {"next": "#results", "value": "no", "text": "No"} + {"next": "#results", "value": "no", "text": "No"}, + {"next": "#note/part-time-seattle", "value": "yes", "text": "Sometimes"}, + {"next": "#question/methods-for-determining-in-seattle", "value": "", "text": "I Don't Know"} + ]}, + {"id": "methods-for-determining-in-seattle", "summary":"Employed in Seattle?", "prompt":"Choose one of these methods to determine if you are employed in Seattle?", choices:[ + {"next": "#employer-determination/nearby", "text": "Choose from Nearest 20 Businesses"}, + {"next": "#employer-determination/address", "text": "Enter The Address Where You Work"}, + {"next": "#employer-determination/business-name", "text": "Enter Business Name"}, + {"next": "#employer-determination/top-50", "text": "Choose From Top 50 Employers In The State"}, + {"next": "#employer-determination/map", "text": "Indicate Where You Work On A Map"}, ]}, {"id": "number-employees", "summary":"Number of Employees", "prompt":"How many people work at your employer across the USA?", choices:[ - {"next": "#question/min-compensation", "value": "1-500", "text": "1 - 500"}, + {"next": "#question/health-insurance", "value": "1-500", "text": "1 - 500"}, {"next": "#question/medical-benefits", "value": ">500", "text": "Over 500"} ]}, {"id": "medical-benefits", "summary":"Medical Benefits", "prompt":"Does your employer provide medical benefits to you?", choices:[ {"next": "#results", "value": "yes", "text": "Yes"}, {"next": "#results", "value": "no", "text": "No"} ]}, - {"id": "min-compensation", "summary":"Minimum Compensation", "prompt":"Does your employer provide minimum compensation?", choices:[ - {"next": "#results", "value": "yes", "text": "Yes"}, - {"next": "#results", "value": "no", "text": "No"} + {"id": "health-insurance", "summary":"Health Insurance", "prompt":"Does your employer pay for any of your health insurance?", choices:[ + {"next": "#question/tips", "value": "yes", "text": "Yes"}, + {"next": "#question/tips", "value": "no", "text": "No"} + ]}, + {"id": "tips", "summary":"Tips", "prompt":"Do you receive tips?", choices:[ + {"next": "#note/minimum-compensation", "value": "yes", "text": "Yes"}, + {"next": "#note/minimum-compensation", "value": "no", "text": "No"} ]}, ];