Skip to content

Commit

Permalink
Merge pull request #72 from VuthyVey/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
KetyaNop authored Nov 22, 2017
2 parents 185f68c + 1bc9bfc commit 5e2caf2
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
6 changes: 4 additions & 2 deletions routes/apartment.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module.exports.set = function(router, pool) {
var apartmentTransferBudget = 0;
var emailsList = [];

var emailToRemove = await pool.query("SELECT email FROM account WHERE role = 'senior_student' or role = 'apartment' or email = '[email protected]' or role = 'central_bank' ORDER BY role, username");
var emailToRemove = await pool.query("SELECT email FROM account WHERE role = 'senior_student' or role = 'apartment' or role = 'central_bank' ORDER BY role, username");

for(var i = 0; i < emailToRemove.rows.length; i++){
emailsList.push(emailToRemove.rows[i].email);
Expand Down Expand Up @@ -146,7 +146,9 @@ module.exports.set = function(router, pool) {
budgetRemain = fix.fixROE(budgetRemain);

apartmentTransferBudget = fix.fixROE(apartmentTransferBudget);

for (var i = 0; i < dataTransferFinish.rows.length; i++){
// dataTransferFinish.rows[i].date = moment(dataTransferFinish.rows[i].date).tz("Asia/Bangkok");
}
response.render('apartment/apartment_history', {
user: request.user,
data: personality.rows[0].role,
Expand Down
2 changes: 1 addition & 1 deletion routes/transfer.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module.exports.set = function(router, pool) {
var emailsList = [];


var emailToRemove = await pool.query("SELECT email FROM account WHERE role = 'senior_student' or role = 'apartment' or email = '[email protected]' or role = 'central_bank' ORDER BY role, username");
var emailToRemove = await pool.query("SELECT email FROM account WHERE role = 'senior_student' or role = 'apartment' or role = 'central_bank' ORDER BY role, username");

for(var i = 0; i < emailToRemove.rows.length; i++){
emailsList.push(emailToRemove.rows[i].email);
Expand Down
2 changes: 1 addition & 1 deletion views/keeper/d-pExchange.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<div class="row no-margin">
<div class="card-action">
<form method="post" action="/keeper/d/p/{{this.id}}">
<button class="waves-effect waves-light col s6 btn-flat orange-text" type="submit" name="status" value="true">Done</button>
<button class="waves-effect waves-light col s6 btn-flat orange-text" type="submit" name="status" value="true">Completed</button>

<button class="waves-effect waves-light col s6 btn-flat orange-text" type="submit" name="status" value="false">Cancel</button>
</form>
Expand Down
16 changes: 8 additions & 8 deletions views/keeper/p-dExchange.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<div class="row">
<div class="card-action">

<button class="col l4 m5 s12 offset-l1 transparent btn-flat orange-text" type="submit" name="status" value="done">Done</button>
<button class="col l4 m5 s12 offset-l1 transparent btn-flat orange-text" type="submit" name="status" value="done">Completed</button>

<button class="col l4 m5 s12 offset-l2 offset-m1 transparent btn-flat orange-text" type="submit" name="status" value="cancel">Cancel</button>

Expand Down Expand Up @@ -88,7 +88,7 @@
<div class="row">
<div class="card-action">

<button class="col l4 m5 s12 offset-l1 transparent btn-flat orange-text" type="submit" name="status" value="done">Done</button>
<button class="col l4 m5 s12 offset-l1 transparent btn-flat orange-text" type="submit" name="status" value="done">Completed</button>

<button class="col l4 m5 s12 offset-l2 offset-m1 transparent btn-flat orange-text" type="submit" name="status" value="cancel">Cancel</button>

Expand Down Expand Up @@ -136,7 +136,7 @@
<div class="row">
<div class="card-action">

<button class="col l4 m5 s12 offset-l1 transparent btn-flat orange-text" type="submit" name="status" value="done">Done</button>
<button class="col l4 m5 s12 offset-l1 transparent btn-flat orange-text" type="submit" name="status" value="done">Completed</button>

<button class="col l4 m5 s12 offset-l2 offset-m1 transparent btn-flat orange-text" type="submit" name="status" value="cancel">Cancel</button>

Expand Down Expand Up @@ -184,7 +184,7 @@
<div class="row">
<div class="card-action">

<button class="col l4 m5 s12 offset-l1 transparent btn-flat orange-text" type="submit" name="status" value="done">Done</button>
<button class="col l4 m5 s12 offset-l1 transparent btn-flat orange-text" type="submit" name="status" value="done">Completed</button>

<button class="col l4 m5 s12 offset-l2 offset-m1 transparent btn-flat orange-text" type="submit" name="status" value="cancel">Cancel</button>

Expand Down Expand Up @@ -251,7 +251,7 @@
<div class="row">
<div class="card-action">

<button class="col l4 m5 s12 offset-l1 transparent btn-flat orange-text" type="submit" name="status" value="done">Done</button>
<button class="col l4 m5 s12 offset-l1 transparent btn-flat orange-text" type="submit" name="status" value="done">Completed</button>

<button class="col l4 m5 s12 offset-l2 offset-m1 transparent btn-flat orange-text" type="submit" name="status" value="cancel">Cancel</button>

Expand Down Expand Up @@ -299,7 +299,7 @@
<div class="row">
<div class="card-action">

<button class="col l4 m5 s12 offset-l1 transparent btn-flat orange-text" type="submit" name="status" value="done">Done</button>
<button class="col l4 m5 s12 offset-l1 transparent btn-flat orange-text" type="submit" name="status" value="done">Completed</button>

<button class="col l4 m5 s12 offset-l2 offset-m1 transparent btn-flat orange-text" type="submit" name="status" value="cancel">Cancel</button>

Expand Down Expand Up @@ -347,7 +347,7 @@
<div class="row">
<div class="card-action">

<button class="col l4 m5 s12 offset-l1 transparent btn-flat orange-text" type="submit" name="status" value="done">Done</button>
<button class="col l4 m5 s12 offset-l1 transparent btn-flat orange-text" type="submit" name="status" value="done">Completed</button>

<button class="col l4 m5 s12 offset-l2 offset-m1 transparent btn-flat orange-text" type="submit" name="status" value="cancel">Cancel</button>

Expand Down Expand Up @@ -395,7 +395,7 @@
<div class="row">
<div class="card-action">

<button class="col l4 m5 s12 offset-l1 transparent btn-flat orange-text" type="submit" name="status" value="done">Done</button>
<button class="col l4 m5 s12 offset-l1 transparent btn-flat orange-text" type="submit" name="status" value="done">Completed</button>

<button class="col l4 m5 s12 offset-l2 offset-m1 transparent btn-flat orange-text" type="submit" name="status" value="cancel">Cancel</button>

Expand Down
2 changes: 1 addition & 1 deletion views/personal/history_personal.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<th>Date</th>
<th>User</th>
<th>Amount</th>
<th>Initial Budget</th>
<th>Remaining Budget</th>
<th>Reason</th>
</tr>
Expand All @@ -35,6 +34,7 @@
<td><span class="new badge blue left" data-badge-caption="">Sent from</span> {{this.sender}} </td>
{{/ifCondA}}
<td>P {{this.amount}}</td>

{{#ifCondA sender '==' ../email}}
<td>P {{this.sender_resulting_budget}}</td>
{{else}}
Expand Down

0 comments on commit 5e2caf2

Please sign in to comment.