|
|
|
@ -21,6 +21,7 @@ import 'package:mc_common_app/utils/navigator.dart';
|
|
|
|
import 'package:mc_common_app/widgets/bottom_sheet.dart';
|
|
|
|
import 'package:mc_common_app/widgets/bottom_sheet.dart';
|
|
|
|
import 'package:mc_common_app/widgets/button/show_fill_button.dart';
|
|
|
|
import 'package:mc_common_app/widgets/button/show_fill_button.dart';
|
|
|
|
import 'package:mc_common_app/widgets/common_widgets/app_bar.dart';
|
|
|
|
import 'package:mc_common_app/widgets/common_widgets/app_bar.dart';
|
|
|
|
|
|
|
|
import 'package:mc_common_app/widgets/common_widgets/custom_add_button_widget.dart';
|
|
|
|
import 'package:mc_common_app/widgets/extensions/extensions_widget.dart';
|
|
|
|
import 'package:mc_common_app/widgets/extensions/extensions_widget.dart';
|
|
|
|
import 'package:mc_common_app/widgets/row_with_arrow.dart';
|
|
|
|
import 'package:mc_common_app/widgets/row_with_arrow.dart';
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
@ -51,7 +52,7 @@ class _BranchDetailPageState extends State<BranchDetailPage> {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
await serviceVM.filterUserBranchCategories();
|
|
|
|
serviceVM.filterUserBranchCategories();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -144,15 +145,7 @@ class _BranchDetailPageState extends State<BranchDetailPage> {
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
12.height,
|
|
|
|
12.height,
|
|
|
|
ShowFillButton(
|
|
|
|
Utils.buildStatusContainer(LocaleKeys.rejectedFormAdmin.tr(), marginAll: 0, fontSize: 16),
|
|
|
|
title: LocaleKeys.rejectedFormAdmin.tr(),
|
|
|
|
|
|
|
|
maxWidth: double.infinity,
|
|
|
|
|
|
|
|
backgroundColor: MyColors.darkWhiteColor,
|
|
|
|
|
|
|
|
borderColor: MyColors.darkPrimaryColor,
|
|
|
|
|
|
|
|
txtColor: MyColors.lightTextColor,
|
|
|
|
|
|
|
|
isFilled: true,
|
|
|
|
|
|
|
|
onPressed: () {},
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
],
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -309,48 +302,60 @@ class _BranchDetailPageState extends State<BranchDetailPage> {
|
|
|
|
context.read<ScheduleVM>().currentSelectedBranchName = widget.branchData.branchName.toString();
|
|
|
|
context.read<ScheduleVM>().currentSelectedBranchName = widget.branchData.branchName.toString();
|
|
|
|
navigateWithName(context, AppRoutes.schedulesList, arguments: widget.branchData.id.toString());
|
|
|
|
navigateWithName(context, AppRoutes.schedulesList, arguments: widget.branchData.id.toString());
|
|
|
|
}),
|
|
|
|
}),
|
|
|
|
Row(
|
|
|
|
10.height,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
CustomAddButton(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
needsBorder: true,
|
|
|
|
children: [
|
|
|
|
bgColor: MyColors.white,
|
|
|
|
const Icon(
|
|
|
|
onTap: () {
|
|
|
|
Icons.add,
|
|
|
|
if (widget.branchData.branchStatus == BranchStatusEnum.pending || widget.branchData.branchStatus == BranchStatusEnum.rejected) {
|
|
|
|
color: Colors.white,
|
|
|
|
Utils.showToast("Please wait for the branch verification.");
|
|
|
|
size: 18,
|
|
|
|
return;
|
|
|
|
).toContainer(
|
|
|
|
}
|
|
|
|
borderRadius: 100,
|
|
|
|
navigateWithName(
|
|
|
|
paddingAll: 2,
|
|
|
|
context,
|
|
|
|
backgroundColor: MyColors.darkIconColor,
|
|
|
|
AppRoutes.createServices3,
|
|
|
|
),
|
|
|
|
arguments: CreateBranchModel(
|
|
|
|
8.width,
|
|
|
|
branchId: widget.branchData.id.toString(),
|
|
|
|
LocaleKeys.addNewService.tr().toText(fontSize: 15, color: MyColors.lightTextColor, letterSpacing: -0.52),
|
|
|
|
branchName: widget.branchData.branchName.toString(),
|
|
|
|
],
|
|
|
|
isForEdit: false,
|
|
|
|
)
|
|
|
|
),
|
|
|
|
.toContainer(
|
|
|
|
);
|
|
|
|
borderRadius: 0,
|
|
|
|
},
|
|
|
|
backgroundColor: MyColors.darkWhiteColor,
|
|
|
|
text: LocaleKeys.addNewService.tr(),
|
|
|
|
width: double.infinity,
|
|
|
|
icon: Container(
|
|
|
|
paddingAll: 25,
|
|
|
|
height: 24,
|
|
|
|
margin: const EdgeInsets.only(
|
|
|
|
width: 24,
|
|
|
|
left: 20,
|
|
|
|
decoration: const BoxDecoration(shape: BoxShape.circle, color: MyColors.darkTextColor),
|
|
|
|
right: 20,
|
|
|
|
child: const Icon(Icons.add, color: MyColors.white),
|
|
|
|
top: 20,
|
|
|
|
)).horPaddingMain(),
|
|
|
|
))
|
|
|
|
// Row(
|
|
|
|
.onPress(() {
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
if (widget.branchData.branchStatus == BranchStatusEnum.pending || widget.branchData.branchStatus == BranchStatusEnum.rejected) {
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
Utils.showToast("Please wait for the branch verification.");
|
|
|
|
// children: [
|
|
|
|
return;
|
|
|
|
// const Icon(
|
|
|
|
}
|
|
|
|
// Icons.add,
|
|
|
|
navigateWithName(
|
|
|
|
// color: Colors.white,
|
|
|
|
context,
|
|
|
|
// size: 18,
|
|
|
|
AppRoutes.createServices3,
|
|
|
|
// ).toContainer(
|
|
|
|
arguments: CreateBranchModel(
|
|
|
|
// borderRadius: 100,
|
|
|
|
branchId: widget.branchData.id.toString(),
|
|
|
|
// paddingAll: 2,
|
|
|
|
branchName: widget.branchData.branchName.toString(),
|
|
|
|
// backgroundColor: MyColors.darkIconColor,
|
|
|
|
isForEdit: false,
|
|
|
|
// ),
|
|
|
|
),
|
|
|
|
// 8.width,
|
|
|
|
);
|
|
|
|
// LocaleKeys.addNewService.tr().toText(fontSize: 15, color: MyColors.lightTextColor, letterSpacing: -0.52),
|
|
|
|
}),
|
|
|
|
// ],
|
|
|
|
|
|
|
|
// )
|
|
|
|
|
|
|
|
// .toContainer(
|
|
|
|
|
|
|
|
// borderRadius: 0,
|
|
|
|
|
|
|
|
// backgroundColor: MyColors.darkWhiteColor,
|
|
|
|
|
|
|
|
// width: double.infinity,
|
|
|
|
|
|
|
|
// paddingAll: 25,
|
|
|
|
|
|
|
|
// margin: const EdgeInsets.only(
|
|
|
|
|
|
|
|
// left: 20,
|
|
|
|
|
|
|
|
// right: 20,
|
|
|
|
|
|
|
|
// top: 20,
|
|
|
|
|
|
|
|
// ))
|
|
|
|
|
|
|
|
// .onPress(() {}),
|
|
|
|
if (serviceVM.state == ViewState.busy) ...[
|
|
|
|
if (serviceVM.state == ViewState.busy) ...[
|
|
|
|
30.height,
|
|
|
|
30.height,
|
|
|
|
const Center(
|
|
|
|
const Center(
|
|
|
|
|