diff --git a/src/app/pages/suggest/suggest.page.html b/src/app/pages/suggest/suggest.page.html
index 0359ed2..a5ac984 100644
--- a/src/app/pages/suggest/suggest.page.html
+++ b/src/app/pages/suggest/suggest.page.html
@@ -89,8 +89,8 @@
placeholder="Type something here"
[autoGrow]="true"
[ngModel]="description"
+ (ionChange)="inVerify()"
style="background-color: aliceblue; min-height: 100px; border-radius: 10px;"
-
>
@@ -107,7 +107,12 @@
Cancel
- Send
+ Send
diff --git a/src/app/pages/suggest/suggest.page.ts b/src/app/pages/suggest/suggest.page.ts
index 69913cd..ed58c6f 100644
--- a/src/app/pages/suggest/suggest.page.ts
+++ b/src/app/pages/suggest/suggest.page.ts
@@ -11,29 +11,41 @@ import { OverlayEventDetail } from '@ionic/core/components';
styleUrls: ['./suggest.page.scss'],
})
export class SuggestPage implements OnInit {
- @ViewChild(IonModal) modal: IonModal;
- tabs = 'about';
+@ViewChild(IonModal) modal: IonModal;
+tabs = 'about';
@ViewChild('description') description;
+isDisabled:boolean = true;
+
constructor(
private navctr: NavController,
private router: Router,
private wrenchService: WrenchService,
public sessionDataProviderService:SessionDataProviderService,
private loadingCtrl: LoadingController
- ) { }
+ ) {
+
+ addEventListener('family_refresh_after_suggest', () => {
+ this.tabs="lesson";
+ this.getFamilySampleSuggest();
+ });
+
+ }
ngOnInit() {
- this. getFamilySampleSuggest();
+ this.getFamilySampleSuggest();
}
onBack() {
this.navctr.back();
}
- onMentor() {
- this.router.navigate(['mentor']);
- }
+ inVerify(){
+ this.isDisabled = true;
+ if ( this.description !=''){
+ this.isDisabled = false;
+ }
+ }
onEnroll() {
this.router.navigate(['enroll']);
@@ -72,6 +84,7 @@ modalSeleted:any;
this.modalSeleted = item;
this.description = this.modalSeleted.description;
this.modal.present();
+ this.inVerify();
}
/*
@@ -124,6 +137,7 @@ modalSeleted:any;
console.log("suggestResult RETURN->", this.suggestResult);
if (this.suggestResult?.internal_return >=0 && this.suggestResult?.suggest_id> 0){
this.suggestMessage="Send to parent.";
+ dispatchEvent(new Event("family_refresh_after_suggest"));
setTimeout(()=>{
this.suggestMessage='';
this.cancel();