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:
@@ -1,2 +1,4 @@
|
||||
export * from './price-alphabet.directive';
|
||||
export * from './price-mask.directive';
|
||||
|
||||
export * from './jalali-date.directive';
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
import { formatJalali } from '@/utils';
|
||||
import { Directive, ElementRef, Input, OnChanges, Renderer2, SimpleChanges } from '@angular/core';
|
||||
|
||||
@Directive({
|
||||
selector: '[jalaliDate]',
|
||||
})
|
||||
export class JalaliDateDirective implements OnChanges {
|
||||
@Input('jalaliDate') dateValue!: string | number | Date;
|
||||
@Input() jalaliFormat: string = 'YYYY/MM/DD';
|
||||
|
||||
constructor(
|
||||
private el: ElementRef,
|
||||
private renderer: Renderer2,
|
||||
) {}
|
||||
|
||||
ngOnChanges(changes: SimpleChanges): void {
|
||||
if (this.dateValue) {
|
||||
const formatted = formatJalali(this.dateValue, this.jalaliFormat);
|
||||
this.renderer.setProperty(this.el.nativeElement, 'innerText', formatted);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user