|
|
|
@ -1638,7 +1638,18 @@ exports.createquotationforSensor = async (req, reply) => {
|
|
|
|
|
tankName: tank.tankName || "",
|
|
|
|
|
tankLocation: tank.tankLocation || ""
|
|
|
|
|
}))
|
|
|
|
|
: []
|
|
|
|
|
: [],
|
|
|
|
|
motor_switches: Array.isArray(item.motor_switches)
|
|
|
|
|
? item.motor_switches.map(motor_switch => ({
|
|
|
|
|
|
|
|
|
|
from_tank: motor_switch.from_tank || "",
|
|
|
|
|
from_location: motor_switch.from_location || "",
|
|
|
|
|
to_tank: motor_switch.to_tank || "",
|
|
|
|
|
to_location: motor_switch.to_location || "",
|
|
|
|
|
|
|
|
|
|
}))
|
|
|
|
|
: [],
|
|
|
|
|
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
// Fetch pricing data from Iotprice database
|
|
|
|
@ -1705,6 +1716,8 @@ exports.createquotationforSensor = async (req, reply) => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
exports.editQuotationForSensor = async (req, reply) => {
|
|
|
|
|
try {
|
|
|
|
|
const { quatationId } = req.params; // Get the ID of the quotation to edit
|
|
|
|
|