diff --git a/backend/src/services/UserServices/ShowUserService.ts b/backend/src/services/UserServices/ShowUserService.ts index 03ecab4..3f2b501 100644 --- a/backend/src/services/UserServices/ShowUserService.ts +++ b/backend/src/services/UserServices/ShowUserService.ts @@ -4,7 +4,7 @@ import Queue from "../../models/Queue"; const ShowUserService = async (id: string | number): Promise => { const user = await User.findByPk(id, { - attributes: ["name", "id", "email", "profile", "tokenVersion"], + attributes: ["name", "id", "email", "profile", "positionCompany", "tokenVersion"], include: [ { model: Queue, as: "queues", attributes: ["id", "name", "color"] } ], diff --git a/backend/src/services/UserServices/UpdateUserService.ts b/backend/src/services/UserServices/UpdateUserService.ts index ed80cc2..8a0a4ba 100644 --- a/backend/src/services/UserServices/UpdateUserService.ts +++ b/backend/src/services/UserServices/UpdateUserService.ts @@ -8,6 +8,7 @@ interface UserData { email?: string; password?: string; name?: string; + positionCompany?: string; profile?: string; queueIds?: number[]; } @@ -60,7 +61,7 @@ const UpdateUserService = async ({ }); - const { email, password, profile, name, queueIds = [] } = userData; + const { email, password, profile, name, positionCompany, queueIds = [] } = userData; try { await schema.validate({ email, password, profile, name }); @@ -73,6 +74,7 @@ const UpdateUserService = async ({ email, password, profile, + positionCompany, name }); diff --git a/frontend/src/components/UserModal/index.js b/frontend/src/components/UserModal/index.js index 860cb2a..cd568e8 100644 --- a/frontend/src/components/UserModal/index.js +++ b/frontend/src/components/UserModal/index.js @@ -84,6 +84,7 @@ const UserModal = ({ open, onClose, userId }) => { name: "", email: "", password: "", + positionCompany: "", position: "", profile: "user", }; @@ -235,7 +236,6 @@ const UserModal = ({ open, onClose, userId }) => {