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