added toast MSG and confirm dialog for update and delete btn in profile family member segment

enad-Q3
enadhilal 4 years ago
parent 3ce01fc610
commit 6a34981c9b

@ -323,9 +323,9 @@
<h2 style="font-weight: bold; font-size: 17px;">{{data.name}}</h2>
</ion-col>
<ion-col size='5' offset='3'>
<div class='family-member-button' style="height: 32px !important;">
<div class='family-member-button' style="height: 32px !important;" (click)='updateFunction()'>
<ion-icon style="width: 20px;" name="create"></ion-icon>
<p>update</p>
<p>{{ts.trPK('userProfile','update')}}</p>
</div>
</ion-col>
</ion-row>
@ -334,9 +334,9 @@
<ion-label><p style="font-weight: bold; font-size: 17px;">{{data.relation}}</p></ion-label>
</ion-col>
<ion-col size='5' offset='3'>
<div class='family-member-button' style="height: 32px !important;">
<div class='family-member-button' style="height: 32px !important;" (click)='RemoveFunction()'>
<ion-icon name="trash" style="width: 20px; height: 20px; color: #CA3332;"></ion-icon>
<p style="color: #CA3332;">Remove</p>
<p style="color: #CA3332;">{{ts.trPK('userProfile','remove')}}</p>
</div>
</ion-col>
</ion-row>

@ -22,15 +22,15 @@ export class HomeComponent implements OnInit {
public familyMemberData = [
{
name:'Enad',
name:'test',
relation:'Father'
},
{
name:'Zoz',
name:'test 1',
relation:'Son'
},
{
name:'Hofi',
name:'test 2',
relation:'daughter'
},
]
@ -393,5 +393,19 @@ export class HomeComponent implements OnInit {
this.cs.openAddBasicDetails('correct');
}
}
updateFunction(){
// this.cs.presentAlert(this.ts.trPK('general', 'error-itg'));
this.cs.presentConfirmDialog(this.ts.trPK('userProfile', 'update-msg'),
()=>{
this.cs.greenToastPK("userProfile","update-confirm");
});
}
RemoveFunction(){
this.cs.presentConfirmDialog(this.ts.trPK('userProfile', 'remove-msg'),
()=>{
this.cs.redToastPK("userProfile","remove-confirm");
});
}
}

@ -1450,6 +1450,30 @@
"work":{
"en":"Work",
"ar":"العمل"
},
"update":{
"en":"Update",
"ar":"تعديل"
},
"remove":{
"en":"Remove",
"ar":"حذف"
},
"update-msg":{
"en":"Are you sure you want update this member ?",
"ar":"هل انت متاكد من تعديل هذا العضو؟"
},
"remove-msg":{
"en":"Are you sure you want rmove this member ?",
"ar":"هل انت متاكد من حذف هذا العضو ؟"
},
"update-confirm":{
"en":"member updated successfully",
"ar":"تم تعديل البيانات بنجاح"
},
"remove-confirm":{
"en":"member removed successfully",
"ar":"تم حذف البيانات بنجاح"
}
},
"changePassword": {

Loading…
Cancel
Save