Skip to content

Commit b65ac32

Browse files
author
Gabriele Panico
committed
Refactors ProjectUser model by renaming the file from project_user.ts to projectUsers.ts and updating imports across components and services. This change enhances consistency and organization of the project user data structure.
1 parent af16531 commit b65ac32

5 files changed

Lines changed: 25 additions & 41 deletions

File tree

src/app/components/project-item/project-item.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { AppConfigProvider } from 'src/app/services/app-config';
1515
import { ConvertRequestToConversation } from 'src/chat21-core/utils/convertRequestToConversation';
1616
import { compareValues, getUserStatusFromProjectUser } from 'src/chat21-core/utils/utils';
1717
import { ProjectService } from 'src/app/services/projects/project.service';
18-
import { ProjectUser } from 'src/chat21-core/models/project_user';
18+
import { ProjectUser } from 'src/chat21-core/models/projectUsers';
1919

2020
@Component({
2121
selector: 'app-project-item',

src/app/components/sidebar-user-details/sidebar-user-details.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ import { BRAND_BASE_INFO } from 'src/app/utils/utils-resources';
1818
import { getOSCode } from 'src/app/utils/utils';
1919
import { getUserStatusFromProjectUser } from 'src/chat21-core/utils/utils';
2020
import { ProjectService } from 'src/app/services/projects/project.service';
21-
import { ProjectUser } from 'src/chat21-core/models/project_user';
21+
import { ProjectUser } from 'src/chat21-core/models/projectUsers';
22+
2223
@Component({
2324
selector: 'app-sidebar-user-details',
2425
templateUrl: './sidebar-user-details.component.html',

src/app/services/projects/project.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance'
77
import { AppConfigProvider } from '../app-config';
88
import { Observable } from 'rxjs';
99
import { AppStorageService } from 'src/chat21-core/providers/abstract/app-storage.service';
10-
import { ProjectUser } from 'src/chat21-core/models/project_user';
10+
import { ProjectUser } from 'src/chat21-core/models/projectUsers';
1111

1212
@Injectable({
1313
providedIn: 'root'
Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,28 @@
11
export interface ProjectUser {
22
_id?: string;
3-
updatedAt?: any;
4-
createdAt?: any;
5-
id_project?: string;
6-
user_available?: boolean;
7-
role?: string;
3+
id?: string;
4+
__v?: any;
5+
attributes?: any;
6+
createdAt?: string | any;
87
createdBy?: string;
9-
is_group_member?: boolean;
10-
// id_user?: string;
8+
id_project?: any;
9+
id_user?: any;
1110
isAuthenticated?: boolean;
1211
isBusy?: boolean;
13-
status?: string;
14-
id_user?: any;
15-
rolePermissions?: string[];
12+
is_group_member?: boolean;
13+
last_login_at?: string;
14+
number_assigned_requests?: number;
15+
permissions?: any;
16+
presence?: { [key: string]: string } | any;
1617
profileStatus?: string;
17-
presence?: { [key: string]: string}
18-
__v?: any;
18+
role?: string;
19+
roleType?: number;
20+
rolePermissions?: string[];
21+
status?: string;
22+
tags?: any;
23+
trashed?: boolean;
24+
updatedAt?: string | any;
25+
user_available?: boolean;
26+
/** Derived in UI (e.g. from getUserStatusFromProjectUser) */
27+
teammateStatus?: any;
1928
}

src/chat21-core/models/project_user.ts

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)