mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-09 22:57:21 +00:00
fix edit to accept string of cur module
This commit is contained in:
@ -212,12 +212,21 @@ class _ScheduleTableView extends StatelessWidget {
|
|||||||
isEdit: true,
|
isEdit: true,
|
||||||
).then((updatedSchedule) {
|
).then((updatedSchedule) {
|
||||||
if (updatedSchedule != null) {
|
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(
|
context.read<ScheduleBloc>().add(
|
||||||
ScheduleEditEvent(
|
ScheduleEditEvent(
|
||||||
scheduleId: schedule.scheduleId,
|
scheduleId: schedule.scheduleId,
|
||||||
category: schedule.category,
|
category: schedule.category,
|
||||||
time: updatedSchedule.time,
|
time: updatedSchedule.time,
|
||||||
functionOn: updatedSchedule.function.value,
|
functionOn: temp,
|
||||||
|
// updatedSchedule.function.value,
|
||||||
selectedDays: updatedSchedule.days),
|
selectedDays: updatedSchedule.days),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user