feat(inventories): implement inventory movement list and transfer functionality

- Added InventoryMovementListComponent to display stock movements with filtering options.
- Created InventoriesTransferFormComponent for transferring stock between inventories.
- Implemented product cardex view to show detailed inventory movements for specific products.
- Enhanced product listing with loading states and improved UI components.
- Introduced Jalali date formatting directive for better date representation.
- Added utility functions for Jalali date conversions and comparisons.
- Created reusable details info card component for displaying inventory details.
- Updated movement reference types and tags for better categorization of inventory movements.
This commit is contained in:
2025-12-14 10:16:14 +03:30
parent b46b8b83f9
commit 35be7e0298
65 changed files with 1543 additions and 80 deletions
@@ -1,7 +1,7 @@
import { Maybe } from '@/core';
import { ToastService } from '@/core/services/toast.service';
import { InventoriesSelectComponent } from '@/modules/inventories/components/select/select.component';
import { IInventoryResponse } from '@/modules/inventories/models';
import { IInventorySummaryResponse } from '@/modules/inventories/models';
import { IProductResponse } from '@/modules/products/models';
import { SuppliersSelectComponent } from '@/modules/suppliers/components/select/select.component';
import { ISupplierResponse } from '@/modules/suppliers/models';
@@ -44,7 +44,7 @@ export class PurchaseReceiptTemplateComponent {
private fb = inject(FormBuilder);
@Input() product?: IProductResponse;
@Input() inventory?: IInventoryResponse;
@Input() inventory?: IInventorySummaryResponse;
@Input() supplier?: ISupplierResponse;
columns = [
@@ -105,7 +105,7 @@ export class PurchaseReceiptTemplateComponent {
total: [300000, [Validators.required, Validators.min(0)]],
}),
]),
inventory: [{ id: 2 } as Maybe<IInventoryResponse>, [Validators.required]],
inventory: [{ id: 2 } as Maybe<IInventorySummaryResponse>, [Validators.required]],
supplier: [{ id: 1 } as Maybe<ISupplierResponse>, [Validators.required]],
});
@@ -179,7 +179,8 @@ export class PurchaseReceiptTemplateComponent {
next: (res) => {
this.toastService.success({ text: 'ثبت سند خرید با موفقیت انجام شد' });
this.form.enable();
this.form.reset();
// this.form.reset();
this.form.controls.code.setValue(this.form.controls.code.value + '1');
this.formIsSubmitted.set(false);
},
error: () => {