refresh on home
This commit is contained in:
@@ -89,8 +89,8 @@
|
||||
placeholder="Type something here"
|
||||
[autoGrow]="true"
|
||||
[ngModel]="description"
|
||||
(ionChange)="inVerify()"
|
||||
style="background-color: aliceblue; min-height: 100px; border-radius: 10px;"
|
||||
|
||||
>
|
||||
</ion-textarea>
|
||||
|
||||
@@ -107,7 +107,12 @@
|
||||
<ion-button size="small" shape="round" color="danger" (click)="cancel()">Cancel</ion-button>
|
||||
</ion-col>
|
||||
<ion-col style="text-align: right;">
|
||||
<ion-button size="small" shape="round" color="secondary" (click)="sendSuggestedTask()">Send</ion-button>
|
||||
<ion-button
|
||||
size="small"
|
||||
shape="round"
|
||||
color="secondary"
|
||||
[disabled]="isDisabled"
|
||||
(click)="sendSuggestedTask()">Send</ion-button>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user