Fixing JIRA Issues

aamir_dev
Faiz Hashmi 1 year ago
parent fddfabe2b2
commit 10f4803781

@ -2,6 +2,7 @@ import 'dart:io';
import 'package:car_customer_app/config/customer_dependencies.dart'; import 'package:car_customer_app/config/customer_dependencies.dart';
import 'package:car_customer_app/config/customer_routes.dart'; import 'package:car_customer_app/config/customer_routes.dart';
import 'package:flutter/services.dart';
import 'package:mc_common_app/repositories/branch_repo.dart'; import 'package:mc_common_app/repositories/branch_repo.dart';
import 'package:mc_common_app/repositories/chat_repo.dart'; import 'package:mc_common_app/repositories/chat_repo.dart';
import 'package:mc_common_app/repositories/appointment_repo.dart'; import 'package:mc_common_app/repositories/appointment_repo.dart';
@ -62,7 +63,8 @@ Future<void> main() async {
injector.get<Location>().handleLocationPermission(); injector.get<Location>().handleLocationPermission();
}); });
CustomerAppRoutes.routes.addAll(AppRoutes.routes); CustomerAppRoutes.routes.addAll(AppRoutes.routes);
initializeDateFormatting().then((_) => runApp( initializeDateFormatting().then(
(_) => runApp(
MultiProvider( MultiProvider(
providers: <SingleChildWidget>[ providers: <SingleChildWidget>[
ChangeNotifierProvider<BaseVM>( ChangeNotifierProvider<BaseVM>(
@ -122,7 +124,8 @@ Future<void> main() async {
], ],
child: MyApp(), child: MyApp(),
).setupLocale(), ).setupLocale(),
)); ),
);
} }
// todo terminal command to generate translation files // todo terminal command to generate translation files
@ -136,6 +139,10 @@ class MyApp extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp,
DeviceOrientation.portraitDown,
]);
return Sizer( return Sizer(
builder: (context, orientation, deviceType) { builder: (context, orientation, deviceType) {
injector.get<AppState>().setAppType(AppType.customer); injector.get<AppState>().setAppType(AppType.customer);
@ -160,3 +167,5 @@ class MyApp extends StatelessWidget {
); );
} }
} }
//273821 slotID

@ -86,19 +86,31 @@ class _ProviderProfileViewState extends State<ProviderProfileView> {
//TODO: company logo/banner not added form provider app yet //TODO: company logo/banner not added form provider app yet
Image.asset(MyAssets.bnCar), Image.asset(MyAssets.bnCar),
12.height, 12.height,
(appointmentsVM.providerProfileModel!.name ?? appointmentsVM.providerProfileModel!.companyName).toString().toText( if (appointmentsVM.providerProfileModel!.memberSince!.isNotEmpty) ...[
Row(
children: [
("${LocaleKeys.companyName.tr()}:").toText(color: MyColors.lightTextColor, fontSize: 12),
4.width,
(appointmentsVM.providerProfileModel!.companyName ?? appointmentsVM.providerProfileModel!.name).toString().toText(
fontSize: 16, fontSize: 16,
isBold: true, isBold: true,
), ),
],
),
],
if (appointmentsVM.providerProfileModel!.memberSince!.isNotEmpty) ...[ if (appointmentsVM.providerProfileModel!.memberSince!.isNotEmpty) ...[
Row( Row(
children: [ children: [
("${LocaleKeys.memberSince.tr()}:").toText(color: MyColors.lightTextColor, fontSize: 12), ("${LocaleKeys.memberSince.tr()}:").toText(color: MyColors.lightTextColor, fontSize: 12),
4.width, 4.width,
"${DateHelper.formatAsMonthYear(DateHelper.parseStringToDate(DateHelper.formatDateT( "${DateHelper.formatAsMonthYear(
DateHelper.parseStringToDate(
DateHelper.formatDateT(
appointmentsVM.providerProfileModel!.memberSince ?? "", appointmentsVM.providerProfileModel!.memberSince ?? "",
)))}" ),
),
)}"
.toText(fontSize: 12, isBold: true), .toText(fontSize: 12, isBold: true),
], ],
), ),

Loading…
Cancel
Save