diff --git a/ng6-seed/src/app/session/login/login-component.html b/ng6-seed/src/app/session/login/login-component.html index 61229ce5e..41ee7e92e 100644 --- a/ng6-seed/src/app/session/login/login-component.html +++ b/ng6-seed/src/app/session/login/login-component.html @@ -2,7 +2,7 @@
-

SINEEDGE +

SINEEDGE

@@ -11,7 +11,6 @@

Login

-
@@ -22,10 +21,11 @@
- + -
+
+
@@ -41,7 +41,7 @@
diff --git a/ng6-seed/src/app/template/questions/add/add.component.html b/ng6-seed/src/app/template/questions/add/add.component.html index f4e60e780..daa410b1d 100644 --- a/ng6-seed/src/app/template/questions/add/add.component.html +++ b/ng6-seed/src/app/template/questions/add/add.component.html @@ -1,78 +1,89 @@ -
- -
-

{{pageTitle}}

-
-
- -
-
- - -
- + + +

{{pageTitle}}

+ + + +
+
+ {{ ct.category_name }} You must Select Category.
-
- +
+ + + {{ gp.group_name }} + + You must Select Group. + +
+
+
+
+ You must Include Question.
-
- +
+
+
+ You must Include Description.
-
- +
+
+
+ {{ ans.answer_type_name }} You must Select Answer Type.
-
-
-
-
-
-
- - - - +
+
+
+
+
+
+
+ + + +
+
+ + + {{ gp.group_name }} + -
-
- +
+
+ -
- - -
+
- - -
- - -
- - - -
\ No newline at end of file +
+
+ + +
+ + + + + + \ No newline at end of file diff --git a/ng6-seed/src/app/template/questions/add/add.component.ts b/ng6-seed/src/app/template/questions/add/add.component.ts index 657254038..3a5968b3b 100644 --- a/ng6-seed/src/app/template/questions/add/add.component.ts +++ b/ng6-seed/src/app/template/questions/add/add.component.ts @@ -39,6 +39,7 @@ export class AddComponent implements OnInit { public submitted = false; public categories: any = []; public questionsOptions: any = []; + public m_group: any = []; errorMessage: string; /** @@ -62,6 +63,7 @@ export class AddComponent implements OnInit { question: [null, Validators.compose([Validators.required])], description: [null, Validators.compose([Validators.required])], fk_question_category: [null, Validators.compose([Validators.required])], + fk_question_group_id: [null, Validators.compose([Validators.required])], fk_question_answertype: [null, Validators.compose([Validators.required])], answers: this._formBuilder.array([ this.initAnswers(), @@ -70,6 +72,7 @@ export class AddComponent implements OnInit { // OnInit Load Category and Question Type Masters this.getCategoryListMaster(); this.getQuestionOptionsMaster(); + this.getQuestionGroupMaster(); } // convenience getter for easy access to form fields @@ -78,7 +81,8 @@ export class AddComponent implements OnInit { // Dynamic Form field creation Functionality : START ===> initAnswers() { return this._formBuilder.group({ - answer: ['', Validators.compose([Validators.required])] + answer: ['', Validators.compose([Validators.required])], + fk_question_group_id: [''] }); } addLanguage(e) { @@ -103,6 +107,19 @@ export class AddComponent implements OnInit { } ) } + + getQuestionGroupMaster() { + this.masterService.getAllMasterData('QUESTIONGROUP').subscribe( + data => { + this.m_group = data.records; + }, + error => { + this.notifier.notify('warning', 'No Question Group Records Found.!'); + this.errorMessage = "No Question Group Records Found."; + } + ) + } + getQuestionOptionsMaster() { this.masterService.getAllMasterData('QUESTIONANSWERTYPE').subscribe( data => { diff --git a/ng6-seed/src/app/template/questions/edit/edit.component.html b/ng6-seed/src/app/template/questions/edit/edit.component.html index d68696cd4..20fea4322 100644 --- a/ng6-seed/src/app/template/questions/edit/edit.component.html +++ b/ng6-seed/src/app/template/questions/edit/edit.component.html @@ -1,92 +1,108 @@ -
- -
-

{{pageTitle}}

-
-
- -
-
- -
- -
- +

{{pageTitle}}

+ + + + +
+
+ {{ ct.category_name }} You must Select Category.
-
- +
+ + + {{ gp.group_name }} + + You must Select Group. + +
+
+
+
+ You must Include Question.
-
- +
+
+
+ You must Include Description.
-
- +
+
+
+ {{ ans.answer_type_name }} You must Select Answer Type.
-
- - - -
-
-
-
-
-
-
- - - - - -
-
- - +
+
+
+
+
+
+
+ + + + + +
+
+ + + {{ gp.group_name }} + + +
+
+ + -
- - -
+ + +
- - - + -
- - -
- - - -
- - \ No newline at end of file +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/ng6-seed/src/app/template/questions/edit/edit.component.ts b/ng6-seed/src/app/template/questions/edit/edit.component.ts index 16268c336..4db0e5967 100644 --- a/ng6-seed/src/app/template/questions/edit/edit.component.ts +++ b/ng6-seed/src/app/template/questions/edit/edit.component.ts @@ -39,6 +39,7 @@ export class EditComponent implements OnInit { public _addQuesFrom: FormGroup; public submitted = false; public categories: any = []; + public m_group: any = []; public questionsOptions: any = []; errorMessage: string; @@ -60,15 +61,16 @@ export class EditComponent implements OnInit { ngOnInit() { this.loadFormData(); - if (this.data["0"].length > 0) { - for (let val of this.data["0"]) { - // alert(JSON.stringify(val)); - let vals = val; - this.addLanguage(vals['answer'], vals['question_answer_id'], vals['isactive'], null); - } - } + // if (this.data["0"].length > 0) { + // for (let val of this.data["0"]) { + // // alert(JSON.stringify(val)); + // let vals = val; + // this.addLanguage(vals['answer'], vals['question_answer_id'], vals['isactive'], null); + // } + // } // OnInit Load Category and Question Type Masters this.getCategoryListMaster(); + this.getQuestionGroupMaster(); this.getQuestionOptionsMaster(); } @@ -78,7 +80,7 @@ export class EditComponent implements OnInit { for (let val of this.data["0"]) { // alert(JSON.stringify(val)); let vals = val; - this.addLanguage(vals['answer'], vals['question_answer_id'], vals['isactive'], null); + this.addLanguage(vals['answer'], vals['question_answer_id'], vals['fk_question_group_id'], vals['isactive'], null); } } } @@ -91,6 +93,7 @@ export class EditComponent implements OnInit { question: [this.data.question, Validators.compose([Validators.required])], description: [this.data.description, Validators.compose([Validators.required])], fk_question_category: [this.data.fk_question_category, Validators.compose([Validators.required])], + fk_question_group_id: [this.data.fk_question_group_id, Validators.compose([Validators.required])], fk_question_answertype: [this.data.fk_question_answertype, Validators.compose([Validators.required])], isactive: [this.data.isactive], answers: this._formBuilder.array([ @@ -107,17 +110,18 @@ export class EditComponent implements OnInit { // Dynamic Form field creation Functionality : START ===> - initAnswers(ans, fk_id, isAct) { + initAnswers(ans, fk_id, fk_question_group_id, isAct) { isAct = isAct == null ? 1 : isAct; return this._formBuilder.group({ answer: [ans, Validators.compose([Validators.required])], question_answer_id: [fk_id], + fk_question_group_id: [fk_question_group_id], isactive: [isAct] }); } - addLanguage(ans, fk_id, isAct, e) { + addLanguage(ans, fk_id, fk_question_group_id, isAct, e) { const control = this._addQuesFrom.controls['answers']; - control.push(this.initAnswers(ans, fk_id, isAct)); + control.push(this.initAnswers(ans, fk_id, fk_question_group_id, isAct)); } removeLanguage(i: number) { const control = this._addQuesFrom.controls['answers']; @@ -137,6 +141,18 @@ export class EditComponent implements OnInit { } ) } + + getQuestionGroupMaster() { + this.masterService.getAllMasterData('QUESTIONGROUP').subscribe( + data => { + this.m_group = data.records; + }, + error => { + this.notifier.notify('warning', 'No Question Group Records Found.!'); + this.errorMessage = "No Question Group Records Found."; + } + ) + } getQuestionOptionsMaster() { this.masterService.getAllMasterData('QUESTIONANSWERTYPE').subscribe( data => { diff --git a/ng6-seed/src/app/template/questions/list/list.component.html b/ng6-seed/src/app/template/questions/list/list.component.html index 4665b1381..fd7fe1a92 100644 --- a/ng6-seed/src/app/template/questions/list/list.component.html +++ b/ng6-seed/src/app/template/questions/list/list.component.html @@ -25,31 +25,33 @@
- + + - + {{ product.category_name }} - + {{ product.question }} - + - - - +
+ +
-
No Record Found ...
+ +
No Record Found ...
+