feat: add licenses management module with filtering and listing functionality
- Introduced new constants and routes for licenses management. - Created components for licenses filter form and list display. - Implemented services for fetching licenses data from the API. - Added dialog components for creating and editing licenses. - Updated partner menu to include a link to licenses. - Refactored existing components to improve code structure and maintainability.
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
import { Maybe } from '@/core';
|
||||
import { IListingResponse, IPaginatedResponse } from '@/core/models/service.model';
|
||||
import {
|
||||
IListingResponse,
|
||||
IPaginatedResponse,
|
||||
IResponseMetadata,
|
||||
} from '@/core/models/service.model';
|
||||
import { Component, signal } from '@angular/core';
|
||||
import { catchError, finalize, Observable } from 'rxjs';
|
||||
import { IColumn } from '../components/pageDataList/page-data-list.component';
|
||||
@@ -16,6 +20,8 @@ export abstract class AbstractList<ResponseModel, RequestParams = null> {
|
||||
requestPayload = signal<Maybe<RequestParams>>(null);
|
||||
selectedItemForEdit = signal<Maybe<ResponseModel>>(null);
|
||||
editMode = signal(false);
|
||||
withPagination = signal(false);
|
||||
responseMetaData = signal<Maybe<IResponseMetadata>>(null);
|
||||
|
||||
ngOnInit() {
|
||||
this.setColumns();
|
||||
@@ -39,6 +45,9 @@ export abstract class AbstractList<ResponseModel, RequestParams = null> {
|
||||
}),
|
||||
)
|
||||
.subscribe((res) => {
|
||||
if ('meta' in res) {
|
||||
this.responseMetaData.set(res.meta);
|
||||
}
|
||||
this.items.set(res.data ?? []);
|
||||
});
|
||||
}
|
||||
@@ -71,4 +80,8 @@ export abstract class AbstractList<ResponseModel, RequestParams = null> {
|
||||
onCloseEdit() {
|
||||
this.visibleForm.set(false);
|
||||
}
|
||||
|
||||
changePage(page: number) {
|
||||
// this.
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user