Working on complete task

This commit is contained in:
Mosiur Rahman
2024-11-27 22:15:21 +06:00
parent b6163a7ecf
commit b1d976f1fc
7 changed files with 188 additions and 19 deletions

View File

@@ -1,16 +1,17 @@
import { Component, OnDestroy, OnInit } from '@angular/core';
import { Subscription } from 'rxjs';
import { TableComponent } from '../../../shared/components/table/table.component';
import { UpdateService } from './update.service';
import { TitleComponent } from '../../../shared/components/title/title.component';
import { InputFormComponent } from "../../../shared/components/input-form/input-form.component";
import { Update } from '../../../shared/model/update.model';
import { CommonModule } from '@angular/common';
import { ShortenPipe } from '../../../shared/pipe/shorten.pipe';
@Component({
selector: 'app-shift-update',
standalone: true,
imports: [TableComponent, TitleComponent, InputFormComponent],
imports: [TitleComponent, InputFormComponent, CommonModule, ShortenPipe],
templateUrl: './shift-update.component.html',
styleUrl: './shift-update.component.scss',
providers: [UpdateService]
@@ -28,21 +29,12 @@ export class ShiftUpdateComponent implements OnInit, OnDestroy {
this.updateDataList = update;
console.log(this.updateDataList.keys)
});
console.log(this.completeTask)
}
ngOnDestroy(): void {
this.updateListSubscription.unsubscribe();
}
completeTask(event: string) {
//
}
deleteTask(event: boolean) {
//
}
addUpdate(newUpdate:any){
this.updateService.addUpdate(newUpdate);
}
@@ -51,4 +43,22 @@ export class ShiftUpdateComponent implements OnInit, OnDestroy {
this.updateDataList = update;
})
}
expandRowIndex: number | null = null;
toggleRow(index: number){
this.expandRowIndex = this.expandRowIndex === index ? null : index;
}
getRowNumber(index: number): number {
return this.expandRowIndex === index ? 15000 : 75;
}
onComplete(update: Update){
update.Status = "completed";
this.updateService.updateStatus(update)
}
onDelete() {
//
}
}