|
|
|
|
@ -10,6 +10,7 @@ import 'package:mc_common_app/models/general_models/generic_resp_model.dart';
|
|
|
|
|
import 'package:mc_common_app/theme/colors.dart';
|
|
|
|
|
import 'package:mc_common_app/utils/date_helper.dart';
|
|
|
|
|
import 'package:mc_common_app/utils/dialogs_and_bottomsheets.dart';
|
|
|
|
|
import 'package:mc_common_app/utils/enums.dart';
|
|
|
|
|
import 'package:mc_common_app/utils/navigator.dart';
|
|
|
|
|
import 'package:mc_common_app/utils/utils.dart';
|
|
|
|
|
import 'package:mc_common_app/widgets/button/show_fill_button.dart';
|
|
|
|
|
@ -52,7 +53,7 @@ class _SchedulesListPageState extends State<SchedulesListPage> {
|
|
|
|
|
GenericRespModel res = await serviceVM.setScheduleInactive(serviceVM.schedule!.data![index].id!, serviceVM.schedule!.data![index].serviceProviderBranchId!);
|
|
|
|
|
Utils.hideLoading(context);
|
|
|
|
|
if (res.messageStatus == 1) {
|
|
|
|
|
Utils.showToast(LocaleKeys.branch_deleted.tr());
|
|
|
|
|
Utils.showToast(LocaleKeys.scheduleDeletedSuccessfully.tr());
|
|
|
|
|
} else {
|
|
|
|
|
Utils.showToast(res.message ?? "");
|
|
|
|
|
}
|
|
|
|
|
@ -94,7 +95,11 @@ class _SchedulesListPageState extends State<SchedulesListPage> {
|
|
|
|
|
? EmptyWidget(
|
|
|
|
|
text: LocaleKeys.noSchedulesFound.tr(),
|
|
|
|
|
).paddingAll(21)
|
|
|
|
|
: ListView.separated(
|
|
|
|
|
: RefreshIndicator(
|
|
|
|
|
onRefresh: () async {
|
|
|
|
|
await scheduleVM.getSchedules(widget.branchId ?? "");
|
|
|
|
|
},
|
|
|
|
|
child: ListView.separated(
|
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
|
return Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
@ -150,6 +155,7 @@ class _SchedulesListPageState extends State<SchedulesListPage> {
|
|
|
|
|
},
|
|
|
|
|
padding: const EdgeInsets.all(20),
|
|
|
|
|
itemCount: scheduleVM.schedule!.data!.length,
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
|