|
|
|
|
@ -60,7 +60,9 @@ class _BranchDetailPageState extends State<BranchDetailPage> {
|
|
|
|
|
|
|
|
|
|
bool validation(BuildContext context) {
|
|
|
|
|
bool isValid = false;
|
|
|
|
|
for (var element in context.read<ServiceVM>().allProviderDealersList) {
|
|
|
|
|
for (var element in context
|
|
|
|
|
.read<ServiceVM>()
|
|
|
|
|
.allProviderDealersList) {
|
|
|
|
|
if (element.isBranchUser ?? false) {
|
|
|
|
|
isValid = true;
|
|
|
|
|
}
|
|
|
|
|
@ -112,6 +114,7 @@ class _BranchDetailPageState extends State<BranchDetailPage> {
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
showMyBottomSheet(
|
|
|
|
|
context,
|
|
|
|
|
isScrollControlled: true,
|
|
|
|
|
child: AssignDealerUserSheet(
|
|
|
|
|
branchId: widget.branchData.id.toString(),
|
|
|
|
|
callBackFunc: () {
|
|
|
|
|
@ -188,7 +191,10 @@ class _BranchDetailPageState extends State<BranchDetailPage> {
|
|
|
|
|
child: ListView.builder(
|
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
|
return Container(
|
|
|
|
|
child: (EasyLocalization.of(context)?.currentLocale?.countryCode == "SA"
|
|
|
|
|
child: (EasyLocalization
|
|
|
|
|
.of(context)
|
|
|
|
|
?.currentLocale
|
|
|
|
|
?.countryCode == "SA"
|
|
|
|
|
? serviceVM.categories[pIndex].services![index].serviceDescriptionN.toString()
|
|
|
|
|
: serviceVM.categories[pIndex].services![index].serviceDescription.toString())
|
|
|
|
|
.toText(
|
|
|
|
|
@ -301,7 +307,9 @@ class _BranchDetailPageState extends State<BranchDetailPage> {
|
|
|
|
|
Utils.showToast(LocaleKeys.waitForBranchVerification.tr());
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
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());
|
|
|
|
|
}),
|
|
|
|
|
10.height,
|
|
|
|
|
@ -332,7 +340,7 @@ class _BranchDetailPageState extends State<BranchDetailPage> {
|
|
|
|
|
)).horPaddingMain(),
|
|
|
|
|
// Row(
|
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.center,Assign
|
|
|
|
|
// children: [
|
|
|
|
|
// const Icon(
|
|
|
|
|
// Icons.add,
|
|
|
|
|
@ -363,7 +371,8 @@ class _BranchDetailPageState extends State<BranchDetailPage> {
|
|
|
|
|
const Center(
|
|
|
|
|
child: CircularProgressIndicator(),
|
|
|
|
|
),
|
|
|
|
|
] else ...[
|
|
|
|
|
] else
|
|
|
|
|
...[
|
|
|
|
|
ListView.separated(
|
|
|
|
|
itemBuilder: (context, pIndex) {
|
|
|
|
|
return buildServiceTileWidget(pIndex, serviceVM).onPress(() {
|
|
|
|
|
|