Added today date in shift-update ts code

This commit is contained in:
Mosiur Rahman
2024-11-29 22:52:12 +06:00
parent d0956b6b17
commit b5cb152d91
4 changed files with 10 additions and 2 deletions

View File

@@ -20,6 +20,7 @@ export class ShiftUpdateComponent implements OnInit, OnDestroy {
tableHeaderList = ['Date','Details','Remarks','Sales','Reference','Handler', 'Status']
updateDataList!: Update[];
updateListSubscription!: Subscription;
todayDate!: String;
constructor(private updateService: UpdateService) {}
@@ -28,6 +29,14 @@ export class ShiftUpdateComponent implements OnInit, OnDestroy {
this.updateListSubscription = this.updateService.allUpdate().subscribe((update)=>{
this.updateDataList = update;
});
let date = new Date();
let dd = String(date.getDate()).padStart(2,'0');
let mm = String(date.getMonth()).padStart(2,'0');
let yyyy = String(date.getFullYear());
let today = `${dd}\\${mm}\\${yyyy}`
this.todayDate = today;
}
ngOnDestroy(): void {