In the middle of work for simplifying UI

This commit is contained in:
danielyxie
2017-09-01 15:35:14 -05:00
parent 78ca383ee2
commit 9614d6ee4f
6 changed files with 96 additions and 243 deletions
+20 -5
View File
@@ -1614,7 +1614,10 @@ PlayerObject.prototype.applyForJob = function(entryPosType, sing=false) {
this.companyName = company.companyName;
this.companyPosition = pos;
Player.firstJobRecvd = true;
if (Player.firstJobRecvd === false) {
Player.firstJobRecvd = true;
document.getElementById("job-tab").style.display = "list-item";
}
if (leaveCompany) {
if (sing) {return true;}
@@ -1718,7 +1721,10 @@ PlayerObject.prototype.applyForAgentJob = function(sing=false) {
PlayerObject.prototype.applyForEmployeeJob = function(sing=false) {
var company = Companies[this.location]; //Company being applied to
if (this.isQualified(company, CompanyPositions.Employee)) {
Player.firstJobRecvd = true;
if (Player.firstJobRecvd === false) {
Player.firstJobRecvd = true;
document.getElementById("job-tab").style.display = "list-item";
}
this.companyName = company.companyName;
this.companyPosition = CompanyPositions.Employee;
if (sing) {return true;}
@@ -1733,7 +1739,10 @@ PlayerObject.prototype.applyForEmployeeJob = function(sing=false) {
PlayerObject.prototype.applyForPartTimeEmployeeJob = function(sing=false) {
var company = Companies[this.location]; //Company being applied to
if (this.isQualified(company, CompanyPositions.PartTimeEmployee)) {
Player.firstJobRecvd = true;
if (Player.firstJobRecvd === false) {
Player.firstJobRecvd = true;
document.getElementById("job-tab").style.display = "list-item";
}
this.companyName = company.companyName;
this.companyPosition = CompanyPositions.PartTimeEmployee;
if (sing) {return true;}
@@ -1748,7 +1757,10 @@ PlayerObject.prototype.applyForPartTimeEmployeeJob = function(sing=false) {
PlayerObject.prototype.applyForWaiterJob = function(sing=false) {
var company = Companies[this.location]; //Company being applied to
if (this.isQualified(company, CompanyPositions.Waiter)) {
Player.firstJobRecvd = true;
if (Player.firstJobRecvd === false) {
Player.firstJobRecvd = true;
document.getElementById("job-tab").style.display = "list-item";
}
this.companyName = company.companyName;
this.companyPosition = CompanyPositions.Waiter;
if (sing) {return true;}
@@ -1763,7 +1775,10 @@ PlayerObject.prototype.applyForWaiterJob = function(sing=false) {
PlayerObject.prototype.applyForPartTimeWaiterJob = function(sing=false) {
var company = Companies[this.location]; //Company being applied to
if (this.isQualified(company, CompanyPositions.PartTimeWaiter)) {
Player.firstJobRecvd = true;
if (Player.firstJobRecvd === false) {
Player.firstJobRecvd = true;
document.getElementById("job-tab").style.display = "list-item";
}
this.companyName = company.companyName;
this.companyPosition = CompanyPositions.PartTimeWaiter;
if (sing) {return true;}