feat: add refresh functionality to various components
- Implemented refresh event emission in multiple list components across partner and superAdmin modules. - Updated consumers and customers list components to handle refresh actions. - Enhanced dashboard component to fetch partner info on initialization. - Introduced new API method in PartnerService to retrieve current partner data. - Modified PartnerStore to utilize the new API method for fetching partner information. - Updated UI elements to reflect changes in partner and license management, including new fields for license renewals. - Added a new POS display component for better presentation of POS terminal information. - Updated layout service and top bar to reflect new titles and improve user experience. - Refactored existing components to ensure consistency and maintainability.
This commit is contained in:
@@ -13,12 +13,12 @@
|
||||
class="grow flex! flex-col overflow-hidden"
|
||||
[tableStyleClass]="!items.length && !loading ? 'h-full' : ''"
|
||||
>
|
||||
@if (pageTitle || showAdd || filter || caption) {
|
||||
@if (pageTitle || showAdd || filter || caption || showRefresh || moreActions) {
|
||||
<ng-template pTemplate="caption">
|
||||
<ng-container [ngTemplateOutlet]="caption">
|
||||
<div class="flex justify-between items-center gap-4">
|
||||
<h5 class="font-bold">{{ pageTitle }}</h5>
|
||||
@if (showAdd || filter || moreActions) {
|
||||
@if (showAdd || filter || showRefresh || moreActions) {
|
||||
<div class="flex items-center gap-2">
|
||||
<ng-container [ngTemplateOutlet]="moreActions" />
|
||||
@if (filter) {
|
||||
@@ -31,6 +31,9 @@
|
||||
(click)="openFilter()"
|
||||
></p-button>
|
||||
}
|
||||
@if (showRefresh) {
|
||||
<p-button icon="pi pi-refresh" outlined (click)="refresh()"></p-button>
|
||||
}
|
||||
@if (showAdd) {
|
||||
<p-button label="{{ addNewCtaLabel }}" icon="pi pi-plus" (click)="openAddForm()"></p-button>
|
||||
}
|
||||
|
||||
@@ -89,6 +89,7 @@ export class PageDataListComponent<I> {
|
||||
@Input() showDelete: boolean = false;
|
||||
@Input() showDetails: boolean = false;
|
||||
@Input() showAdd: boolean = false;
|
||||
@Input() showRefresh: boolean = true;
|
||||
@Input() isFiltered: boolean = false;
|
||||
@Input() fullHeight?: boolean = false;
|
||||
@Input() height: string = '';
|
||||
@@ -108,6 +109,7 @@ export class PageDataListComponent<I> {
|
||||
@Output() onAdd = new EventEmitter<void>();
|
||||
@Output() pageChange = new EventEmitter<any>();
|
||||
@Output() onThumbnailClick = new EventEmitter<I>();
|
||||
@Output() onRefresh = new EventEmitter();
|
||||
|
||||
filterDrawerVisible = signal<boolean>(false);
|
||||
expandedRows: { [key: string]: boolean } = {};
|
||||
@@ -258,4 +260,8 @@ export class PageDataListComponent<I> {
|
||||
if (this.showDetails) totalCount += 1;
|
||||
return totalCount;
|
||||
});
|
||||
|
||||
refresh() {
|
||||
this.onRefresh.emit();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user