-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Feat]: Add special config for Managers to enable/disable time tracki…
…ng for Members (#2925) * feat: Add config for Managers to enable/disable time tracking for Members * feat: Add config for Managers to enable/disable time tracking for Member on profile * fix: cspell * fix: error * fix: active team managers
- Loading branch information
1 parent
83daaad
commit 6b582e8
Showing
11 changed files
with
174 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { IUpdateEmployee } from "@app/interfaces"; | ||
import { authenticatedGuard } from "@app/services/server/guards/authenticated-guard-app"; | ||
import { updateEmployees } from "@app/services/server/requests"; | ||
import { NextResponse } from "next/server"; | ||
|
||
export async function PUT(req: Request, { params }: { params: { id: string } }) { | ||
const res = new NextResponse(); | ||
const { id } = params; | ||
if (!id) { | ||
return | ||
} | ||
const { $res, user, access_token } = await authenticatedGuard(req, res); | ||
if (!user) return $res('Unauthorized'); | ||
const body = (await req.json()) as unknown as IUpdateEmployee; | ||
|
||
const response = await updateEmployees( | ||
{ | ||
bearer_token: access_token, | ||
body, | ||
id | ||
} | ||
); | ||
return $res(response.data) | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.