From 8876f65e193f68d0c768b9b0fad7c66438559242 Mon Sep 17 00:00:00 2001 From: dineshkumarkannan Date: Thu, 29 Nov 2018 19:12:52 +0530 Subject: [PATCH] template qustions changes : kdk --- .../service/templates/templates.service.ts | 16 +- .../category-question-answer.component.html | 15 +- .../category-question-answer.component.ts | 172 +++++++++++++----- .../dialog-category-question-list.html | 30 ++- 4 files changed, 163 insertions(+), 70 deletions(-) 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 b5fcce97a..f5ac54543 100755 --- a/ng6-seed/src/app/template/service/templates/templates.service.ts +++ b/ng6-seed/src/app/template/service/templates/templates.service.ts @@ -87,15 +87,15 @@ export class TemplatesService { getTemplateIDQuesAnsDetails(temp_id: number): Observable{ // Add safe, URL encoded search parameter if there is a search term - return this._http.post(this.apiUrl + "getTemplateQuestionAnswers", {'template_id': temp_id }); + return this._http.post(this.apiUrl + "getScorecardDetails", {'templateid': temp_id }); } updateTempateIDQuesAnsDetails(Records: any): Observable{ let records = Records.map(item=>{ item.fk_updatedby = this._aws.getlocale();//to get user id for who is created the Record - item.updatedon = currentdate; - item.createdon = item.createdon == null ? currentdate : item.createdon; + // item.updatedon = currentdate; + // item.createdon = item.createdon == null ? currentdate : item.createdon; item.fk_createdby = item.fk_createdby == null ? this._aws.getlocale() : item.fk_createdby; // item.answers = item.answers.map(subItem=>{ @@ -104,7 +104,7 @@ export class TemplatesService { // })//to get Current date and Time for when the Record is created return item; }); - return this._http.post(this.apiUrl + "saveTemplateQuestionAnswers", {'records': records }); + return this._http.post(this.apiUrl + "saveScoreCardQuestions", {'records': records }); } getRemaningQuestionCategory(data: any): Observable{ @@ -112,12 +112,14 @@ export class TemplatesService { return this._http.post(this.apiUrl + "getQuestionsForTemplateCreation", {"template_id": data.template_id, "category_id": data.category_id}); } - + getFormIdRemainingQuestionsDetails(data: any) : Observable { + let records = {"templateid": data.template_id, "formid": data.form_id, "categoryid": data.category_id}; + return this._http.post(this.apiUrl + "getFormAndQuestionKeys", { "records" : records} ); + } // get Master Details ============================== - - // get templates master details list + // get templates master details list getLenderMasterListDetails(): Observable { return this._http.get(this.apiUrl + "getListOfLenders"); } diff --git a/ng6-seed/src/app/template/templates/templates-list/edit/edit-question-answer/category-question-answer/category-question-answer.component.html b/ng6-seed/src/app/template/templates/templates-list/edit/edit-question-answer/category-question-answer/category-question-answer.component.html index 7008cebcd..92589721b 100755 --- a/ng6-seed/src/app/template/templates/templates-list/edit/edit-question-answer/category-question-answer/category-question-answer.component.html +++ b/ng6-seed/src/app/template/templates/templates-list/edit/edit-question-answer/category-question-answer/category-question-answer.component.html @@ -1,3 +1,6 @@ + + +
@@ -11,12 +14,12 @@
- + % - Ques. WT is Required.! + Ques. WT is Required.!
-
@@ -28,7 +31,7 @@
- {{i_ans+1}}. {{answ.get('answer').value}} + {{i_ans+1}}. {{answ.get('name').value}}
+ + +
+
+ + {{question.question}} + +
+
+
No Records Found.!
+
+
-
-
-
No Records Found.!
-
-
\ No newline at end of file + \ No newline at end of file