services
This commit is contained in:
@@ -72,7 +72,7 @@ class ScheduleItem extends StatelessWidget {
|
||||
children: [
|
||||
timePickerField(
|
||||
context: context,
|
||||
text: schedule.getFormatTime(schedule.range1Hour1),
|
||||
text: ScheduleEntity.getFormatTime(schedule.range1Hour1),
|
||||
onPick: (pickedTime) {
|
||||
onChanged.call(schedule.copyWith(range1Hour1: pickedTime));
|
||||
},
|
||||
@@ -88,7 +88,7 @@ class ScheduleItem extends StatelessWidget {
|
||||
visible: !schedule.continuousDay,
|
||||
child: timePickerField(
|
||||
context: context,
|
||||
text: schedule.getFormatTime(schedule.range1Hour2),
|
||||
text: ScheduleEntity.getFormatTime(schedule.range1Hour2),
|
||||
onPick: (pickedTime) {
|
||||
onChanged.call(schedule.copyWith(range1Hour2: pickedTime));
|
||||
},
|
||||
@@ -104,7 +104,7 @@ class ScheduleItem extends StatelessWidget {
|
||||
visible: !schedule.continuousDay,
|
||||
child: timePickerField(
|
||||
context: context,
|
||||
text: schedule.getFormatTime(schedule.range2Hour1),
|
||||
text: ScheduleEntity.getFormatTime(schedule.range2Hour1),
|
||||
onPick: (pickedTime) {
|
||||
onChanged.call(schedule.copyWith(range2Hour1: pickedTime));
|
||||
},
|
||||
@@ -122,7 +122,7 @@ class ScheduleItem extends StatelessWidget {
|
||||
),
|
||||
timePickerField(
|
||||
context: context,
|
||||
text: schedule.getFormatTime(schedule.range2Hour2),
|
||||
text: ScheduleEntity.getFormatTime(schedule.range2Hour2),
|
||||
onPick: (pickedTime) {
|
||||
onChanged.call(schedule.copyWith(range2Hour2: pickedTime));
|
||||
},
|
||||
|
||||
@@ -510,6 +510,8 @@ class _ProfessionalProfileScreenState extends State<ProfessionalProfileScreen> {
|
||||
context.read<ProfessionalProfileBloc>().add(
|
||||
UpdateProfessionalBannerInfo(fileBanner: _imageFile?.path),
|
||||
);
|
||||
|
||||
log('xd -- si pasa');
|
||||
},
|
||||
label: 'Guardar',
|
||||
),
|
||||
@@ -588,13 +590,13 @@ class _ProfessionalProfileScreenState extends State<ProfessionalProfileScreen> {
|
||||
return 'N/A';
|
||||
}
|
||||
if (schedule.continuousDay) {
|
||||
return '${schedule.range1Hour1?.format(context).toString()} - ${schedule.range2Hour2?.format(context).toString()}';
|
||||
return '${ScheduleEntity.getFormatTime(schedule.range1Hour1)} - ${ScheduleEntity.getFormatTime(schedule.range2Hour2)}';
|
||||
} else {
|
||||
if (schedule.range1Hour2 == null || schedule.range2Hour1 == null) {
|
||||
return 'N/A';
|
||||
}
|
||||
|
||||
return '${schedule.range1Hour1?.format(context).toString()} - ${schedule.range1Hour2?.format(context).toString()}; ${schedule.range2Hour1?.format(context).toString()} - ${schedule.range2Hour2?.format(context).toString()}';
|
||||
return '${ScheduleEntity.getFormatTime(schedule.range1Hour1)} - ${ScheduleEntity.getFormatTime(schedule.range1Hour2)}; ${ScheduleEntity.getFormatTime(schedule.range2Hour1)} - ${ScheduleEntity.getFormatTime(schedule.range2Hour2)}';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,66 +31,69 @@ class _ProfessionalScheduleScreenState
|
||||
title: const Text('Horario'),
|
||||
),
|
||||
body: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
ScheduleItem(
|
||||
label: "Lunes",
|
||||
schedule: schedules.monday,
|
||||
onChanged: (s) {
|
||||
setState(() => schedules = schedules.copyWith(monday: s));
|
||||
},
|
||||
),
|
||||
ScheduleItem(
|
||||
label: "Martes",
|
||||
schedule: schedules.thursday,
|
||||
onChanged: (s) {
|
||||
setState(() => schedules = schedules.copyWith(thursday: s));
|
||||
},
|
||||
),
|
||||
ScheduleItem(
|
||||
label: "Miercoles",
|
||||
schedule: schedules.wednesday,
|
||||
onChanged: (s) {
|
||||
setState(() => schedules = schedules.copyWith(wednesday: s));
|
||||
},
|
||||
),
|
||||
ScheduleItem(
|
||||
label: "Jueves",
|
||||
schedule: schedules.tuesday,
|
||||
onChanged: (s) {
|
||||
setState(() => schedules = schedules.copyWith(tuesday: s));
|
||||
},
|
||||
),
|
||||
ScheduleItem(
|
||||
label: "Viernes",
|
||||
schedule: schedules.friday,
|
||||
onChanged: (s) {
|
||||
setState(() => schedules = schedules.copyWith(friday: s));
|
||||
},
|
||||
),
|
||||
ScheduleItem(
|
||||
label: "Sabado",
|
||||
schedule: schedules.saturday,
|
||||
onChanged: (s) {
|
||||
setState(() => schedules = schedules.copyWith(saturday: s));
|
||||
},
|
||||
),
|
||||
ScheduleItem(
|
||||
label: "Domingo",
|
||||
schedule: schedules.sunday,
|
||||
onChanged: (s) {
|
||||
setState(() => schedules = schedules.copyWith(sunday: s));
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
GeneralPrimaryButton(
|
||||
label: "Guardar",
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop(schedules);
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
],
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 15),
|
||||
child: Column(
|
||||
children: [
|
||||
ScheduleItem(
|
||||
label: "Lunes",
|
||||
schedule: schedules.monday,
|
||||
onChanged: (s) {
|
||||
setState(() => schedules = schedules.copyWith(monday: s));
|
||||
},
|
||||
),
|
||||
ScheduleItem(
|
||||
label: "Martes",
|
||||
schedule: schedules.thursday,
|
||||
onChanged: (s) {
|
||||
setState(() => schedules = schedules.copyWith(thursday: s));
|
||||
},
|
||||
),
|
||||
ScheduleItem(
|
||||
label: "Miercoles",
|
||||
schedule: schedules.wednesday,
|
||||
onChanged: (s) {
|
||||
setState(() => schedules = schedules.copyWith(wednesday: s));
|
||||
},
|
||||
),
|
||||
ScheduleItem(
|
||||
label: "Jueves",
|
||||
schedule: schedules.tuesday,
|
||||
onChanged: (s) {
|
||||
setState(() => schedules = schedules.copyWith(tuesday: s));
|
||||
},
|
||||
),
|
||||
ScheduleItem(
|
||||
label: "Viernes",
|
||||
schedule: schedules.friday,
|
||||
onChanged: (s) {
|
||||
setState(() => schedules = schedules.copyWith(friday: s));
|
||||
},
|
||||
),
|
||||
ScheduleItem(
|
||||
label: "Sabado",
|
||||
schedule: schedules.saturday,
|
||||
onChanged: (s) {
|
||||
setState(() => schedules = schedules.copyWith(saturday: s));
|
||||
},
|
||||
),
|
||||
ScheduleItem(
|
||||
label: "Domingo",
|
||||
schedule: schedules.sunday,
|
||||
onChanged: (s) {
|
||||
setState(() => schedules = schedules.copyWith(sunday: s));
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
GeneralPrimaryButton(
|
||||
label: "Guardar",
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop(schedules);
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user