diff --git a/src/app/components/pages/shift-update/shift-update.component.html b/src/app/components/pages/shift-update/shift-update.component.html
index 6671335..d05db5f 100644
--- a/src/app/components/pages/shift-update/shift-update.component.html
+++ b/src/app/components/pages/shift-update/shift-update.component.html
@@ -12,23 +12,43 @@
-
- | {{updateData.Date}} |
- {{updateData.Details | shorten:getRowNumber(i)}} |
- {{updateData.Remarks | shorten:getRowNumber(i)}} |
- {{updateData.Sales_Concern}} |
- {{updateData.Reference | shorten:getRowNumber(i)}} |
- {{updateData.Handler}} |
- {{updateData.Status}} |
-
-
-
- |
-
+
+
+
+ | {{updateData.Date}} |
+ {{updateData.Details | shorten:getRowNumber(i)}} |
+ {{updateData.Remarks | shorten:getRowNumber(i)}} |
+ {{updateData.Sales_Concern}} |
+ {{updateData.Reference | shorten:getRowNumber(i)}} |
+ {{updateData.Handler}} |
+ {{updateData.Status}} |
+
+
+
+ |
+
+
+ |
+
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
diff --git a/src/app/components/pages/shift-update/shift-update.component.scss b/src/app/components/pages/shift-update/shift-update.component.scss
index ff5becc..d18c9aa 100644
--- a/src/app/components/pages/shift-update/shift-update.component.scss
+++ b/src/app/components/pages/shift-update/shift-update.component.scss
@@ -94,3 +94,23 @@ td {
background-color: darken($danger, 20);
}
}
+
+.edit{
+ background-color: yellowgreen;
+ border: none;
+ height: 2rem;
+ width: 2.5rem;
+ border-radius: 10px;
+ margin-top: 5px;
+ &:hover {
+ background-color: darken(yellowgreen, 20);
+ }
+}
+
+
+.edit-input {
+ input{
+ max-width: 100px;
+
+ }
+}
\ No newline at end of file
diff --git a/src/app/components/pages/shift-update/shift-update.component.ts b/src/app/components/pages/shift-update/shift-update.component.ts
index c983d63..df63b27 100644
--- a/src/app/components/pages/shift-update/shift-update.component.ts
+++ b/src/app/components/pages/shift-update/shift-update.component.ts
@@ -7,11 +7,12 @@ import { InputFormComponent } from "../../../shared/components/input-form/input-
import { Update } from '../../../shared/model/update.model';
import { CommonModule } from '@angular/common';
import { ShortenPipe } from '../../../shared/pipe/shorten.pipe';
+import { FormsModule } from '@angular/forms';
@Component({
selector: 'app-shift-update',
standalone: true,
- imports: [TitleComponent, InputFormComponent, CommonModule, ShortenPipe],
+ imports: [TitleComponent, InputFormComponent, CommonModule, ShortenPipe, FormsModule],
templateUrl: './shift-update.component.html',
styleUrl: './shift-update.component.scss',
providers: [UpdateService]
@@ -21,7 +22,8 @@ export class ShiftUpdateComponent implements OnInit, OnDestroy {
updateDataList!: Update[];
updateListSubscription!: Subscription;
todayDate!: String;
-
+ editMode = false;
+ editIndex: number | null = null;
constructor(private updateService: UpdateService) {}
@@ -78,6 +80,9 @@ onDelete(data: any) {
})
}
+onEdit(index: number) {
+ this.editIndex = index;
+}
// clickToAdd(){
// const test_update: Update = {
// id: "",
@@ -96,6 +101,15 @@ onDelete(data: any) {
// })
// }
+onEditSave() {
+ //
+}
+
+onCancel()
+{
+ this.editIndex = null;
+}
+
private fetchUpdates(): void {
this.updateService.allUpdate().subscribe((update) => {
this.updateDataList = update;
diff --git a/src/app/shared/components/input-form/input-form.component.scss b/src/app/shared/components/input-form/input-form.component.scss
index 6ee7132..4680762 100644
--- a/src/app/shared/components/input-form/input-form.component.scss
+++ b/src/app/shared/components/input-form/input-form.component.scss
@@ -51,8 +51,9 @@
.toggle{
position: fixed;
- right: 2.5rem;
+ right: 2rem;
bottom: 0;
+ z-index: 100;
}
i {