|
|
|
@ -1,7 +1,6 @@
|
|
|
|
import 'dart:async';
|
|
|
|
import 'dart:async';
|
|
|
|
import 'package:car_provider_app/config/provider_routes.dart';
|
|
|
|
import 'package:car_provider_app/config/provider_routes.dart';
|
|
|
|
import 'package:car_provider_app/views/settings/branch/dealer/widget/assign_dealer_user_sheet.dart';
|
|
|
|
import 'package:car_provider_app/views/settings/branch/dealer/widget/assign_dealer_user_sheet.dart';
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
|
|
|
|
import 'package:mc_common_app/generated/locale_keys.g.dart';
|
|
|
|
import 'package:mc_common_app/generated/locale_keys.g.dart';
|
|
|
|
import 'package:mc_common_app/view_models/service_view_model.dart';
|
|
|
|
import 'package:mc_common_app/view_models/service_view_model.dart';
|
|
|
|
import 'package:car_provider_app/views/settings/services/services_list_page.dart';
|
|
|
|
import 'package:car_provider_app/views/settings/services/services_list_page.dart';
|
|
|
|
@ -96,21 +95,31 @@ class BranchDetailPage extends StatelessWidget {
|
|
|
|
actionWidget = Column(
|
|
|
|
actionWidget = Column(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Row(
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
children: [('${LocaleKeys.rejectionComments.tr()}:').toText(fontSize: 16, color: MyColors.darkTextColor, textAlign: TextAlign.right)],
|
|
|
|
('${LocaleKeys.rejectionComments.tr()}:').toText(fontSize: 16, color: MyColors.darkTextColor),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Row(
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
|
|
|
|
if (branchData.branchAuditTrial != null && branchData.branchAuditTrial!.isNotEmpty) ...[
|
|
|
|
Flexible(
|
|
|
|
Flexible(
|
|
|
|
child: ('These are some dummy static comments from the Admin. Which will guide you regarding the next steps to resubmit.').toText(
|
|
|
|
child: ("${branchData.branchAuditTrial!.first.comment}").toText(
|
|
|
|
fontSize: 14,
|
|
|
|
fontSize: 14,
|
|
|
|
color: MyColors.primaryColor,
|
|
|
|
color: MyColors.primaryColor,
|
|
|
|
isItalic: true,
|
|
|
|
isItalic: true,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
]
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
12.height,
|
|
|
|
|
|
|
|
ShowFillButton(
|
|
|
|
|
|
|
|
title: LocaleKeys.rejectedFormAdmin.tr(),
|
|
|
|
|
|
|
|
maxWidth: double.infinity,
|
|
|
|
|
|
|
|
backgroundColor: MyColors.darkWhiteColor,
|
|
|
|
|
|
|
|
borderColor: MyColors.darkPrimaryColor,
|
|
|
|
|
|
|
|
txtColor: MyColors.lightTextColor,
|
|
|
|
|
|
|
|
isFilled: true,
|
|
|
|
|
|
|
|
onPressed: () {},
|
|
|
|
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -120,7 +129,7 @@ class BranchDetailPage extends StatelessWidget {
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
filterBranch();
|
|
|
|
filterBranch();
|
|
|
|
getBranchUsers(context);
|
|
|
|
// getBranchUsers(context);
|
|
|
|
return Scaffold(
|
|
|
|
return Scaffold(
|
|
|
|
appBar: CustomAppBar(title: LocaleKeys.branchDetail.tr()),
|
|
|
|
appBar: CustomAppBar(title: LocaleKeys.branchDetail.tr()),
|
|
|
|
body: Consumer<ServiceVM>(builder: (context, model, _) {
|
|
|
|
body: Consumer<ServiceVM>(builder: (context, model, _) {
|
|
|
|
@ -140,8 +149,11 @@ class BranchDetailPage extends StatelessWidget {
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
child: Row(
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
branchData.branchProfileImage.buildNetworkImage(),
|
|
|
|
branchData.branchProfileImage.buildNetworkImage(
|
|
|
|
12.width,
|
|
|
|
height: 55,
|
|
|
|
|
|
|
|
width: 50,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
10.width,
|
|
|
|
LocaleKeys.branchInfo.tr().toText(fontSize: 16, color: Colors.black, isBold: true),
|
|
|
|
LocaleKeys.branchInfo.tr().toText(fontSize: 16, color: Colors.black, isBold: true),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -162,9 +174,11 @@ class BranchDetailPage extends StatelessWidget {
|
|
|
|
showData("${LocaleKeys.city.tr()}:", branchData.cityName.toString()),
|
|
|
|
showData("${LocaleKeys.city.tr()}:", branchData.cityName.toString()),
|
|
|
|
showData("${LocaleKeys.branchName.tr()}:", branchData.branchName.toString()),
|
|
|
|
showData("${LocaleKeys.branchName.tr()}:", branchData.branchName.toString()),
|
|
|
|
showData("${LocaleKeys.branchDescription.tr()}:", branchData.branchDescription.toString()),
|
|
|
|
showData("${LocaleKeys.branchDescription.tr()}:", branchData.branchDescription.toString()),
|
|
|
|
|
|
|
|
showData("${LocaleKeys.branchDescription.tr()}:", branchData.branchDescription.toString()),
|
|
|
|
|
|
|
|
showData("${LocaleKeys.time.tr()}:", "${branchData.openTime.toString()} - ${branchData.closeTime.toString()}"),
|
|
|
|
showData("${LocaleKeys.address.tr()}:", branchData.address.toString()),
|
|
|
|
showData("${LocaleKeys.address.tr()}:", branchData.address.toString()),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
).paddingOnly(left: 60),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
).horPaddingMain(),
|
|
|
|
).horPaddingMain(),
|
|
|
|
10.height,
|
|
|
|
10.height,
|
|
|
|
@ -281,10 +295,7 @@ class BranchDetailPage extends StatelessWidget {
|
|
|
|
child: ListView.builder(
|
|
|
|
child: ListView.builder(
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
return Container(
|
|
|
|
return Container(
|
|
|
|
child: (EasyLocalization
|
|
|
|
child: (EasyLocalization.of(context)?.currentLocale?.countryCode == "SA"
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
?.currentLocale
|
|
|
|
|
|
|
|
?.countryCode == "SA"
|
|
|
|
|
|
|
|
? categories[pIndex].services![index].serviceDescriptionN.toString()
|
|
|
|
? categories[pIndex].services![index].serviceDescriptionN.toString()
|
|
|
|
: categories[pIndex].services![index].serviceDescription.toString())
|
|
|
|
: categories[pIndex].services![index].serviceDescription.toString())
|
|
|
|
.toText(
|
|
|
|
.toText(
|
|
|
|
@ -348,9 +359,7 @@ class BranchDetailPage extends StatelessWidget {
|
|
|
|
|
|
|
|
|
|
|
|
bool validation(BuildContext context) {
|
|
|
|
bool validation(BuildContext context) {
|
|
|
|
bool isValid = false;
|
|
|
|
bool isValid = false;
|
|
|
|
for (var element in context
|
|
|
|
for (var element in context.read<ServiceVM>().allProviderDealersList) {
|
|
|
|
.read<ServiceVM>()
|
|
|
|
|
|
|
|
.allProviderDealersList) {
|
|
|
|
|
|
|
|
if (element.isBranchUser ?? false) {
|
|
|
|
if (element.isBranchUser ?? false) {
|
|
|
|
isValid = true;
|
|
|
|
isValid = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|