diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.html index b0d4e742e..3e37d78e7 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.html @@ -89,7 +89,7 @@ - + {{"₹"}} {{loanAmtInWords}} Only Enter valid amount. diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.html index 7e165291b..34ebafa73 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.html @@ -13,9 +13,10 @@ -
- Export - +
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.ts index 70a079cce..33e15c2d0 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.ts @@ -266,7 +266,7 @@ export class PdReportComponent implements OnInit { console.log(blob); let datass = blob.headers.get('content-disposition'); let fileName = datass.split(/"/)[1]; - this.notifier.notify('success', 'Your Changes Updated.!'); + // this.notifier.notify('success', 'Your Changes Updated.!'); const blobs = new Blob([blob.body], { type: 'application/vnd.ms-excel' }); const file = new File([blobs], fileName, diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html index 2319f8db0..6d119d0ed 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html @@ -19,8 +19,8 @@ mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Discussion" matTooltipPosition="above" (click)="getPDStart(viewID)">question_answer -
-
+
QC Notes

{{ pdMasterData[0]?.qc_remarks}}

- +
-
+
QC Remarks
-
- {{ pdMasterData[0]?.qc_rating}} -
+
+
+ {{ pdMasterData[0]?.qc_rating}} +
+
@@ -218,8 +220,9 @@
{{ pdMasterData[0]?.qc_feedback}} -
-
+
+ +
diff --git a/ng6-seed/src/app/template/service/templates/templates.service.ts b/ng6-seed/src/app/template/service/templates/templates.service.ts index 124d4f9cb..6b4d1884e 100755 --- a/ng6-seed/src/app/template/service/templates/templates.service.ts +++ b/ng6-seed/src/app/template/service/templates/templates.service.ts @@ -146,5 +146,17 @@ export class TemplatesService { return this._http.post(this.apiUrl + "getPDReportTemplate", { "records": {"fk_template_id": template_id }}); } + // selected Template forms details + getTemplateSelectedForms(template_id: any): Observable { + const options = { + params: new HttpParams().set('template_id', template_id) + }; + return this._http.get(this.apiUrl + "getTemplateForms", options); + } -} + saveTemplateFormsList(Records: any): Observable { + // Records.fk_createdby = this._aws.getlocale();//to get user id for who is created the Record + // Records.createdon = currentdate;//to get Current date and Time for when the Record is created + return this._http.post(this.apiUrl + "saveTemplateForms", {'records': Records }); + } +} \ No newline at end of file diff --git a/ng6-seed/src/app/template/templates/templates-list/edit/template-forms/template-forms.component.html b/ng6-seed/src/app/template/templates/templates-list/edit/template-forms/template-forms.component.html new file mode 100644 index 000000000..19f1ed5dc --- /dev/null +++ b/ng6-seed/src/app/template/templates/templates-list/edit/template-forms/template-forms.component.html @@ -0,0 +1,9 @@ + + + {{tta.pd_form_name}} + + +
+ + +
\ No newline at end of file diff --git a/ng6-seed/src/app/template/templates/templates-list/edit/template-forms/template-forms.component.scss b/ng6-seed/src/app/template/templates/templates-list/edit/template-forms/template-forms.component.scss new file mode 100644 index 000000000..fc6e786ec --- /dev/null +++ b/ng6-seed/src/app/template/templates/templates-list/edit/template-forms/template-forms.component.scss @@ -0,0 +1,7 @@ +.flexlist{ + display: flex; + flex-wrap: wrap; +} +.flexlist > * { + flex: 0 50%; +} \ No newline at end of file diff --git a/ng6-seed/src/app/template/templates/templates-list/edit/template-forms/template-forms.component.spec.ts b/ng6-seed/src/app/template/templates/templates-list/edit/template-forms/template-forms.component.spec.ts new file mode 100644 index 000000000..337cf7b97 --- /dev/null +++ b/ng6-seed/src/app/template/templates/templates-list/edit/template-forms/template-forms.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { TemplateFormsComponent } from './template-forms.component'; + +describe('TemplateFormsComponent', () => { + let component: TemplateFormsComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ TemplateFormsComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(TemplateFormsComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ng6-seed/src/app/template/templates/templates-list/edit/template-forms/template-forms.component.ts b/ng6-seed/src/app/template/templates/templates-list/edit/template-forms/template-forms.component.ts new file mode 100644 index 000000000..fd3194e03 --- /dev/null +++ b/ng6-seed/src/app/template/templates/templates-list/edit/template-forms/template-forms.component.ts @@ -0,0 +1,77 @@ +import { Component, OnInit, ViewChild , Input} from '@angular/core'; +import { FormGroup, FormBuilder, Validators } from '@angular/forms'; +import { TemplatesService } from './../../../../service/templates/templates.service'; +import { MastersService } from './../../../../service/masters/masters.service'; +import { NotifierService } from "angular-notifier"; + +@Component({ + selector: 'app-template-forms', + templateUrl: './template-forms.component.html', + styleUrls: ['./template-forms.component.scss'] +}) +export class TemplateFormsComponent implements OnInit { + + masterFormsList = [] ; + selectedOptions = []; + @Input() questionId: number; + /** + * Notifier service + */ + private notifier: NotifierService; + + constructor(private mastersService : MastersService, + private templatesService: TemplatesService, + notifier: NotifierService) { + this.notifier = notifier; + } + + ngOnInit() { + this.mastersService.getAllMasterData("PDFORMS").subscribe(data => { + this.masterFormsList = data.records.sort((a ,b)=>{ return a.pd_form_order - b.pd_form_order;}); + // this.selectedOptions = ["1"]; + this.getSelectedFormDetails(); + }); + + } + + restore(): void { + this.getSelectedFormDetails(); + } + + getSelectedFormDetails() { + this.templatesService.getTemplateSelectedForms(this.questionId).subscribe(data=>{ + if(data.dataStatus){ + this.selectedOptions = data.records; + } else { + } + }) + } + + myClick(){ + if(this.selectedOptions.length > 0){ + let records = { + "template_id":this.questionId, + "forms": this.selectedOptions + } + this.templatesService.saveTemplateFormsList(records).subscribe(data => { + if(data.dataStatus){ + this.notifier.notify('success', 'Your Changes Updated.!'); + }else{ + this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + } + }, err => { + this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + }) + } else { + alert("should select the forms in list !!!"); + } + } + + onNgModelChange(e){ + console.log("event " + e); + } + + + + +} diff --git a/ng6-seed/src/app/template/templates/templates-list/edit/templates.edit.component.html b/ng6-seed/src/app/template/templates/templates-list/edit/templates.edit.component.html index efab22127..c741ee0da 100755 --- a/ng6-seed/src/app/template/templates/templates-list/edit/templates.edit.component.html +++ b/ng6-seed/src/app/template/templates/templates-list/edit/templates.edit.component.html @@ -51,6 +51,12 @@ + + + + + + diff --git a/ng6-seed/src/app/template/templates/templates.module.ts b/ng6-seed/src/app/template/templates/templates.module.ts index 90ef6bb38..ad40e65d3 100755 --- a/ng6-seed/src/app/template/templates/templates.module.ts +++ b/ng6-seed/src/app/template/templates/templates.module.ts @@ -37,6 +37,7 @@ import { CategoryQuestionAnswerComponent } from './templates-list/edit/edit-ques import { DialogOverviewExampleDialog } from './templates-list/edit/edit-question-answer/category-question-answer/category-question-answer.component'; import { TemplatesAddComponent } from './templates-list/templates-add/templates-add.component'; import { ReportTemplateComponent } from './templates-list/edit/report-template/report-template.component'; +import { TemplateFormsComponent } from './templates-list/edit/template-forms/template-forms.component'; /* * Question Master Module details @@ -119,7 +120,8 @@ const customNotifierOptions: NotifierOptions = { CategoryQuestionAnswerComponent, DialogOverviewExampleDialog, TemplatesAddComponent, - ReportTemplateComponent + ReportTemplateComponent, + TemplateFormsComponent ], entryComponents: [ DialogOverviewExampleDialog,