diff --git a/api-config/api-url.ts b/api-config/api-url.ts
index 5ee4a0e..e8dd07c 100644
--- a/api-config/api-url.ts
+++ b/api-config/api-url.ts
@@ -1,4 +1,4 @@
export const environment = {
- apiUrl: 'https://localhost:44322',
- // apiUrl: 'http://localhost:8085',
+ // apiUrl: 'https://localhost:44322',
+ apiUrl: 'http://localhost:8085',
};
diff --git a/src/app/graph/components/add-graph/add-graph.component.ts b/src/app/graph/components/add-graph/add-graph.component.ts
index bd07b28..58cf71f 100644
--- a/src/app/graph/components/add-graph/add-graph.component.ts
+++ b/src/app/graph/components/add-graph/add-graph.component.ts
@@ -39,9 +39,7 @@ export class AddGraphComponent {
private _snackBar: MatSnackBar,
private addGraphService: AddGraphService,
private loadingService: LoadingService
- ) {
- this.loadingService.setLoading(false);
- }
+ ) {}
loadCategory() {
this.addGraphService.getCategories().subscribe({
diff --git a/src/app/graph/components/category/category.component.ts b/src/app/graph/components/category/category.component.ts
index 98a5722..5172db2 100644
--- a/src/app/graph/components/category/category.component.ts
+++ b/src/app/graph/components/category/category.component.ts
@@ -130,7 +130,6 @@ export class CategoryComponent implements OnInit {
}
saveEditCategory(categoryData: CategoryData) {
- console.log(categoryData);
this.loadingService.setLoading(true);
this.categoryService
.updateCategory(categoryData.id, this.updateNameValue)
diff --git a/src/app/graph/components/data-analysis/data-analysis.component.html b/src/app/graph/components/data-analysis/data-analysis.component.html
index 04b207e..ae2ddfb 100644
--- a/src/app/graph/components/data-analysis/data-analysis.component.html
+++ b/src/app/graph/components/data-analysis/data-analysis.component.html
@@ -31,47 +31,10 @@
-
-
- @for (account of accounts; track $index) {
-
- {{ account.entityName }}
-
-
-
- info
-
-
-
- }
-
-
-
+
diff --git a/src/app/graph/components/data-analysis/data-analysis.component.scss b/src/app/graph/components/data-analysis/data-analysis.component.scss
index adbc747..5cfe05a 100644
--- a/src/app/graph/components/data-analysis/data-analysis.component.scss
+++ b/src/app/graph/components/data-analysis/data-analysis.component.scss
@@ -45,56 +45,13 @@
}
.side-bard {
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- align-items: center;
position: absolute;
width: 25rem;
- height: 100%;
right: 0;
+ height: 100%;
- .form {
- width: 100%;
-
- .search-field {
- width: 100%;
- }
- }
-
- .accounts {
- display: flex;
- flex-direction: column;
- gap: 1rem;
- height: calc(100% - 4.5rem - 60px);
- overflow-y: auto;
- width: 100%;
- padding-block: 0.1rem;
-
- .account-data {
- padding: 0.75rem 1.5rem;
- border-radius: 10rem;
- box-shadow: 0px 1px 2px 0 rgba(0, 0, 0, 0.1);
- display: flex;
- justify-content: space-between;
- align-items: center;
- gap: 1rem;
-
- .icons {
- display: flex;
- gap: 0.5rem;
-
- .info-icon {
- color: var(--mdc-filled-button-container-color);
- cursor: pointer;
- }
-
- .material-symbols-outlined {
- color: var(--mat-optgroup-label-text-color);
- cursor: pointer;
- }
- }
- }
+ .search-component {
+ height: 100%;
}
}
}
diff --git a/src/app/graph/components/data-analysis/data-analysis.component.spec.ts b/src/app/graph/components/data-analysis/data-analysis.component.spec.ts
index 4b3f0ef..a9b6316 100644
--- a/src/app/graph/components/data-analysis/data-analysis.component.spec.ts
+++ b/src/app/graph/components/data-analysis/data-analysis.component.spec.ts
@@ -10,6 +10,9 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { SharedModule } from '../../../shared/shared.module';
import { provideHttpClient } from '@angular/common/http';
import { provideHttpClientTesting } from '@angular/common/http/testing';
+import { SearchNodesComponent } from './search-nodes/search-nodes.component';
+import { MatSelectModule } from '@angular/material/select';
+import { FormsModule } from '@angular/forms';
describe('DataAnalysisComponent', () => {
let component: DataAnalysisComponent;
@@ -17,7 +20,7 @@ describe('DataAnalysisComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
- declarations: [DataAnalysisComponent],
+ declarations: [DataAnalysisComponent, SearchNodesComponent],
imports: [
MatFormFieldModule,
MatPaginatorModule,
@@ -26,6 +29,8 @@ describe('DataAnalysisComponent', () => {
MatInputModule,
BrowserAnimationsModule,
SharedModule,
+ MatSelectModule,
+ FormsModule,
],
providers: [provideHttpClient(), provideHttpClientTesting()],
}).compileComponents();
diff --git a/src/app/graph/components/data-analysis/data-analysis.component.ts b/src/app/graph/components/data-analysis/data-analysis.component.ts
index 2fdcdd0..b028c73 100644
--- a/src/app/graph/components/data-analysis/data-analysis.component.ts
+++ b/src/app/graph/components/data-analysis/data-analysis.component.ts
@@ -7,7 +7,6 @@ import {
} from '@angular/core';
import { Data, DataSet, Edge, Network, Node } from 'vis';
import { LoadGraphService } from '../../services/load-graph/load-graph.service';
-import { PageEvent } from '@angular/material/paginator';
import { MatMenuTrigger } from '@angular/material/menu';
import { ThemeService } from '../../../shared/services/theme.service';
import { getOptions, getSvg } from './graph-options';
@@ -24,6 +23,7 @@ import { LoadingService } from '../../../shared/services/loading.service';
import { MatSnackBar } from '@angular/material/snack-bar';
import { DangerSuccessNotificationComponent } from '../../../shared/components/danger-success-notification/danger-success-notification.component';
import { ColorPickerDialogComponent } from './color-picker-dialog/color-picker-dialog.component';
+import { Account } from '../../model/graph';
@Component({
selector: 'app-data-analysis',
@@ -50,10 +50,6 @@ export class DataAnalysisComponent implements AfterViewInit {
private networkInstance!: Network;
public state = 'startRound';
- search = '';
- accounts: { id: number; entityName: string }[] = [];
- length!: number;
- pageIndex = 0;
isDarkMode!: boolean;
nodeColor!: string;
selectedNodeColor!: string;
@@ -72,12 +68,6 @@ export class DataAnalysisComponent implements AfterViewInit {
private loadingService: LoadingService
) {}
- handlePageEvent(e: PageEvent) {
- this.pageIndex = e.pageIndex;
- this.length = e.length;
- this.loadGraphService.getAllNodes(e.pageIndex);
- }
-
ngAfterViewInit() {
this.createGraph();
this.themeService.theme$.subscribe((theme) => {
@@ -85,24 +75,6 @@ export class DataAnalysisComponent implements AfterViewInit {
this.nodeColor = this.isDarkMode ? '#b5c4ff' : 'rgb(27, 89, 248)';
this.selectedNodeColor = this.isDarkMode ? 'rgb(27, 89, 248)' : '#b5c4ff';
});
- this.loadGraphService.nodesData$.subscribe({
- next: (data) => {
- this.accounts = data.items;
- this.length = data.totalItems;
- this.pageIndex = data.pageIndex;
- this.loadingService.setLoading(false);
- },
- error: (error) => {
- this._snackBar.openFromComponent(DangerSuccessNotificationComponent, {
- data: error.error.message,
- panelClass: ['notification-class-danger'],
- duration: 2000,
- });
- this.loadingService.setLoading(false);
- },
- });
- this.loadGraphService.getAllNodes();
- this.loadingService.setLoading(false);
}
private createGraph() {
@@ -208,13 +180,10 @@ export class DataAnalysisComponent implements AfterViewInit {
console.log('edge click: ', edgeId);
}
- getInfo(account?: number) {
- // todo: fix this
- if (!account) {
- account = (
- document.getElementById('right-click-node-info') as HTMLElement
- ).dataset['nodeid'] as unknown as number;
- }
+ getInfo() {
+ const account = (
+ document.getElementById('right-click-node-info') as HTMLElement
+ ).dataset['nodeid'] as unknown as number;
this.loadGraphService.getNodeInfo(account).subscribe({
next: (data) => {
@@ -235,7 +204,7 @@ export class DataAnalysisComponent implements AfterViewInit {
});
}
- showAsGraph(account: { id: number; entityName: string }) {
+ showAsGraph(account: Account) {
this.nodes.add({ id: account.id, label: account.entityName });
}
diff --git a/src/app/graph/components/data-analysis/info-dialog/info-dialog.component.ts b/src/app/graph/components/data-analysis/info-dialog/info-dialog.component.ts
index 80524d8..7520d94 100644
--- a/src/app/graph/components/data-analysis/info-dialog/info-dialog.component.ts
+++ b/src/app/graph/components/data-analysis/info-dialog/info-dialog.component.ts
@@ -7,17 +7,14 @@ import { MAT_DIALOG_DATA } from '@angular/material/dialog';
@for (key of objectKeys(data); track $index) {
-
+
}
-
+
-
`,
styles: [
`
@@ -34,6 +31,10 @@ import { MAT_DIALOG_DATA } from '@angular/material/dialog';
width: 40%;
font-weight: 600;
}
+
+ .info-content {
+ width: 60%;
+ }
}
.title {
diff --git a/src/app/graph/components/data-analysis/search-nodes/search-nodes.component.html b/src/app/graph/components/data-analysis/search-nodes/search-nodes.component.html
new file mode 100644
index 0000000..95e0910
--- /dev/null
+++ b/src/app/graph/components/data-analysis/search-nodes/search-nodes.component.html
@@ -0,0 +1,58 @@
+
+
+ @for (account of accounts; track $index) {
+
+ {{ account.entityName }}
+
+
+
+ info
+
+
+
+ }
+
+
+
diff --git a/src/app/graph/components/data-analysis/search-nodes/search-nodes.component.scss b/src/app/graph/components/data-analysis/search-nodes/search-nodes.component.scss
new file mode 100644
index 0000000..4481bde
--- /dev/null
+++ b/src/app/graph/components/data-analysis/search-nodes/search-nodes.component.scss
@@ -0,0 +1,55 @@
+:host {
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+ align-items: center;
+
+ .form {
+ width: 100%;
+ display: flex;
+ gap: 0.5rem;
+
+ .search-field {
+ width: 100%;
+ }
+
+ .search-type {
+ width: 67%;
+ }
+ }
+
+ .accounts {
+ display: flex;
+ flex-direction: column;
+ gap: 1rem;
+ height: calc(100% - 4.5rem - 60px);
+ overflow-y: auto;
+ width: 100%;
+ padding-block: 0.1rem;
+
+ .account-data {
+ padding: 0.75rem 1.5rem;
+ border-radius: 10rem;
+ box-shadow: 0px 1px 2px 0 rgba(0, 0, 0, 0.1);
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ gap: 1rem;
+
+ .icons {
+ display: flex;
+ gap: 0.5rem;
+
+ .info-icon {
+ color: var(--mdc-filled-button-container-color);
+ cursor: pointer;
+ }
+
+ .material-symbols-outlined {
+ color: var(--mat-optgroup-label-text-color);
+ cursor: pointer;
+ }
+ }
+ }
+ }
+}
diff --git a/src/app/graph/components/data-analysis/search-nodes/search-nodes.component.spec.ts b/src/app/graph/components/data-analysis/search-nodes/search-nodes.component.spec.ts
new file mode 100644
index 0000000..6f7d891
--- /dev/null
+++ b/src/app/graph/components/data-analysis/search-nodes/search-nodes.component.spec.ts
@@ -0,0 +1,38 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+import { SearchNodesComponent } from './search-nodes.component';
+import { provideHttpClient } from '@angular/common/http';
+import { provideHttpClientTesting } from '@angular/common/http/testing';
+import { MatPaginatorModule } from '@angular/material/paginator';
+import { MatIconModule } from '@angular/material/icon';
+import { MatInputModule } from '@angular/material/input';
+import { MatSelectModule } from '@angular/material/select';
+import { FormsModule } from '@angular/forms';
+import { NoopAnimationsModule } from '@angular/platform-browser/animations';
+
+describe('SearchNodesComponent', () => {
+ let component: SearchNodesComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ declarations: [SearchNodesComponent],
+ imports: [
+ MatPaginatorModule,
+ MatIconModule,
+ MatInputModule,
+ MatSelectModule,
+ FormsModule,
+ NoopAnimationsModule,
+ ],
+ providers: [provideHttpClient(), provideHttpClientTesting()],
+ }).compileComponents();
+
+ fixture = TestBed.createComponent(SearchNodesComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/graph/components/data-analysis/search-nodes/search-nodes.component.ts b/src/app/graph/components/data-analysis/search-nodes/search-nodes.component.ts
new file mode 100644
index 0000000..b94eef4
--- /dev/null
+++ b/src/app/graph/components/data-analysis/search-nodes/search-nodes.component.ts
@@ -0,0 +1,116 @@
+import { AfterViewInit, Component, EventEmitter, Output } from '@angular/core';
+import { PageEvent } from '@angular/material/paginator';
+import { LoadGraphService } from '../../../services/load-graph/load-graph.service';
+import { MatSnackBar } from '@angular/material/snack-bar';
+import { MatDialog } from '@angular/material/dialog';
+import { LoadingService } from '../../../../shared/services/loading.service';
+import { DangerSuccessNotificationComponent } from '../../../../shared/components/danger-success-notification/danger-success-notification.component';
+import { InfoDialogComponent } from '../info-dialog/info-dialog.component';
+import { Account } from '../../../model/graph';
+import { debounceTime, Observable, Subject } from 'rxjs';
+
+@Component({
+ selector: 'app-search-nodes',
+ templateUrl: './search-nodes.component.html',
+ styleUrl: './search-nodes.component.scss',
+})
+export class SearchNodesComponent implements AfterViewInit {
+ @Output() showGraph = new EventEmitter();
+
+ searchInput = '';
+ searchType = 'contain';
+ accounts: Account[] = [];
+ length!: number;
+ pageIndex = 0;
+
+ private searchText$ = new Subject();
+ nodeName$!: Observable;
+
+ constructor(
+ private _snackBar: MatSnackBar,
+ private loadGraphService: LoadGraphService,
+ private dialog: MatDialog,
+ private loadingService: LoadingService
+ ) {}
+
+ ngAfterViewInit(): void {
+ this.loadGraphService.nodesData$.subscribe({
+ next: (data) => {
+ this.accounts = data.items;
+ this.length = data.totalItems;
+ this.pageIndex = data.pageIndex;
+ this.loadingService.setLoading(false);
+ },
+ error: (error) => {
+ this._snackBar.openFromComponent(DangerSuccessNotificationComponent, {
+ data: error.error.message,
+ panelClass: ['notification-class-danger'],
+ duration: 2000,
+ });
+ this.loadingService.setLoading(false);
+ },
+ });
+
+ this.loadGraphService.getAllNodes();
+
+ this.nodeName$ = this.searchText$.pipe(debounceTime(500));
+
+ this.nodeName$.subscribe((searchInput) => {
+ this.loadGraphService.search(searchInput, this.searchType).subscribe({
+ next: (data) => {
+ this.accounts = data.items;
+ this.length = data.totalItems;
+ this.pageIndex = data.pageIndex;
+ this.loadingService.setLoading(false);
+ },
+ error: (error) => {
+ this._snackBar.openFromComponent(DangerSuccessNotificationComponent, {
+ data: error.error.message,
+ panelClass: ['notification-class-danger'],
+ duration: 2000,
+ });
+ this.loadingService.setLoading(false);
+ },
+ });
+ });
+ }
+
+ searchNodes() {
+ this.loadingService.setLoading(true);
+ if (!this.searchInput) {
+ this.loadGraphService.getAllNodes();
+ return;
+ }
+ this.searchText$.next(this.searchInput);
+ }
+
+ showAsGraph(account: Account) {
+ this.showGraph.emit(account);
+ }
+
+ getInfo(account: number) {
+ this.loadGraphService.getNodeInfo(account).subscribe({
+ next: (data) => {
+ this.dialog.open(InfoDialogComponent, {
+ width: '105rem',
+ data,
+ });
+ this.loadingService.setLoading(false);
+ },
+ error: (error) => {
+ this._snackBar.openFromComponent(DangerSuccessNotificationComponent, {
+ data: error.error.message,
+ panelClass: ['notification-class-danger'],
+ duration: 2000,
+ });
+ this.loadingService.setLoading(false);
+ },
+ });
+ }
+
+ handlePageEvent(e: PageEvent) {
+ this.pageIndex = e.pageIndex;
+ this.length = e.length;
+ this.loadGraphService.getAllNodes(e.pageIndex);
+ }
+}
diff --git a/src/app/graph/graph.module.ts b/src/app/graph/graph.module.ts
index 11fdf99..b8ea484 100644
--- a/src/app/graph/graph.module.ts
+++ b/src/app/graph/graph.module.ts
@@ -29,6 +29,7 @@ import { CatDeleteConfirmComponent } from './components/category/cat-delete-conf
import { CdkDrag, CdkDragHandle } from '@angular/cdk/drag-drop';
import { ColorPickerDialogComponent } from './components/data-analysis/color-picker-dialog/color-picker-dialog.component';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
+import { SearchNodesComponent } from './components/data-analysis/search-nodes/search-nodes.component';
@NgModule({
declarations: [
@@ -38,6 +39,7 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
CategoryComponent,
CatDeleteConfirmComponent,
ColorPickerDialogComponent,
+ SearchNodesComponent,
],
imports: [
CommonModule,
diff --git a/src/app/graph/model/graph.ts b/src/app/graph/model/graph.ts
index 5b0f0f7..41f9ce5 100644
--- a/src/app/graph/model/graph.ts
+++ b/src/app/graph/model/graph.ts
@@ -9,3 +9,8 @@ export interface Graph {
nodes: { id: string; label: string }[];
edges: { from: number; to: number; id: number }[];
}
+
+export interface Account {
+ id: number;
+ entityName: string;
+}
diff --git a/src/app/graph/services/load-graph/load-graph.service.ts b/src/app/graph/services/load-graph/load-graph.service.ts
index 1a988c4..873f18d 100644
--- a/src/app/graph/services/load-graph/load-graph.service.ts
+++ b/src/app/graph/services/load-graph/load-graph.service.ts
@@ -17,7 +17,7 @@ export class LoadGraphService {
constructor(
private http: HttpClient,
- private loadingService: LoadingService,
+ private loadingService: LoadingService
) {}
getAllNodes(pageIndex = 0, category = '') {
@@ -29,7 +29,7 @@ export class LoadGraphService {
`${this.apiUrl}/nodes?pageIndex=${pageIndex}&pageSize=${pageSize}&category=${category}`,
{
withCredentials: true,
- },
+ }
)
.subscribe((nodes) => {
this.nodesData.next(nodes);
@@ -42,7 +42,7 @@ export class LoadGraphService {
`${this.apiUrl}/nodes/${headerUniqueId}/attributes?id=${headerUniqueId}`,
{
withCredentials: true,
- },
+ }
);
}
@@ -52,7 +52,20 @@ export class LoadGraphService {
`${this.apiUrl}/nodes-relation?nodeId=${nodeId}`,
{
withCredentials: true,
- },
+ }
+ );
+ }
+
+ search(searchInput: string, searchType: string, pageIndex = 0) {
+ this.loadingService.setLoading(true);
+ const pageSize = 10;
+
+ return this.http.get(
+ this.apiUrl +
+ `/Search?searchInput=${searchInput}&searchType=${searchType}&pageIndex=${pageIndex}&pageSize=${pageSize}`,
+ {
+ withCredentials: true,
+ }
);
}
}
diff --git a/src/app/shared/components/validation-status/validation-status.component.ts b/src/app/shared/components/validation-status/validation-status.component.ts
index 83faf01..6f13562 100644
--- a/src/app/shared/components/validation-status/validation-status.component.ts
+++ b/src/app/shared/components/validation-status/validation-status.component.ts
@@ -8,18 +8,14 @@ import { FormGroup } from '@angular/forms';
Validation Status
@for (field of fields; track field) {
-
-
- {{
- myForm.controls[field.control]?.valid ? 'check_circle' : 'cancel'
- }}
-
- {{ field.message }}
-
+
+
+ {{ myForm.controls[field.control].valid ? 'check_circle' : 'cancel' }}
+
+ {{ field.message }}
+
}
`,
diff --git a/src/app/user/components/dashboard/assign-file/assign-dialog/assign-dialog.component.html b/src/app/user/components/dashboard/assign-file/assign-dialog/assign-dialog.component.html
index 0546f5f..6681c99 100644
--- a/src/app/user/components/dashboard/assign-file/assign-dialog/assign-dialog.component.html
+++ b/src/app/user/components/dashboard/assign-file/assign-dialog/assign-dialog.component.html
@@ -4,20 +4,10 @@ Assign User
diff --git a/src/app/user/components/dashboard/assign-file/assign-dialog/assign-dialog.component.ts b/src/app/user/components/dashboard/assign-file/assign-dialog/assign-dialog.component.ts
index ab2545c..a9c4d4a 100644
--- a/src/app/user/components/dashboard/assign-file/assign-dialog/assign-dialog.component.ts
+++ b/src/app/user/components/dashboard/assign-file/assign-dialog/assign-dialog.component.ts
@@ -11,7 +11,6 @@ import { LoadingService } from '../../../../../shared/services/loading.service';
import { DangerSuccessNotificationComponent } from '../../../../../shared/components/danger-success-notification/danger-success-notification.component';
import { MatSnackBar } from '@angular/material/snack-bar';
import { debounceTime, Observable, Subject } from 'rxjs';
-import { distinctUntilChanged } from 'rxjs';
@Component({
selector: 'app-assign-dialog',
@@ -59,10 +58,7 @@ export class AssignDialogComponent implements OnInit {
},
});
- this.userName$ = this.searchText$.pipe(
- debounceTime(500),
- distinctUntilChanged()
- );
+ this.userName$ = this.searchText$.pipe(debounceTime(500));
this.userName$.subscribe((searchInput) => {
this.assignFileService.search(searchInput).subscribe({
@@ -83,8 +79,10 @@ export class AssignDialogComponent implements OnInit {
}
search(userName: string) {
+ this.loadingService.setLoading(true);
if (!userName) {
this.reset();
+ this.loadingService.setLoading(false);
return;
}
if (userName == '[object Object]') {
diff --git a/src/app/user/components/dashboard/dashboard.component.html b/src/app/user/components/dashboard/dashboard.component.html
index 814663b..3a8e79c 100644
--- a/src/app/user/components/dashboard/dashboard.component.html
+++ b/src/app/user/components/dashboard/dashboard.component.html
@@ -23,20 +23,20 @@ StarData
- post_add
- Add Graph
+ category
+ Manage Categories
- category
- Manage Categories
+ post_add
+ Add Graph
{
this.fullName = `${data?.firstName} ${data?.lastName}`;
diff --git a/src/app/user/components/dashboard/manage-account/profile-header/profile-header.component.ts b/src/app/user/components/dashboard/manage-account/profile-header/profile-header.component.ts
index 95780a0..e659cb7 100644
--- a/src/app/user/components/dashboard/manage-account/profile-header/profile-header.component.ts
+++ b/src/app/user/components/dashboard/manage-account/profile-header/profile-header.component.ts
@@ -23,8 +23,7 @@ export class ProfileHeaderComponent {
const input = event.target as HTMLInputElement;
if (input.files && input.files.length > 0) {
const file = input.files[0];
-
- console.log('Selected file:', file);
+
this.userService.uploadImage(file).subscribe({
next: () => {
this._snackBar.openFromComponent(DangerSuccessNotificationComponent, {
@@ -37,7 +36,6 @@ export class ProfileHeaderComponent {
.getLoginUserInfo()
.subscribe((data: UserInformation) => {
this.userInfo = data;
- console.log(11, this.userInfo);
});
},
error: (error) => {
diff --git a/src/app/user/components/dashboard/manage-users/manage-users.component.ts b/src/app/user/components/dashboard/manage-users/manage-users.component.ts
index 1a02bca..895ebe6 100644
--- a/src/app/user/components/dashboard/manage-users/manage-users.component.ts
+++ b/src/app/user/components/dashboard/manage-users/manage-users.component.ts
@@ -41,7 +41,6 @@ export class ManageUsersComponent implements OnInit {
private _snackBar: MatSnackBar,
private loadingService: LoadingService,
) {
- this.loadingService.setLoading(false);
}
ngOnInit(): void {
diff --git a/src/app/user/services/assign-file/assign-file.service.ts b/src/app/user/services/assign-file/assign-file.service.ts
index 98a293b..03111d7 100644
--- a/src/app/user/services/assign-file/assign-file.service.ts
+++ b/src/app/user/services/assign-file/assign-file.service.ts
@@ -22,7 +22,7 @@ export class AssignFileService {
constructor(
private httpClient: HttpClient,
- private loadingService: LoadingService,
+ private loadingService: LoadingService
) {}
getFilesData(pageSize = 10, pageNumber = 0) {
@@ -32,7 +32,7 @@ export class AssignFileService {
this.apiUrl + `/files?page=${pageNumber}&limit=${pageSize}`,
{
withCredentials: true,
- },
+ }
)
.subscribe((files) => {
this.filesData.next(files);
@@ -45,7 +45,7 @@ export class AssignFileService {
this.apiUrl + `/files/users?fileId=${id}`,
{
withCredentials: true,
- },
+ }
);
}
@@ -55,13 +55,11 @@ export class AssignFileService {
this.apiUrl + `/users?username=${username}`,
{
withCredentials: true,
- },
+ }
);
}
setFileAccess(users: FileAccessUsers[], id: number) {
- console.log(users.map((user) => user.id));
-
this.loadingService.setLoading(true);
return this.httpClient
.post(
@@ -72,7 +70,7 @@ export class AssignFileService {
},
{
withCredentials: true,
- },
+ }
)
.subscribe({
next: () => {