Skip to content

Commit

Permalink
Merge pull request #2085 from ever-co/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
evereq authored Jan 12, 2024
2 parents a24bf94 + 75dd41a commit 24e36ec
Show file tree
Hide file tree
Showing 69 changed files with 1,239 additions and 269 deletions.
33 changes: 33 additions & 0 deletions .nx/cache/nx-console-project-graph/project-graph.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!DOCTYPE html>
<html lang="en" class="h-full w-full overflow-hidden">
<head>
<meta charset="utf-8" />
<title>Nx Workspace Project Graph</title>


<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />

<script id="environment" src="static/environment.js"></script>

<!-- Theming -->
<script>
// On page load or when changing themes, best to add inline in `head` to avoid FOUC
if (
localStorage.getItem('nx-dep-graph-theme') === 'dark' ||
(localStorage.getItem('nx-dep-graph-theme') === null &&
window.matchMedia('(prefers-color-scheme: dark)').matches)
) {
document.documentElement.classList.add('dark');
} else {
document.documentElement.classList.remove('dark');
}
</script>
<link rel="stylesheet" href="static/styles.css"></head>

<body
class="h-full w-full overflow-hidden bg-white text-slate-500 dark:bg-slate-900 dark:text-slate-400"
>
<div class="flex h-full w-full overflow-hidden p-0" id="app"></div>
<script src="static/runtime.js" ></script><script src="static/polyfills.js" ></script><script src="static/styles.js" ></script><script src="static/main.js" ></script></body>
</html>
665 changes: 665 additions & 0 deletions .nx/cache/nx-console-project-graph/static/3rdpartylicenses.txt

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions .nx/cache/nx-console-project-graph/static/environment.js

Large diffs are not rendered by default.

Binary file not shown.
1 change: 1 addition & 0 deletions .nx/cache/nx-console-project-graph/static/main.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .nx/cache/nx-console-project-graph/static/polyfills.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .nx/cache/nx-console-project-graph/static/runtime.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .nx/cache/nx-console-project-graph/static/styles.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .nx/cache/nx-console-project-graph/static/styles.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apps/web/app/api/integration/github/metadata/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ export async function GET(req: Request) {
access_token
);

return $res(response);
return $res(response.data);
}
2 changes: 1 addition & 1 deletion apps/web/app/api/integration/github/oauth/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ export async function POST(req: Request) {
access_token
);

return $res(response);
return $res(response.data);
}
2 changes: 1 addition & 1 deletion apps/web/app/api/integration/github/repositories/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ export async function GET(req: Request) {
access_token
);

return $res(response);
return $res(response.data);
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ export async function POST(req: Request) {
access_token
);

return $res(response);
return $res(response.data);
}
4 changes: 3 additions & 1 deletion apps/web/app/api/issue-types/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ export async function GET(req: Request) {
organizationTeamId: (organizationTeamId as string) || null
};

return $res(await getIssueTypesListRequest(par, access_token));
const { data } = await getIssueTypesListRequest(par, access_token);

return $res(data);
}

export async function POST(req: Request) {
Expand Down
4 changes: 3 additions & 1 deletion apps/web/app/api/languages/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@ export async function GET(req: Request) {
tenantId
};

return $res(await getLanguageListRequest(par, access_token));
const { data } = await getLanguageListRequest(par, access_token);

return $res(data);
}
4 changes: 3 additions & 1 deletion apps/web/app/api/tags/level/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,7 @@ export async function GET(req: Request) {
organizationTeamId: (organizationTeamId as string) || null
};

return $res(await getTaskLabelsListRequest(par, access_token));
const { data } = await getTaskLabelsListRequest(par, access_token);

return $res(data);
}
4 changes: 3 additions & 1 deletion apps/web/app/api/task-priorities/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ export async function GET(req: Request) {
organizationTeamId: (organizationTeamId as string) || null
};

return $res(await getTaskPrioritiesListRequest(par, access_token));
const { data } = await getTaskPrioritiesListRequest(par, access_token);

return $res(data);
}

export async function POST(req: Request) {
Expand Down
4 changes: 3 additions & 1 deletion apps/web/app/api/task-related-issue-types/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ export async function GET(req: Request) {
organizationTeamId: (organizationTeamId as string) || null
};

return $res(await getTaskRelatedIssueTypeListRequest(par, access_token));
const { data } = await getTaskRelatedIssueTypeListRequest(par, access_token);

return $res(data);
}

export async function POST(req: Request) {
Expand Down
4 changes: 3 additions & 1 deletion apps/web/app/api/task-sizes/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ export async function GET(req: Request) {
organizationTeamId: (organizationTeamId as string) || null
};

return $res(await getTaskSizesListRequest(par, access_token));
const { data } = await getTaskSizesListRequest(par, access_token);

return $res(data);
}

export async function POST(req: Request) {
Expand Down
4 changes: 3 additions & 1 deletion apps/web/app/api/task-statuses/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ export async function GET(req: Request) {
organizationTeamId: (organizationTeamId as string) || null
};

return $res(await getTaskStatusListRequest(par, access_token));
const { data } = await getTaskStatusListRequest(par, access_token);

return $res(data);
}

export async function POST(req: Request) {
Expand Down
4 changes: 3 additions & 1 deletion apps/web/app/api/task-versions/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ export async function GET(req: Request) {
organizationTeamId: (organizationTeamId as string) || null
};

return $res(await getTaskVersionListRequest(par, access_token));
const { data } = await getTaskVersionListRequest(par, access_token);

return $res(data);
}

export async function POST(req: Request) {
Expand Down
23 changes: 22 additions & 1 deletion apps/web/app/api/timer/slot/route.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { authenticatedGuard } from '@app/services/server/guards/authenticated-guard-app';
import { getEmployeeTimeSlotsRequest } from '@app/services/server/requests/timer/timer-slot';
import {
deleteEmployeeTimeSlotsRequest,
getEmployeeTimeSlotsRequest
} from '@app/services/server/requests/timer/timer-slot';
import { NextResponse } from 'next/server';

export async function GET(req: Request) {
Expand Down Expand Up @@ -27,3 +30,21 @@ export async function GET(req: Request) {

return $res(data);
}

export async function DELETE(req: Request) {
const res = new NextResponse();
const { $res, user, tenantId, organizationId, access_token } = await authenticatedGuard(req, res);
if (!user) return $res('Unauthorized');

const { searchParams } = new URL(req.url);
const ids: string[] = searchParams.getAll('ids');

const { data } = await deleteEmployeeTimeSlotsRequest({
tenantId,
organizationId,
ids,
bearer_token: access_token
});

return $res(data);
}
13 changes: 7 additions & 6 deletions apps/web/app/api/user/[id]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ export async function GET(req: Request, { params }: { params: { id: string } })
if (!user) return $res('Unauthorized');

const { id: userId } = params;
return $res(
await getTaskCreator({
userId: userId as string,
bearer_token: access_token
})
);

const { data } = await getTaskCreator({
userId: userId as string,
bearer_token: access_token
});

return $res(data);
}

export async function PUT(req: Request) {
Expand Down
7 changes: 4 additions & 3 deletions apps/web/app/hooks/features/useEmployee.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ export const useEmployee = () => {
if (!user?.tenantId) {
return;
}
getWorkingEmployeeQueryCall(user?.tenantId, user?.employee.organizationId).then((data) => {
if (data?.data?.items && data?.data?.items?.length) {
const items = data.data.items || [];
getWorkingEmployeeQueryCall(user?.tenantId, user?.employee.organizationId).then(({ data }) => {
if (data?.items && data?.items?.length) {
const items = data.items || [];

setWorkingEmployees(items);
setWorkingEmployeesEmail(items.map((item: any) => item.user?.email || ''));
}
Expand Down
8 changes: 4 additions & 4 deletions apps/web/app/hooks/features/useIssueTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export function useIssueType() {

queryCall(user?.tenantId as string, user?.employee?.organizationId as string, activeTeamId || null).then(
(res) => {
setIssueTypes(res?.data?.data?.items || []);
setIssueTypes(res.data?.items || []);
return res;
}
);
Expand All @@ -49,7 +49,7 @@ export function useIssueType() {
user?.employee?.organizationId as string,
activeTeamId || null
).then((res) => {
setIssueTypes(res?.data?.data?.items || []);
setIssueTypes(res?.data?.items || []);
return res;
});
}
Expand All @@ -72,7 +72,7 @@ export function useIssueType() {
user?.employee?.organizationId as string,
activeTeamId || null
).then((res) => {
setIssueTypes(res?.data?.data?.items || []);
setIssueTypes(res?.data?.items || []);
return res;
});
return res;
Expand All @@ -93,7 +93,7 @@ export function useIssueType() {
user?.employee?.organizationId as string,
activeTeamId || null
).then((res) => {
setIssueTypes(res?.data?.data?.items || []);
setIssueTypes(res?.data?.items || []);
return res;
});
return res;
Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/hooks/features/useLanguageSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function useLanguageSettings() {
const loadLanguagesData = useCallback(() => {
setActiveLanguageId(getActiveLanguageIdCookie());
if (user) {
return queryCall(user.role.isSystem).then((res) => {
return queryCall(user.role.isSystem).then((res) => {
setLanguages(
res?.data?.items.filter((item: any) => APPLICATION_LANGUAGES_CODE.includes(item.code)) || []
);
Expand Down
10 changes: 5 additions & 5 deletions apps/web/app/hooks/features/useTaskLabels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ export function useTaskLabels() {
user?.employee?.organizationId as string,
activeTeamId || teamId || null
).then((res) => {
if (!isEqual(res?.data?.data?.items || [], taskLabels)) {
setTaskLabels(res?.data?.data?.items || []);
if (!isEqual(res?.data?.items || [], taskLabels)) {
setTaskLabels(res?.data?.items || []);
}

return res;
Expand Down Expand Up @@ -75,7 +75,7 @@ export function useTaskLabels() {
user?.employee?.organizationId as string,
activeTeamId || null
).then((res) => {
setTaskLabels(res?.data?.data?.items || []);
setTaskLabels(res?.data?.items || []);
return res;
});
}
Expand All @@ -97,7 +97,7 @@ export function useTaskLabels() {
user?.employee?.organizationId as string,
activeTeamId || null
).then((res) => {
setTaskLabels(res?.data?.data?.items || []);
setTaskLabels(res?.data?.items || []);
return res;
});
return res;
Expand All @@ -116,7 +116,7 @@ export function useTaskLabels() {
user?.employee?.organizationId as string,
activeTeamId || null
).then((res) => {
setTaskLabels(res?.data?.data?.items || []);
setTaskLabels(res?.data?.items || []);
return res;
});
return res;
Expand Down
8 changes: 4 additions & 4 deletions apps/web/app/hooks/features/useTaskPriorities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ export function useTaskPriorities() {
user?.employee?.organizationId as string,
activeTeamId || teamId || null
).then((res) => {
if (!isEqual(res?.data?.data?.items || [], taskPriorities)) {
setTaskPriorities(res?.data?.data?.items || []);
if (!isEqual(res?.data?.items || [], taskPriorities)) {
setTaskPriorities(res?.data?.items || []);
}

return res;
Expand Down Expand Up @@ -83,7 +83,7 @@ export function useTaskPriorities() {
user?.employee?.organizationId as string,
activeTeamId || null
).then((res) => {
setTaskPriorities(res?.data?.data?.items || []);
setTaskPriorities(res?.data?.items || []);
return res;
});
return res;
Expand All @@ -102,7 +102,7 @@ export function useTaskPriorities() {
user?.employee?.organizationId as string,
activeTeamId || null
).then((res) => {
setTaskPriorities(res?.data?.data?.items || []);
setTaskPriorities(res?.data?.items || []);
return res;
});
return res;
Expand Down
8 changes: 4 additions & 4 deletions apps/web/app/hooks/features/useTaskRelatedIssueType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ export function useTaskRelatedIssueType() {
user?.employee?.organizationId as string,
activeTeamId || teamId || null
).then((res) => {
if (!isEqual(res?.data?.data?.items || [], taskRelatedIssueType)) {
setTaskRelatedIssueType(res?.data?.data?.items || []);
if (!isEqual(res?.data?.items || [], taskRelatedIssueType)) {
setTaskRelatedIssueType(res?.data?.items || []);
}
return res;
});
Expand Down Expand Up @@ -86,7 +86,7 @@ export function useTaskRelatedIssueType() {
user?.employee?.organizationId as string,
activeTeamId || null
).then((res) => {
setTaskRelatedIssueType(res?.data?.data?.items || []);
setTaskRelatedIssueType(res?.data?.items || []);
return res;
});
return res;
Expand All @@ -105,7 +105,7 @@ export function useTaskRelatedIssueType() {
user?.employee?.organizationId as string,
activeTeamId || null
).then((res) => {
setTaskRelatedIssueType(res?.data?.data?.items || []);
setTaskRelatedIssueType(res?.data?.items || []);
return res;
});
return res;
Expand Down
8 changes: 4 additions & 4 deletions apps/web/app/hooks/features/useTaskSizes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ export function useTaskSizes() {
user?.employee?.organizationId as string,
activeTeamId || teamId || null
).then((res) => {
if (!isEqual(res?.data?.data?.items || [], taskSizes)) {
setTaskSizes(res?.data?.data?.items || []);
if (!isEqual(res?.data?.items || [], taskSizes)) {
setTaskSizes(res?.data?.items || []);
}

return res;
Expand Down Expand Up @@ -80,7 +80,7 @@ export function useTaskSizes() {
user?.employee?.organizationId as string,
activeTeamId || null
).then((res) => {
setTaskSizes(res?.data?.data?.items || []);
setTaskSizes(res?.data?.items || []);
return res;
});
return res;
Expand All @@ -99,7 +99,7 @@ export function useTaskSizes() {
user?.employee?.organizationId as string,
activeTeamId || null
).then((res) => {
setTaskSizes(res?.data?.data?.items || []);
setTaskSizes(res?.data?.items || []);
return res;
});
return res;
Expand Down
Loading

0 comments on commit 24e36ec

Please sign in to comment.