Connected with DB and complted the Backup Service, Shift Update ongoin
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
5
src/app/shared/constants/backend.ts
Normal file
5
src/app/shared/constants/backend.ts
Normal 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`
|
||||
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user