|
|
@ -207,6 +207,46 @@ fastify.route({
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
handler: departmentController.getDetails
|
|
|
|
handler: departmentController.getDetails
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
fastify.route({
|
|
|
|
|
|
|
|
method: "PUT",
|
|
|
|
|
|
|
|
url: "/api/updateBranchOrCompanydetails/:id",
|
|
|
|
|
|
|
|
schema: {
|
|
|
|
|
|
|
|
tags: ["Department"],
|
|
|
|
|
|
|
|
description: "Update details of a branch or city",
|
|
|
|
|
|
|
|
summary: "Edit department details by branchId or cityId",
|
|
|
|
|
|
|
|
params: {
|
|
|
|
|
|
|
|
type: "object",
|
|
|
|
|
|
|
|
properties: {
|
|
|
|
|
|
|
|
id: { type: "string" }, // branchId or cityId
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
required: ["id"],
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
body: {
|
|
|
|
|
|
|
|
type: "object",
|
|
|
|
|
|
|
|
properties: {
|
|
|
|
|
|
|
|
phone: { type: "string" },
|
|
|
|
|
|
|
|
land_line_number: { type: "string" },
|
|
|
|
|
|
|
|
officeName: { type: "string" },
|
|
|
|
|
|
|
|
office_address1: { type: "string" },
|
|
|
|
|
|
|
|
address2: { type: "string" },
|
|
|
|
|
|
|
|
email: { type: "string" },
|
|
|
|
|
|
|
|
pincode: { type: "string" },
|
|
|
|
|
|
|
|
zone: { type: "string" },
|
|
|
|
|
|
|
|
city: { type: "string" },
|
|
|
|
|
|
|
|
state: { type: "string" },
|
|
|
|
|
|
|
|
country: { type: "string" },
|
|
|
|
|
|
|
|
nameoftheContactPerson: { type: "string" },
|
|
|
|
|
|
|
|
location: { type: "array", items: { type: "string" } },
|
|
|
|
|
|
|
|
longitude: { type: "number" },
|
|
|
|
|
|
|
|
latitude: { type: "number" },
|
|
|
|
|
|
|
|
googleLocation: { type: "string" },
|
|
|
|
|
|
|
|
gstNo: { type: "string" }
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
additionalProperties: true, // allow extra fields if needed
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
handler: departmentController.updateBranchOrCompanyDetails
|
|
|
|
});
|
|
|
|
});
|
|
|
|
fastify.route({
|
|
|
|
fastify.route({
|
|
|
|
method: "GET",
|
|
|
|
method: "GET",
|
|
|
|