|
|
|
@ -938,6 +938,7 @@ const formatDate = (date) => {
|
|
|
|
|
return `${day}-${month}-${year} - ${hours}:${minutes}`;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
exports.motorAction = async (req, reply) => {
|
|
|
|
|
try {
|
|
|
|
|
const customerId = req.params.customerId;
|
|
|
|
@ -1121,7 +1122,9 @@ exports.motorAction = async (req, reply) => {
|
|
|
|
|
|
|
|
|
|
const capacity = parseInt(receiver_tank_info.capacity, 10);
|
|
|
|
|
const waterLevel = parseInt(receiver_tank_info.waterlevel, 10);
|
|
|
|
|
const desired_percentage = parseInt(req.body.manual_threshold_litres, 10);
|
|
|
|
|
const desired_percentage = parseInt(req.body.manual_threshold_litres.replace(/,/g, ''), 10);
|
|
|
|
|
|
|
|
|
|
console.log(desired_percentage)
|
|
|
|
|
const threshold_water_level = waterLevel+desired_percentage;
|
|
|
|
|
|
|
|
|
|
const supplier_threshold = supplier_waterLevel-desired_percentage
|
|
|
|
|