update
This commit is contained in:
@@ -281,7 +281,7 @@ class AuthenticationRepository extends GetxController {
|
|||||||
final snapshot =
|
final snapshot =
|
||||||
await FirebaseFirestore.instance.collection('users').doc(uid).get();
|
await FirebaseFirestore.instance.collection('users').doc(uid).get();
|
||||||
final Map<String, dynamic>? data = snapshot.data();
|
final Map<String, dynamic>? data = snapshot.data();
|
||||||
tarifa = data?['tarifa'] ?? 0;
|
tarifa = data?['tarifas'] ?? 0;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('Error getting tarifa: $e');
|
print('Error getting tarifa: $e');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ class Event {
|
|||||||
latitud: json['latitude'] ?? 0,
|
latitud: json['latitude'] ?? 0,
|
||||||
status: json['status'],
|
status: json['status'],
|
||||||
timeStamp: json['Timestamp'] ?? 0,
|
timeStamp: json['Timestamp'] ?? 0,
|
||||||
tarifa: json['tarifa'] ?? 0,
|
tarifa: json['tarifas'] ?? 0,
|
||||||
professionalScored: json['professional_scored'],
|
professionalScored: json['professional_scored'],
|
||||||
userScored: json['user_scored'],
|
userScored: json['user_scored'],
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ class UserModel {
|
|||||||
json['profesion'],
|
json['profesion'],
|
||||||
json['estado'],
|
json['estado'],
|
||||||
avatar != null ? storage.ref().child(avatar) : null,
|
avatar != null ? storage.ref().child(avatar) : null,
|
||||||
json['tarifa'] ?? 0,
|
json['tarifas'] ?? 0,
|
||||||
json['phoneNumber'],
|
json['phoneNumber'],
|
||||||
json['token'],
|
json['token'],
|
||||||
);
|
);
|
||||||
@@ -51,7 +51,7 @@ class UserModel {
|
|||||||
firestoreMap['profesion'],
|
firestoreMap['profesion'],
|
||||||
firestoreMap['estado'],
|
firestoreMap['estado'],
|
||||||
avatar != null ? storage.ref().child(avatar) : null,
|
avatar != null ? storage.ref().child(avatar) : null,
|
||||||
firestoreMap['tarifa'] ?? 0,
|
firestoreMap['tarifas'] ?? 0,
|
||||||
firestoreMap['phoneNumber'] ?? 'Sin numero',
|
firestoreMap['phoneNumber'] ?? 'Sin numero',
|
||||||
firestoreMap['token'],
|
firestoreMap['token'],
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ class Professional {
|
|||||||
latitude: data['latitude'] ?? 0,
|
latitude: data['latitude'] ?? 0,
|
||||||
longitude: data['longitude'] ?? 0,
|
longitude: data['longitude'] ?? 0,
|
||||||
scores: await ScoresModel.scoreFrom(uid, true, true),
|
scores: await ScoresModel.scoreFrom(uid, true, true),
|
||||||
tarifa: data['tarifa'] ?? 0,
|
tarifa: data['tarifas'] ?? 0,
|
||||||
token: data['token'] ?? '',
|
token: data['token'] ?? '',
|
||||||
);
|
);
|
||||||
return professional;
|
return professional;
|
||||||
@@ -261,7 +261,7 @@ class _ProfessionalScreenState extends State<ProfessionalScreen> {
|
|||||||
latitude: data['latitude'] ?? 0,
|
latitude: data['latitude'] ?? 0,
|
||||||
longitude: data['longitude'] ?? 0,
|
longitude: data['longitude'] ?? 0,
|
||||||
scores: await ScoresModel.scoreTo(user.id, true, true),
|
scores: await ScoresModel.scoreTo(user.id, true, true),
|
||||||
tarifa: data['tarifa'] ?? 0,
|
tarifa: data['tarifas'] ?? 0,
|
||||||
token: data['token'] ?? '',
|
token: data['token'] ?? '',
|
||||||
);
|
);
|
||||||
professionals.add(professional);
|
professionals.add(professional);
|
||||||
@@ -284,7 +284,7 @@ class _ProfessionalScreenState extends State<ProfessionalScreen> {
|
|||||||
latitude: data['latitude'] ?? 0,
|
latitude: data['latitude'] ?? 0,
|
||||||
longitude: data['longitude'] ?? 0,
|
longitude: data['longitude'] ?? 0,
|
||||||
scores: await ScoresModel.scoreTo(user.id, true, true),
|
scores: await ScoresModel.scoreTo(user.id, true, true),
|
||||||
tarifa: data['tarifa'] ?? 0,
|
tarifa: data['tarifas'] ?? 0,
|
||||||
token: data['token'] ?? '',
|
token: data['token'] ?? '',
|
||||||
);
|
);
|
||||||
professionals.add(professional);
|
professionals.add(professional);
|
||||||
@@ -449,9 +449,9 @@ class _ProfessionalScreenState extends State<ProfessionalScreen> {
|
|||||||
)
|
)
|
||||||
: const SizedBox(),
|
: const SizedBox(),
|
||||||
professionals[index].ubicacion == 'ambos'
|
professionals[index].ubicacion == 'ambos'
|
||||||
? Text(
|
? const Text(
|
||||||
'Disponibilidad a domicilio y en sitio ${professionals[index].tarifa}',
|
'Disponibilidad a domicilio y en sitio',
|
||||||
style: const TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.blue,
|
color: Colors.blue,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ class _ProfileProScreenState extends State<ProfileProScreen> {
|
|||||||
|
|
||||||
bool tarifaValue = false;
|
bool tarifaValue = false;
|
||||||
|
|
||||||
bool domicilioValue = true;
|
bool domicilioValue = false;
|
||||||
bool sitioValue = false;
|
bool sitioValue = false;
|
||||||
|
|
||||||
var photoTemp = '';
|
var photoTemp = '';
|
||||||
@@ -64,9 +64,9 @@ class _ProfileProScreenState extends State<ProfileProScreen> {
|
|||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
if (settings == null) {
|
if (settings == null) {
|
||||||
SettingModel.getSettings().then(
|
SettingModel.getSettings().then((SettingModel value) => setState(
|
||||||
(SettingModel value) => setState(() => settings = value),
|
() => {print('Settings: $value'), settings = value},
|
||||||
);
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
final uid = AuthenticationRepository.instance.getCurrentUserUid();
|
final uid = AuthenticationRepository.instance.getCurrentUserUid();
|
||||||
|
|||||||
Reference in New Issue
Block a user