Skip to content

Commit 4b4c15a

Browse files
authored
Merge pull request #192 from CapstoneProjectCMC/feature/sap-service-and-payment
Feature/sap service and payment
2 parents 6acc357 + dd745f0 commit 4b4c15a

File tree

32 files changed

+601
-494
lines changed

32 files changed

+601
-494
lines changed
-72 Bytes
Binary file not shown.

src/app/app.routes.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,6 @@ export const routes: Routes = [
144144
import('./features/organization/organization.module').then(
145145
(m) => m.OrganizationModule
146146
),
147-
data: { roles: ['ADMIN'] },
148-
canActivate: [RoleGuard],
149147
},
150148
],
151149
},

src/app/core/interceptors/config/ignoreApiHandleError.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ export const IGNORE_ERROR_NOTIFICATION_URLS = [
44
'/submission/exercise/quiz/', // Bỏ qua tất cả endpoint chứa pattern này
55
'/profile/user/',
66
'/submission/exercise/coding/',
7+
'/notification/',
8+
'/ai/chat/',
79
// Ví dụ pattern regex: /\/submission\/exercise\/quiz\/\d+(\?.*)?$/
810
// Thêm các endpoint khác nếu cần
911
];

src/app/core/models/comment.models.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export interface CommentResponse {
3232
content: string;
3333
replies?: CommentResponse[] | []; // đệ quy
3434
user: User;
35+
createdAt: string;
3536
}
3637

3738
export interface AddCommentResponse {

src/app/core/models/post.models.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export interface postData {
7171
}
7272
export type PostType = 'Global' | 'Private' | 'Org';
7373
export interface FileDocument {
74-
file?: File;
74+
file?: File[];
7575
category?: string; // BE mong muốn STRING
7676
description?: string;
7777
tags?: string[]; // mảng -> sẽ append tags[0], tags[1]...
@@ -102,7 +102,7 @@ export interface CreatePostRequest {
102102
hashtag?: string;
103103

104104
fileDocument?: {
105-
file?: File;
105+
files?: File[];
106106
category?: string;
107107
description?: string;
108108
tags?: string[];
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export interface NotificationEvent {
2+
channel: string;
3+
recipient: string;
4+
templateCode: string;
5+
param: Record<string, any>;
6+
subject: string;
7+
body: string;
8+
}

src/app/core/router-manager/horizontal-menu.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,12 @@ export function getNavHorizontalItems(roles: string[]): SidebarItem[] {
5353
},
5454
{
5555
id: 'organization ',
56-
path: '/organization/orgs-list',
56+
path: roles.includes('ADMIN')
57+
? '/organization/orgs-list'
58+
: '/organization/org-list-post',
5759
label: 'Tổ chức',
5860
icon: 'fa-solid fa-building-user',
59-
isVisible: !roles.includes(auth_lv2[0]),
61+
// isVisible: !roles.includes(auth_lv2[0]),
6062
},
6163
];
6264
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,27 @@
11
import { SidebarItem } from '../../models/data-handle';
22

33
export function sidebarOrgRouter(roles: string[]): SidebarItem[] {
4+
const auth_lv2 = ['ADMIN'];
5+
46
return [
57
{
68
id: 'list-orgs',
79
path: '/organization/orgs-list',
810
label: 'Danh sách tổ chức',
911
icon: 'fa-solid fa-tasks',
12+
isVisible: !roles.includes(auth_lv2[0]),
13+
},
14+
{
15+
id: 'list-posts-org',
16+
path: '/organization/org-list-post',
17+
label: 'Danh sách bài viết',
18+
icon: 'fa-solid fa-newspaper',
19+
},
20+
{
21+
id: 'list-exercise-org',
22+
path: '/organization/org-list-exercise',
23+
label: 'Danh sách bài tập',
24+
icon: 'fa-solid fa-book',
1025
},
1126
];
1227
}

src/app/core/services/api-service/notification-list.service.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,10 @@ export class NotificationListService {
3131
Ids
3232
);
3333
}
34+
35+
countMyUnread() {
36+
return this.api.get<ApiResponse<number>>(
37+
API_CONFIG.ENDPOINTS.GET.GET_COUNT_MY_UNREAD
38+
);
39+
}
3440
}

src/app/core/services/api-service/organization.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export class OrganizationService {
5454
return this.api.patchWithFormData<ApiResponse<null>>(
5555
API_CONFIG.ENDPOINTS.PATCH.EDIT_ORG(orgId),
5656
otherData,
57-
logo
57+
{ logo }
5858
);
5959
}
6060

0 commit comments

Comments
 (0)