-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feature/MARP-975-Display-compatibility-ra…
…nge-in-Marketplace-Items
- Loading branch information
1 parent
75e0dfb
commit 02cb4c7
Showing
38 changed files
with
966 additions
and
695 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,8 +22,4 @@ | |
<app-footer></app-footer> | ||
</footer> | ||
} | ||
|
||
@if (loadingService.isLoading()) { | ||
<app-loading-spinner /> | ||
} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 14 additions & 7 deletions
21
marketplace-ui/src/app/core/services/loading/loading.service.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,24 @@ | ||
import { computed, Injectable, signal } from '@angular/core'; | ||
import { Injectable, signal } from '@angular/core'; | ||
|
||
@Injectable({ | ||
providedIn: 'root' | ||
}) | ||
export class LoadingService { | ||
private readonly isShow = signal(false); | ||
isLoading = computed(() => this.isShow()); | ||
loadingStates = signal<{ [key: string]: boolean }>({}); | ||
|
||
show() { | ||
this.isShow.set(true); | ||
private setLoading(componentId: string, isLoading: boolean): void { | ||
this.loadingStates.update(states => { | ||
const updatedStates = { ...states }; | ||
updatedStates[componentId] = isLoading; | ||
return updatedStates; | ||
}); | ||
} | ||
|
||
hide() { | ||
this.isShow.set(false); | ||
showLoading(componentId: string): void { | ||
this.setLoading(componentId, true); | ||
} | ||
|
||
hideLoading(componentId: string) { | ||
this.setLoading(componentId, false); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.