feat: update app version and build details in ngsw-config.json
fix: add baseZIndex to p-toast component in app.component.ts feat: enhance pagination support in saleInvoices list component refactor: modify saleInvoices service to accept pagination query feat: update API routes for saleInvoices to support pagination fix: adjust layout for consumer accounts in partner module style: improve layout for consumer business activities in partner module fix: update license info display in dashboard component fix: ensure price info card displays default values for discount and tax refactor: clean up gold payload form component fix: adjust root component layout for mobile view refactor: unify consumer account list configuration across modules chore: remove deprecated partner consumer account list config chore: remove deprecated superAdmin consumer account list config feat: add new consumer account list configuration style: add summary list styling in customize.scss chore: switch API base URL for TIS environment
This commit is contained in:
@@ -4,7 +4,11 @@
|
||||
emptyPlaceholderTitle="فاکتوری یافت نشد"
|
||||
[items]="items()"
|
||||
[loading]="loading()"
|
||||
[perPage]="responseMetaData()?.perPage"
|
||||
[currentPage]="responseMetaData()?.page"
|
||||
[totalRecords]="responseMetaData()?.totalRecords || items().length"
|
||||
[showDetails]="true"
|
||||
(onDetails)="toSinglePage($event)"
|
||||
(onRefresh)="refresh()"
|
||||
(onChangePage)="changePage($event)"
|
||||
/>
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
// import { CatalogRoleTagComponent } from '@/shared/catalog/roles';
|
||||
import { Maybe } from '@/core';
|
||||
import { AbstractList } from '@/shared/abstractClasses/abstract-list';
|
||||
import {
|
||||
IColumn,
|
||||
PageDataListComponent,
|
||||
} from '@/shared/components/pageDataList/page-data-list.component';
|
||||
import { IPaginatedQuery } from '@/core/models/service.model';
|
||||
import { saleInvoiceListConfig } from '@/shared/constants/list-configs';
|
||||
import { Component, inject, Input } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
@@ -16,7 +18,10 @@ import { ConsumerSaleInvoicesService } from '../services/main.service';
|
||||
templateUrl: './list.component.html',
|
||||
imports: [PageDataListComponent],
|
||||
})
|
||||
export class ConsumerSaleInvoiceListComponent extends AbstractList<IConsumerSaleInvoicesResponse> {
|
||||
export class ConsumerSaleInvoiceListComponent extends AbstractList<
|
||||
IConsumerSaleInvoicesResponse,
|
||||
IPaginatedQuery
|
||||
> {
|
||||
@Input() fullHeight?: boolean;
|
||||
@Input() header: IColumn[] = saleInvoiceListConfig.columns;
|
||||
|
||||
@@ -27,8 +32,8 @@ export class ConsumerSaleInvoiceListComponent extends AbstractList<IConsumerSale
|
||||
this.columns = this.header;
|
||||
}
|
||||
|
||||
override getDataRequest() {
|
||||
return this.service.getAll();
|
||||
override getDataRequest(payload: Maybe<IPaginatedQuery>) {
|
||||
return this.service.getAll(payload || undefined);
|
||||
}
|
||||
|
||||
toSinglePage(item: IConsumerSaleInvoicesResponse) {
|
||||
|
||||
@@ -1,6 +1,15 @@
|
||||
import { IPaginatedQuery } from '@/core/models/service.model';
|
||||
|
||||
const baseUrl = () => `/api/v1/consumer/sale-invoices`;
|
||||
|
||||
export const CONSUMER_SALE_INVOICES_API_ROUTES = {
|
||||
list: () => baseUrl(),
|
||||
list: (paginationQuery?: IPaginatedQuery) => {
|
||||
if (!paginationQuery) return baseUrl();
|
||||
const params = new URLSearchParams();
|
||||
if (paginationQuery.page) params.set('page', String(paginationQuery.page));
|
||||
if (paginationQuery.pageSize) params.set('perPage', String(paginationQuery.pageSize));
|
||||
const query = params.toString();
|
||||
return query ? `${baseUrl()}?${query}` : baseUrl();
|
||||
},
|
||||
single: (id: string) => `${baseUrl()}/${id}`,
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { IPaginatedResponse } from '@/core/models/service.model';
|
||||
import { IPaginatedQuery, IPaginatedResponse } from '@/core/models/service.model';
|
||||
import { ISaleInvoiceFullRawResponse, ISaleInvoiceFullResponse } from '@/domains/consumer/models';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
@@ -12,9 +12,9 @@ export class ConsumerSaleInvoicesService {
|
||||
|
||||
private apiRoutes = CONSUMER_SALE_INVOICES_API_ROUTES;
|
||||
|
||||
getAll(): Observable<IPaginatedResponse<IConsumerSaleInvoicesResponse>> {
|
||||
getAll(paginationQuery?: IPaginatedQuery): Observable<IPaginatedResponse<IConsumerSaleInvoicesResponse>> {
|
||||
return this.http.get<IPaginatedResponse<IConsumerSaleInvoicesRawResponse>>(
|
||||
this.apiRoutes.list(),
|
||||
this.apiRoutes.list(paginationQuery),
|
||||
);
|
||||
}
|
||||
getSingle(invoiceId: string): Observable<ISaleInvoiceFullResponse> {
|
||||
|
||||
Reference in New Issue
Block a user