fix edit to accept string of cur module

This commit is contained in:
Rafeek-Khoudare
2025-06-30 08:45:18 +03:00
parent 9f24606613
commit d4625a8f04

View File

@ -212,12 +212,21 @@ class _ScheduleTableView extends StatelessWidget {
isEdit: true,
).then((updatedSchedule) {
if (updatedSchedule != null) {
bool temp;
if (schedule.category == 'CUR_2') {
updatedSchedule.function.value == 'open'
? temp = true
: temp = false;
} else {
temp = updatedSchedule.function.value;
}
context.read<ScheduleBloc>().add(
ScheduleEditEvent(
scheduleId: schedule.scheduleId,
category: schedule.category,
time: updatedSchedule.time,
functionOn: updatedSchedule.function.value,
functionOn: temp,
// updatedSchedule.function.value,
selectedDays: updatedSchedule.days),
);
}