feat: Enhance customer and inventory components with new features and improvements
This commit is contained in:
@@ -32,7 +32,9 @@
|
||||
/>
|
||||
</td>
|
||||
<td>{{ movement.receiptId }}</td>
|
||||
<td><catalog-movement-reference-tag [type]="movement.info.referenceType" /></td>
|
||||
<td>
|
||||
<catalog-movement-reference-tag [type]="movement.info.referenceType" [movementType]="movement.info.type" />
|
||||
</td>
|
||||
<td>{{ movement.count }}</td>
|
||||
<td>{{ movement.info.quantity }}</td>
|
||||
<td><span [appPriceMask]="movement.info.totalCost"></span></td>
|
||||
|
||||
@@ -95,7 +95,6 @@
|
||||
@if (!form.controls.fromInventory.value) {
|
||||
<div class="text-center text-gray-500 py-10">لطفا انبار مبدا را انتخاب کنید</div>
|
||||
} @else {
|
||||
{{ form.controls.items.value.length }}
|
||||
<p-table [value]="form.controls.items.controls" class="w-full">
|
||||
<ng-template #header>
|
||||
<tr>
|
||||
@@ -107,13 +106,7 @@
|
||||
<tr>
|
||||
<td>{{ item.controls.product.value?.name }}</td>
|
||||
<td>
|
||||
<input
|
||||
pInputText
|
||||
type="number"
|
||||
min="1"
|
||||
[max]="item.controls.product.value?.quantity"
|
||||
[formControl]="form.controls.items.at(rowIndex).controls.count"
|
||||
/>
|
||||
<app-uikit-counter [min]="1" [max]="10" [control]="item.controls.count" />
|
||||
</td>
|
||||
</tr>
|
||||
</ng-template>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Maybe } from '@/core';
|
||||
import { InputComponent } from '@/shared/components';
|
||||
import { UikitFieldComponent } from '@/uikit';
|
||||
import { UikitCounterComponent, UikitFieldComponent } from '@/uikit';
|
||||
import { Component, inject, signal } from '@angular/core';
|
||||
import { FormBuilder, ReactiveFormsModule, Validators } from '@angular/forms';
|
||||
import { ButtonDirective } from 'primeng/button';
|
||||
@@ -32,6 +32,7 @@ import { InventoriesSelectComponent } from '../select/select.component';
|
||||
TableModule,
|
||||
InputText,
|
||||
ButtonDirective,
|
||||
UikitCounterComponent,
|
||||
],
|
||||
})
|
||||
export class InventoriesTransferFormComponent {
|
||||
|
||||
@@ -2,6 +2,7 @@ import { Maybe } from '@/core';
|
||||
import { KeyValueComponent } from '@/shared/components';
|
||||
import { DetailsInfoCardComponent } from '@/shared/components/detailsInfoCard/details-info-card.component';
|
||||
import { PriceMaskDirective } from '@/shared/directives';
|
||||
import { formatWithCurrency } from '@/utils';
|
||||
import { Component, inject, signal } from '@angular/core';
|
||||
import { ActivatedRoute, RouterLink } from '@angular/router';
|
||||
import { Button, ButtonDirective } from 'primeng/button';
|
||||
@@ -83,7 +84,7 @@ export class InventoryComponent {
|
||||
{
|
||||
icon: 'pi pi-dollar',
|
||||
label: 'ارزش کلی کالاهای موجود',
|
||||
value: this.data()?.availableProductsCost,
|
||||
value: formatWithCurrency(this.data()?.availableProductsCost || 0),
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user