Connected with DB and complted the Backup Service, Shift Update ongoin

This commit is contained in:
Mosiur
2024-11-27 01:28:57 +06:00
parent ceacc20f68
commit b6163a7ecf
12 changed files with 179 additions and 31 deletions

View File

@@ -7,7 +7,7 @@
<input class="form-control" type="text" [id]="field" [name]="field" [(ngModel)]="formData[field]" [placeholder]="'enter '+field" required>
</div>
<div class="btn">
<button [disabled]="inputForm.invalid">Submit</button>
<button [disabled]="inputForm.invalid" (click)="onClick()">Submit</button>
</div>
</div>
</form>

View File

@@ -14,6 +14,7 @@ export class InputFormComponent {
@Output() formValues: EventEmitter<{}> = new EventEmitter<{}>();
formData: {[key: string]: string} = {}
@Input() isFormVisible: boolean = false;
@Output() clicked: EventEmitter<void> = new EventEmitter<void>()
onSubmit(formData: NgForm){
this.formValues.emit(formData.value)
@@ -21,4 +22,8 @@ export class InputFormComponent {
toggleForm() {
this.isFormVisible = !this.isFormVisible;
}
onClick(){
this.clicked.emit()
}
}

View File

@@ -0,0 +1,5 @@
const MAIN_URL = "http://localhost:3000/api"
export const BACKUP_GET_URL = `${MAIN_URL}/backup`;
export const UPDATE_GET_URL = `${MAIN_URL}/update`;
export const UPDATE_ADD_URL = `${UPDATE_GET_URL}/add`

View File

@@ -1,9 +1,11 @@
export class Update{
id!: string;
date!: string;
details!: string;
remarks!: string;
Date!: string;
Details!: string;
Remarks!: string;
Sales_Concern!: string;
reference!: string;
handler!: string;
Reference!: string;
Handler!: string;
Status!: string;
deleted!: Boolean;
}