|
|
@ -41,39 +41,41 @@ module.exports = function (fastify, opts, next) {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
required: ["installationId"]
|
|
|
|
required: ["installationId"]
|
|
|
|
},
|
|
|
|
},
|
|
|
|
response: {
|
|
|
|
|
|
|
|
200: {
|
|
|
|
|
|
|
|
type: "object",
|
|
|
|
|
|
|
|
properties: {
|
|
|
|
|
|
|
|
simplydata: {
|
|
|
|
|
|
|
|
type: "object",
|
|
|
|
|
|
|
|
properties: {
|
|
|
|
|
|
|
|
error: { type: "boolean" },
|
|
|
|
|
|
|
|
message: { type: "string" },
|
|
|
|
|
|
|
|
teamMembers: {
|
|
|
|
|
|
|
|
type: "array",
|
|
|
|
|
|
|
|
items: {
|
|
|
|
|
|
|
|
type: "object",
|
|
|
|
|
|
|
|
properties: {
|
|
|
|
|
|
|
|
teamMemberId: { type: "string" },
|
|
|
|
|
|
|
|
name: { type: "string" },
|
|
|
|
|
|
|
|
phone: { type: "string" },
|
|
|
|
|
|
|
|
email: { type: "string" },
|
|
|
|
|
|
|
|
alternativePhone: { type: "string" },
|
|
|
|
|
|
|
|
installationTeamMemId: { type: "string" },
|
|
|
|
|
|
|
|
status: { type: "string" }
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
handler: installationController.getTeamMembers
|
|
|
|
handler: installationController.getTeamMembers
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fastify.post("/api/assignTeammember/:installationId", {
|
|
|
|
|
|
|
|
schema: {
|
|
|
|
|
|
|
|
description: "Assign a team member to an installation's quotation",
|
|
|
|
|
|
|
|
tags: ["Installation"],
|
|
|
|
|
|
|
|
summary: "Assign a team member based on installationId",
|
|
|
|
|
|
|
|
params: {
|
|
|
|
|
|
|
|
type: "object",
|
|
|
|
|
|
|
|
properties: {
|
|
|
|
|
|
|
|
installationId: {
|
|
|
|
|
|
|
|
type: "string",
|
|
|
|
|
|
|
|
description: "Installation ID to fetch team members from"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
required: ["installationId"]
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
body: {
|
|
|
|
|
|
|
|
type: "object",
|
|
|
|
|
|
|
|
properties: {
|
|
|
|
|
|
|
|
teamMemberId: {
|
|
|
|
|
|
|
|
type: "string",
|
|
|
|
|
|
|
|
description: "The team member ID to assign"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
required: ["teamMemberId"]
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
handler: installationController.assignTeamMemberToQuotation
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fastify.get("/api/getAllInstallers/:departmentName", {
|
|
|
|
fastify.get("/api/getAllInstallers/:departmentName", {
|
|
|
|
schema: {
|
|
|
|
schema: {
|
|
|
|
description: "Get All Installtion list",
|
|
|
|
description: "Get All Installtion list",
|
|
|
@ -132,7 +134,9 @@ module.exports = function (fastify, opts, next) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
handler: installationController.editTeamMember
|
|
|
|
handler: installationController.editTeamMember
|
|
|
|
});fastify.delete("/api/deleteTeamMember/:installationId/:teamMemberId", {
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fastify.delete("/api/deleteTeamMember/:installationId/:teamMemberId", {
|
|
|
|
schema: {
|
|
|
|
schema: {
|
|
|
|
description: "Delete a team member from an installation",
|
|
|
|
description: "Delete a team member from an installation",
|
|
|
|
tags: ["Installation"],
|
|
|
|
tags: ["Installation"],
|
|
|
|