feat: remove AGENT.md and add new agents.md with updated repository-specific instructions
refactor: update shared-saleInvoice.component.ts to simplify SKU code handling refactor: modify goods.component.html to optimize payload form dialog rendering fix: adjust goods.component.ts to ensure payload form visibility logic is correct fix: update order-section.component.ts to improve customer dialog and payment form visibility style: enhance form.component.html button styling for better responsiveness fix: change abstract-form.ts to reset form with default values on initialization refactor: streamline page-data-list-grid-view.component.html for better caption handling refactor: update page-data-list-grid-view.component.ts to remove unused methods and improve readability refactor: simplify page-data-list-table-view.component.html and remove redundant code refactor: clean up page-data-list-table-view.component.ts by removing unnecessary methods feat: enhance page-data-list.component.html with new caption and paginator templates feat: create page-data-value.component.ts to encapsulate data rendering logic for grid and table views style: update presets.ts to modify color palette for better UI consistency
This commit is contained in:
@@ -1,4 +1,70 @@
|
||||
<div class="h-full bg-surface-overlay rounded-(--p-card-border-radius) overflow-hidden">
|
||||
<ng-template #captionTemplate let-isMobileView="isMobileView">
|
||||
@if (pageTitle || showAdd || filter || showRefresh || moreActions) {
|
||||
<ng-container [ngTemplateOutlet]="caption">
|
||||
<div class="flex justify-between items-center gap-4">
|
||||
<h5 class="font-bold">{{ pageTitle }}</h5>
|
||||
@if (showAdd || filter || showRefresh || moreActions) {
|
||||
<div class="flex items-center gap-2">
|
||||
<ng-container [ngTemplateOutlet]="moreActions" />
|
||||
@if (filter) {
|
||||
<p-button
|
||||
label="فیلتر"
|
||||
icon="pi pi-filter"
|
||||
variant="outlined"
|
||||
badgeSeverity="info"
|
||||
size="small"
|
||||
[badge]="isFiltered ? '1' : undefined"
|
||||
(click)="openFilter()"
|
||||
></p-button>
|
||||
}
|
||||
@if (showRefresh) {
|
||||
<p-button icon="pi pi-refresh" outlined size="small" (click)="refresh()"></p-button>
|
||||
}
|
||||
@if (showAll && allItemsPageRoute) {
|
||||
@if (isMobileView) {
|
||||
<a routerLink pButton [routerLink]="allItemsPageRoute" icon="pi pi-eye" outlined size="small"></a>
|
||||
} @else {
|
||||
<a routerLink pButton [routerLink]="allItemsPageRoute" outlined size="small">نمایش همه</a>
|
||||
}
|
||||
}
|
||||
@if (showAdd) {
|
||||
@if (isMobileView) {
|
||||
<p-button icon="pi pi-plus" size="small" (click)="openAddForm()"></p-button>
|
||||
} @else {
|
||||
<p-button
|
||||
label="{{ addNewCtaLabel }}"
|
||||
icon="pi pi-plus"
|
||||
size="small"
|
||||
(click)="openAddForm()"
|
||||
></p-button>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</ng-container>
|
||||
}
|
||||
</ng-template>
|
||||
<ng-template #emptyMessageTemplate>
|
||||
<uikit-empty-state
|
||||
[title]="emptyPlaceholderTitle"
|
||||
[description]="emptyPlaceholderDescription"
|
||||
[ctaLabel]="emptyPlaceholderCtaLabel || addNewCtaLabel"
|
||||
[showCTA]="showAdd"
|
||||
(ctaClick)="openAddForm()"
|
||||
></uikit-empty-state>
|
||||
</ng-template>
|
||||
<ng-template #paginatorTemplate>
|
||||
<app-paginator
|
||||
[currentPage]="currentPage || 1"
|
||||
[totalRecords]="totalRecords"
|
||||
[perPage]="perPage || 10"
|
||||
[loading]="loading"
|
||||
(onChange)="onPage($event)"
|
||||
/>
|
||||
</ng-template>
|
||||
|
||||
@if (!isMobile) {
|
||||
<app-page-data-list-table-view
|
||||
[pageTitle]="pageTitle"
|
||||
@@ -14,66 +80,24 @@
|
||||
[showDelete]="showDelete"
|
||||
[showDetails]="showDetails"
|
||||
[showIndex]="showIndex"
|
||||
[hasCaption]="!!(pageTitle || showAdd || filter || showRefresh || moreActions)"
|
||||
[expandable]="expandable"
|
||||
[expandableItemKey]="expandableItemKey"
|
||||
[expandColumns]="expandColumns"
|
||||
(onEdit)="edit($event)"
|
||||
(onDelete)="remove($event)"
|
||||
(onDetails)="details($event)"
|
||||
>
|
||||
<ng-template #captionBox>
|
||||
@if (pageTitle || showAdd || filter || caption || showRefresh || moreActions) {
|
||||
<ng-container [ngTemplateOutlet]="caption">
|
||||
<div class="flex justify-between items-center gap-4">
|
||||
<h5 class="font-bold">{{ pageTitle }}</h5>
|
||||
@if (showAdd || filter || showRefresh || moreActions) {
|
||||
<div class="flex items-center gap-2">
|
||||
<ng-container [ngTemplateOutlet]="moreActions" />
|
||||
@if (filter) {
|
||||
<p-button
|
||||
label="فیلتر"
|
||||
icon="pi pi-filter"
|
||||
variant="outlined"
|
||||
badgeSeverity="info"
|
||||
size="small"
|
||||
[badge]="isFiltered ? '1' : undefined"
|
||||
(click)="openFilter()"
|
||||
></p-button>
|
||||
}
|
||||
@if (showRefresh) {
|
||||
<p-button icon="pi pi-refresh" outlined size="small" (click)="refresh()"></p-button>
|
||||
}
|
||||
@if (showAll && allItemsPageRoute) {
|
||||
<a routerLink pButton [routerLink]="allItemsPageRoute" outlined size="small">نمایش همه</a>
|
||||
}
|
||||
@if (showAdd) {
|
||||
<p-button
|
||||
label="{{ addNewCtaLabel }}"
|
||||
icon="pi pi-plus"
|
||||
size="small"
|
||||
(click)="openAddForm()"
|
||||
></p-button>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</ng-container>
|
||||
}
|
||||
</ng-template>
|
||||
@if (pageTitle || showAdd || filter || showRefresh || moreActions) {
|
||||
<ng-template #captionBox>
|
||||
<ng-container [ngTemplateOutlet]="captionTemplate" [ngTemplateOutletContext]="{ isMobileView: false }" />
|
||||
</ng-template>
|
||||
}
|
||||
<ng-template #emptyMessageCard>
|
||||
<uikit-empty-state
|
||||
[title]="emptyPlaceholderTitle"
|
||||
[description]="emptyPlaceholderDescription"
|
||||
[ctaLabel]="emptyPlaceholderCtaLabel || addNewCtaLabel"
|
||||
[showCTA]="showAdd"
|
||||
(ctaClick)="openAddForm()"
|
||||
></uikit-empty-state>
|
||||
<ng-container [ngTemplateOutlet]="emptyMessageTemplate" />
|
||||
</ng-template>
|
||||
<ng-template #paginator>
|
||||
<app-paginator
|
||||
[currentPage]="currentPage || 1"
|
||||
[totalRecords]="totalRecords"
|
||||
[perPage]="perPage || 10"
|
||||
[loading]="loading"
|
||||
(onChange)="onPage($event)"
|
||||
/>
|
||||
<ng-container [ngTemplateOutlet]="paginatorTemplate" />
|
||||
</ng-template>
|
||||
</app-page-data-list-table-view>
|
||||
} @else {
|
||||
@@ -90,61 +114,21 @@
|
||||
[showEdit]="showEdit"
|
||||
[showDelete]="showDelete"
|
||||
[showDetails]="showDetails"
|
||||
[hasCaption]="!!(pageTitle || showAdd || filter || showRefresh || moreActions)"
|
||||
(onEdit)="edit($event)"
|
||||
(onDelete)="remove($event)"
|
||||
(onDetails)="details($event)"
|
||||
>
|
||||
<ng-template #captionBox>
|
||||
@if (pageTitle || showAdd || filter || caption || showRefresh || moreActions) {
|
||||
<ng-container [ngTemplateOutlet]="caption">
|
||||
<div class="flex justify-between items-center gap-4">
|
||||
<h5 class="font-bold">{{ pageTitle }}</h5>
|
||||
@if (showAdd || filter || showRefresh || moreActions) {
|
||||
<div class="flex items-center gap-2">
|
||||
<ng-container [ngTemplateOutlet]="moreActions" />
|
||||
@if (filter) {
|
||||
<p-button
|
||||
label="فیلتر"
|
||||
icon="pi pi-filter"
|
||||
variant="outlined"
|
||||
badgeSeverity="info"
|
||||
size="small"
|
||||
[badge]="isFiltered ? '1' : undefined"
|
||||
(click)="openFilter()"
|
||||
></p-button>
|
||||
}
|
||||
@if (showRefresh) {
|
||||
<p-button icon="pi pi-refresh" outlined size="small" (click)="refresh()"></p-button>
|
||||
}
|
||||
@if (showAll && allItemsPageRoute) {
|
||||
<a routerLink pButton [routerLink]="allItemsPageRoute" icon="pi pi-eye" outlined size="small"></a>
|
||||
}
|
||||
@if (showAdd) {
|
||||
<p-button icon="pi pi-plus" size="small" (click)="openAddForm()"></p-button>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</ng-container>
|
||||
@if (pageTitle || showAdd || filter || showRefresh || moreActions) {
|
||||
<ng-container [ngTemplateOutlet]="captionTemplate" [ngTemplateOutletContext]="{ isMobileView: true }" />
|
||||
}
|
||||
</ng-template>
|
||||
<ng-template #emptyMessageCard>
|
||||
<uikit-empty-state
|
||||
[title]="emptyPlaceholderTitle"
|
||||
[description]="emptyPlaceholderDescription"
|
||||
[ctaLabel]="emptyPlaceholderCtaLabel || addNewCtaLabel"
|
||||
[showCTA]="showAdd"
|
||||
(ctaClick)="openAddForm()"
|
||||
></uikit-empty-state>
|
||||
<ng-container [ngTemplateOutlet]="emptyMessageTemplate" />
|
||||
</ng-template>
|
||||
<ng-template #paginator>
|
||||
<app-paginator
|
||||
[currentPage]="currentPage || 1"
|
||||
[totalRecords]="totalRecords"
|
||||
[perPage]="perPage || 10"
|
||||
[loading]="loading"
|
||||
(onChange)="onPage($event)"
|
||||
/>
|
||||
<ng-container [ngTemplateOutlet]="paginatorTemplate" />
|
||||
</ng-template>
|
||||
</app-page-data-list-grid-view>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user