Skip to content
This repository was archived by the owner on Jun 13, 2025. It is now read-only.

Commit 39c7f82

Browse files
Fix: linting and webapp migration (#248)
* Feat: ability to invite and add people to teams * Fix: notifications list
1 parent ae2f2c7 commit 39c7f82

File tree

9 files changed

+18
-14
lines changed

9 files changed

+18
-14
lines changed

apps/server/src/modules/notifications/notifications.module.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import { BullModule } from '@nestjs/bull';
33
import { Module } from '@nestjs/common';
44
import { PrismaModule, PrismaService } from 'nestjs-prisma';
55

6+
import { UsersService } from 'modules/users/users.service';
7+
68
import { NotificationsController } from './notifications.controller';
79
import { NotificationsProcessor } from './notifications.processor';
810
import { NotificationsQueue } from './notifications.queue';
@@ -19,6 +21,7 @@ import NotificationsService from './notifications.service';
1921
NotificationsService,
2022
PrismaService,
2123
NotificationsQueue,
24+
UsersService,
2225
NotificationsProcessor,
2326
],
2427
exports: [NotificationsService, NotificationsQueue],

apps/webapp/src/modules/actions/components/runs-table/run-options-dropdown.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ export function RunOptionsDropdown({ run }: RunOptionsDropdownProps) {
5858
replayRun({
5959
slug: run.action.slug,
6060
runId: run.id,
61-
workspaceId: run.action.workspaceId,
6261
});
6362
}}
6463
>
@@ -71,7 +70,6 @@ export function RunOptionsDropdown({ run }: RunOptionsDropdownProps) {
7170
cancelRun({
7271
slug: run.action.slug,
7372
runId: run.id,
74-
workspaceId: run.action.workspaceId,
7573
});
7674
}}
7775
>

apps/webapp/src/modules/updates/notifications-list.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { NotificationItem } from './notification-item';
1111
export const NotificationsList = observer(() => {
1212
const { notificationsStore } = useContextStore();
1313
const notifications = sort(notificationsStore.getNotifications).desc(
14-
(notification: NotificationType) => new Date(notification.updatedAt),
14+
(notification: NotificationType) => new Date(notification.createdAt),
1515
) as NotificationType[];
1616

1717
return (

apps/webapp/src/services/team/add-team-member.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
import { addTeamMember } from '@tegonhq/services';
22
import { useMutation } from 'react-query';
33

4-
import type { TeamType } from 'common/types';
5-
6-
export interface MutationParams {
4+
interface MutationParams {
75
onMutate?: () => void;
8-
onSuccess?: (data: TeamType) => void;
6+
onSuccess?: () => void;
97
onError?: (error: string) => void;
108
}
119

@@ -25,8 +23,8 @@ export function useAddTeamMemberMutation({
2523
onError && onError(errorText);
2624
};
2725

28-
const onMutationSuccess = (data: TeamType) => {
29-
onSuccess && onSuccess(data);
26+
const onMutationSuccess = () => {
27+
onSuccess && onSuccess();
3028
};
3129

3230
return useMutation(addTeamMember, {

apps/webapp/src/store/action/models.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ export const Action = types.model({
1212
version: types.string,
1313
integrations: types.array(types.string),
1414

15+
isDev: types.boolean,
16+
isPersonal: types.boolean,
17+
1518
data: types.string,
1619
status: types.enumeration([
1720
'DEPLOYING',

apps/webapp/src/store/action/save-data.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ export async function saveActionData(
2222
name: record.data.name,
2323
description: record.data.description,
2424
slug: record.data.slug,
25+
isDev: record.data.isDev,
26+
isPersonal: record.data.isPersonal,
2527

2628
integrations: record.data.integrations,
2729
data: JSON.stringify(record.data.data),

apps/webapp/src/store/database.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export class TegonDatabase extends Dexie {
3939
constructor(databaseName: string) {
4040
super(databaseName);
4141

42-
this.version(5).stores({
42+
this.version(6).stores({
4343
[MODELS.Workspace]: 'id,createdAt,updatedAt,name,slug',
4444
[MODELS.Label]:
4545
'id,createdAt,updatedAt,name,color,description,workspaceId,groupId,teamId',
@@ -67,7 +67,7 @@ export class TegonDatabase extends Dexie {
6767
[MODELS.IssueSuggestion]:
6868
'id,createdAt,updatedAt,issueId,suggestedLabelIds,suggestedAssigneeId',
6969
[MODELS.Action]:
70-
'id,createdAt,updatedAt,workspaceId,config,data,status,version,name,description,integrations,createdById,slug',
70+
'id,createdAt,updatedAt,workspaceId,config,data,status,version,name,description,integrations,createdById,slug,isDev,isPersonal',
7171
});
7272

7373
this.workspaces = this.table(MODELS.Workspace);

packages/services/src/team/add-team-member.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { AddMemberDto } from '@tegonhq/types';
1+
import { AddTeamMemberDto } from '@tegonhq/types';
22
import axios from 'axios';
33

4-
export async function addTeamMember({ teamId, userId }: AddMemberDto) {
4+
export async function addTeamMember({ teamId, userId }: AddTeamMemberDto) {
55
const response = await axios.post(`/api/v1/teams/${teamId}/add-member`, {
66
userId,
77
});
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export class AddMemberDto {
1+
export class AddTeamMemberDto {
22
userId: string;
33
teamId: string;
44
}

0 commit comments

Comments
 (0)