preference page

This commit is contained in:
CHIEFSOFT\ameye
2024-08-07 11:07:10 -04:00
parent 30717096a6
commit 57c1c7a72b
5 changed files with 81 additions and 8 deletions
+1 -1
View File
@@ -52,7 +52,7 @@
<ion-input (ionChange)="refreshBut()" type="password" placeholder="Password" maxlength="15" [(ngModel)]='password'></ion-input>
</ion-item>
<div class="check">
<div class="check" style="padding-left: 35px;">
<ion-checkbox mode="md" checked></ion-checkbox>
<ion-label>Remember me</ion-label>
</div>
+1
View File
@@ -100,6 +100,7 @@ export class LoginPage implements OnInit {
checkName();
// use hook after platform dom ready
FacebookLogin.initialize({ appId: environment.facebookAppId });
this.refreshBut();
}
getBlogData(){
@@ -33,14 +33,30 @@
<ion-list>
<ion-radio-group name="user_pref" [(ngModel)]='user_pref' value="{{user_pref_value}}" (ionChange)="getPrefValue()">
<ion-item *ngFor="let item of prefData" style="padding: 2px 10px 10px 2px; font-size: 24px;">
<ion-label class="ion-text-wrap" style="font-size: 22px;">{{item.description}}</ion-label>
<ion-radio style="font-size: 24px;" slot="end" value="{{item.pref}}"></ion-radio>
</ion-item>
<ion-radio-group
name="user_pref"
[(ngModel)]='user_pref'
value={{user_pref_value}}
(ionChange)="getPrefValue()">
<ion-item *ngFor="let item of prefData" style="padding: 2px 10px 10px 2px; font-size: 24px;">
<ion-label class="ion-text-wrap" style="font-size: 22px;">{{item.description}} {{(user_pref_value==item.pref)? 'true': 'false'}}</ion-label>
<ion-radio style="font-size: 24px;"
slot="end"
[value]="item.pref" >
</ion-radio>
</ion-item>
</ion-radio-group>
</ion-list>
<!-- [value]="{{user_pref_value}}" [value]="{{(user_pref_value==item.pref) ? 'true': 'false'}}"-->
<!-- <div class="check" style="padding-left: 35px;" *ngFor="let item of prefData">-->
<!-- <ion-checkbox-->
<!-- (ionChange)="prefChange(item)"-->
<!-- mode="md"-->
<!-- checked-->
<!-- style="font-size: 24px;"></ion-checkbox>-->
<!-- <ion-label class="ion-text-wrap" style="font-size: 22px;">{{item.description}}</ion-label>-->
<!-- </div>-->
</div>
@@ -9,6 +9,38 @@ ion-content {
}
ion-radio::part(container) {
width: 30px;
height: 30px;
border-radius: 8px;
border: 2px solid #ddd;
}
ion-radio::part(mark) {
background: none;
transition: none;
transform: none;
border-radius: 0;
}
ion-radio.radio-checked::part(container) {
background: #6815ec;
border-color: transparent;
}
ion-radio.radio-checked::part(mark) {
width: 6px;
height: 10px;
border-width: 0px 2px 2px 0px;
border-style: solid;
border-color: #fff;
transform: rotate(45deg);
}
ion-footer {
--background: white;
+26 -2
View File
@@ -53,7 +53,8 @@ export class PreferencesPage implements OnInit {
sessionid: string,
};
prefTotalData:any;
prefData: [];
prefData: any;
prefPdData: [];
async getPreferenceData(){
// this.curr_session = this.sessionDataProviderService.session;
@@ -73,8 +74,23 @@ export class PreferencesPage implements OnInit {
this.prefTotalData = prefTotalData;
console.log("prefTotalData RETURN->", this.prefTotalData);
this.prefData = this.prefTotalData.result_list;
this.prefData.map( (itemD) =>{
console.log(itemD);
console.log("***", itemD.pref, this.user_pref_value, "***");
console.log("--------------------------==================----------------------------");
if (this.user_pref_value==itemD.pref){
itemD.currval = 'true';
}
else{
itemD.currval = 'false';
}
});
// this.prefPdData = this.prefData;
// debugger; result_list
this.user_pref.refresh();
// this.user_pref.refresh();
}
);
}
@@ -111,4 +127,12 @@ export class PreferencesPage implements OnInit {
}
);
}
prefChange(item:any){
console.log(item)
}
}