From 1cde673346d83791c49727a26fc12086f8d49d28 Mon Sep 17 00:00:00 2001 From: Unknown Date: Tue, 21 Nov 2017 15:01:08 +0700 Subject: [PATCH 1/3] Fix History Display --- views/personal/history_personal.handlebars | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/personal/history_personal.handlebars b/views/personal/history_personal.handlebars index f94c48f..44fe94f 100644 --- a/views/personal/history_personal.handlebars +++ b/views/personal/history_personal.handlebars @@ -19,7 +19,6 @@ Date User Amount - Initial Budget Remaining Budget Reason @@ -35,6 +34,7 @@ Sent from {{this.sender}} {{/ifCondA}} P {{this.amount}} + {{#ifCondA sender '==' ../email}} P {{this.sender_resulting_budget}} {{else}} From 0ff4e59bfb23c72bfea02e3853a8064d4d77de0a Mon Sep 17 00:00:00 2001 From: Unknown Date: Wed, 22 Nov 2017 14:59:55 +0700 Subject: [PATCH 2/3] Change done to completed --- views/keeper/d-pExchange.handlebars | 2 +- views/keeper/p-dExchange.handlebars | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/views/keeper/d-pExchange.handlebars b/views/keeper/d-pExchange.handlebars index 7f14979..b2326a2 100644 --- a/views/keeper/d-pExchange.handlebars +++ b/views/keeper/d-pExchange.handlebars @@ -21,7 +21,7 @@
- +
diff --git a/views/keeper/p-dExchange.handlebars b/views/keeper/p-dExchange.handlebars index 7da4463..da71f7c 100644 --- a/views/keeper/p-dExchange.handlebars +++ b/views/keeper/p-dExchange.handlebars @@ -40,7 +40,7 @@
- + @@ -88,7 +88,7 @@
- + @@ -136,7 +136,7 @@
- + @@ -184,7 +184,7 @@
- + @@ -251,7 +251,7 @@
- + @@ -299,7 +299,7 @@
- + @@ -347,7 +347,7 @@
- + @@ -395,7 +395,7 @@
- + From 1bc9bfcbd3445873545e58c45fea6d0ddd7cfddc Mon Sep 17 00:00:00 2001 From: Unknown Date: Wed, 22 Nov 2017 15:04:26 +0700 Subject: [PATCH 3/3] bug --- routes/apartment.js | 6 ++++-- routes/transfer.js | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/routes/apartment.js b/routes/apartment.js index 5466d4a..68da2d3 100644 --- a/routes/apartment.js +++ b/routes/apartment.js @@ -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 = 'catering@ligercambodia.org' 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); @@ -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, diff --git a/routes/transfer.js b/routes/transfer.js index 87b80b9..1fe56ab 100644 --- a/routes/transfer.js +++ b/routes/transfer.js @@ -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 = 'catering@ligercambodia.org' 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);