-
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.
Merge pull request #2516 from ever-co/develop
Release
- Loading branch information
Showing
27 changed files
with
504 additions
and
292 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { APPLICATION_DEFAULT_LANGUAGE } from '@app/constants'; | ||
// import { APPLICATION_DEFAULT_LANGUAGE } from '@app/constants'; | ||
import MeetPage from './component'; | ||
|
||
export default function Page() { | ||
return <MeetPage />; | ||
} | ||
|
||
export async function generateStaticParams() { | ||
return [{ locale: APPLICATION_DEFAULT_LANGUAGE }]; | ||
} | ||
// export async function generateStaticParams() { | ||
// return [{ locale: APPLICATION_DEFAULT_LANGUAGE }]; | ||
// } |
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { APPLICATION_DEFAULT_LANGUAGE } from '@app/constants'; | ||
// import { APPLICATION_DEFAULT_LANGUAGE } from '@app/constants'; | ||
import PermissionPage from './component'; | ||
|
||
export default function Page() { | ||
return <PermissionPage />; | ||
} | ||
|
||
export async function generateStaticParams() { | ||
return [{ locale: APPLICATION_DEFAULT_LANGUAGE }]; | ||
} | ||
// export async function generateStaticParams() { | ||
// return [{ locale: APPLICATION_DEFAULT_LANGUAGE }]; | ||
// } |
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 |
---|---|---|
@@ -1,28 +1,50 @@ | ||
import { IEmployee, INextParams, ITeamTask } from '@app/interfaces'; | ||
import { IDailyPlanTasksUpdate, INextParams } from '@app/interfaces'; | ||
import { authenticatedGuard } from '@app/services/server/guards/authenticated-guard-app'; | ||
import { addTaskToDailyPlanRequest } from '@app/services/server/requests'; | ||
import { addTaskToDailyPlanRequest, removeTaskFromPlanRequest } from '@app/services/server/requests'; | ||
import { NextResponse } from 'next/server'; | ||
|
||
export async function PUT(req: Request, { params }: INextParams) { | ||
export async function POST(req: Request, { params }: INextParams) { | ||
const res = new NextResponse(); | ||
|
||
const { planId } = params; | ||
if (!planId) { | ||
return; | ||
} | ||
|
||
const { $res, user, tenantId, organizationId, access_token } = await authenticatedGuard(req, res); | ||
const { $res, user, tenantId, access_token } = await authenticatedGuard(req, res); | ||
if (!user) return $res('Unauthorized'); | ||
|
||
const body = (await req.json()) as unknown as { employeeId: IEmployee['id']; taskId: ITeamTask['id'] }; | ||
const body = (await req.json()) as unknown as IDailyPlanTasksUpdate; | ||
|
||
const response = await addTaskToDailyPlanRequest({ | ||
bearer_token: access_token, | ||
data: body, | ||
organizationId, | ||
planId, | ||
tenantId | ||
}); | ||
|
||
return $res(response.data); | ||
} | ||
|
||
export async function PUT(req: Request, { params }: INextParams) { | ||
const res = new NextResponse(); | ||
|
||
const { planId } = params; | ||
if (!planId) { | ||
return; | ||
} | ||
|
||
const { $res, user, tenantId, access_token } = await authenticatedGuard(req, res); | ||
if (!user) return $res('Unauthorized'); | ||
|
||
const body = (await req.json()) as unknown as IDailyPlanTasksUpdate; | ||
|
||
const response = await removeTaskFromPlanRequest({ | ||
data: body, | ||
planId, | ||
tenantId, | ||
bearer_token: access_token | ||
}); | ||
|
||
return $res(response.data); | ||
} |
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.