fix: risk profile

This commit is contained in:
Dian Bayu Nugroho 2024-02-16 17:17:19 +07:00
parent 9da1675250
commit eb1eb83d52
5 changed files with 116 additions and 163 deletions

View File

@ -60,14 +60,6 @@ class SubmitBankAccount extends StatelessWidget {
color: ColorPalette.slate400, color: ColorPalette.slate400,
), ),
), ),
// const Spacer(),
// ButtonView(
// name: 'Next',
// onPressed: () {
// provider.nextSubmission(context);
// routePush(context, page: const ConfirmBankAccount());
// },
// )
], ],
); );
}), }),

View File

@ -1,19 +1,17 @@
import 'package:cims_apps/application/assets/path_assets.dart';
import 'package:cims_apps/application/component/button/back_button_view.dart'; import 'package:cims_apps/application/component/button/back_button_view.dart';
import 'package:cims_apps/application/component/button/button_view.dart'; import 'package:cims_apps/application/component/button/button_view.dart';
import 'package:cims_apps/application/component/image/image_view.dart';
import 'package:cims_apps/application/theme/color_palette.dart'; import 'package:cims_apps/application/theme/color_palette.dart';
import 'package:cims_apps/core/route/route.dart'; import 'package:cims_apps/core/route/route.dart';
import 'package:cims_apps/core/utils/size_config.dart'; import 'package:cims_apps/core/utils/size_config.dart';
import 'package:cims_apps/features/auth/registration/view/registration_password_view.dart'; import 'package:cims_apps/features/auth/registration/view/registration_password_view.dart';
import 'package:cims_apps/features/auth/registration/view/submission_data/risk_profile/risk_profile_view_model/risk_profile_view_model.dart'; import 'package:cims_apps/features/auth/registration/view/submission_data/risk_profile/risk_profile_view_model/risk_profile_view_model.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class ResultsView extends StatelessWidget { class ResultsView extends StatelessWidget {
final String totalScore; final String totalScore;
final RiskProfileResult typeResult; final RiskProfileResult typeResult;
const ResultsView({super.key, required this.typeResult, required this.totalScore}); const ResultsView(
{super.key, required this.typeResult, required this.totalScore});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -28,14 +26,11 @@ class ResultsView extends StatelessWidget {
children: [ children: [
BackButtonView(), BackButtonView(),
const Text('Risk Profile', textAlign: TextAlign.center), const Text('Risk Profile', textAlign: TextAlign.center),
SizedBox( SizedBox(width: SizeConfig.width * 0.1)
width: SizeConfig.width * 0.1
)
], ],
), ),
shape: const RoundedRectangleBorder( shape: const RoundedRectangleBorder(
side: BorderSide(color: ColorPalette.slate200) side: BorderSide(color: ColorPalette.slate200)),
),
), ),
body: SingleChildScrollView( body: SingleChildScrollView(
padding: EdgeInsets.all(24), padding: EdgeInsets.all(24),
@ -47,8 +42,9 @@ class ResultsView extends StatelessWidget {
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: typeResult.color, color: typeResult.color,
image: DecorationImage(image: AssetImage(typeResult.img), alignment: Alignment.centerRight) image: DecorationImage(
), image: AssetImage(typeResult.img),
alignment: Alignment.centerRight)),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
@ -62,23 +58,24 @@ class ResultsView extends StatelessWidget {
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 24, fontSize: 24,
color: ColorPalette.white color: ColorPalette.white),
), ),
SizedBox(
height: 16,
), ),
SizedBox(height: 16,), Text(
Text('Total Score :', 'Total Score :',
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 16, fontSize: 16,
color: ColorPalette.white color: ColorPalette.white),
), ),
), Text(
Text(totalScore, totalScore,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 28, fontSize: 28,
color: ColorPalette.white color: ColorPalette.white),
),
) )
], ],
), ),
@ -90,13 +87,8 @@ class ResultsView extends StatelessWidget {
SizedBox( SizedBox(
height: 24, height: 24,
), ),
Text( Text(typeResult.desc,
typeResult.desc, style: TextStyle(color: ColorPalette.slate500, fontSize: 16)),
style: TextStyle(
color: ColorPalette.slate500,
fontSize: 16
)
),
SizedBox( SizedBox(
height: 24, height: 24,
), ),
@ -105,8 +97,7 @@ class ResultsView extends StatelessWidget {
style: TextStyle( style: TextStyle(
color: ColorPalette.slate800, color: ColorPalette.slate800,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 16 fontSize: 16),
),
), ),
SizedBox( SizedBox(
height: 16, height: 16,
@ -127,20 +118,20 @@ class ResultsView extends StatelessWidget {
alignment: Alignment.center, alignment: Alignment.center,
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.circle, shape: BoxShape.circle,
color: typeResult.color.withOpacity(0.1) color: typeResult.color.withOpacity(0.1)),
), child: Image.asset(e['icon'],
child: Image.asset(e['icon'], width: SizeConfig.width * 0.07, color: typeResult.color) width: SizeConfig.width * 0.07,
), color: typeResult.color)),
SizedBox( SizedBox(
width: 12, width: 12,
), ),
Expanded( Expanded(
child: Text(e['desc'], child: Text(
e['desc'],
style: TextStyle( style: TextStyle(
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: ColorPalette.slate800 color: ColorPalette.slate800),
),
), ),
) )
], ],
@ -153,8 +144,7 @@ class ResultsView extends StatelessWidget {
), ),
ButtonView( ButtonView(
name: 'Re-test', name: 'Re-test',
onPressed: () { onPressed: () {},
},
marginVertical: 0, marginVertical: 0,
backgroundColor: ColorPalette.white, backgroundColor: ColorPalette.white,
textColor: ColorPalette.primary, textColor: ColorPalette.primary,
@ -171,6 +161,7 @@ class ResultsView extends StatelessWidget {
ButtonView( ButtonView(
name: 'Confirm', name: 'Confirm',
onPressed: () { onPressed: () {
//TODO route ke terms condition
routePush(context, page: DialogSuccess()); routePush(context, page: DialogSuccess());
}, },
marginVertical: 0, marginVertical: 0,

View File

@ -1,5 +1,4 @@
import 'package:cims_apps/application/assets/path_assets.dart'; import 'package:cims_apps/application/assets/path_assets.dart';
import 'package:cims_apps/application/component/button/back_button_view.dart';
import 'package:cims_apps/application/component/button/button_view.dart'; import 'package:cims_apps/application/component/button/button_view.dart';
import 'package:cims_apps/application/component/image/image_view.dart'; import 'package:cims_apps/application/component/image/image_view.dart';
import 'package:cims_apps/application/theme/color_palette.dart'; import 'package:cims_apps/application/theme/color_palette.dart';
@ -13,24 +12,7 @@ class RiskProfileView extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Container(
appBar: AppBar(
toolbarHeight: 70,
backgroundColor: Colors.white,
surfaceTintColor: Colors.white,
automaticallyImplyLeading: false,
title: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
BackButtonView(),
const Text('Risk Profile', textAlign: TextAlign.center),
SizedBox(width: SizeConfig.width * 0.1)
],
),
shape: const RoundedRectangleBorder(
side: BorderSide(color: ColorPalette.slate200)),
),
body: Container(
width: SizeConfig.width, width: SizeConfig.width,
height: SizeConfig.height, height: SizeConfig.height,
padding: EdgeInsets.all(24), padding: EdgeInsets.all(24),
@ -100,7 +82,6 @@ class RiskProfileView extends StatelessWidget {
) )
], ],
), ),
),
); );
} }
} }

View File

@ -60,9 +60,7 @@ class _SubmissionParentState extends State<SubmissionParent> {
case 8: case 8:
return const RiskProfileView(); return const RiskProfileView();
case 9: case 9:
return Container( return const Text("Step 9");
child: Text("Step 9"),
);
} }
} }
@ -142,7 +140,8 @@ class _SubmissionParentState extends State<SubmissionParent> {
), ),
), ),
provider.getCurrentStep == 3 || provider.getCurrentStep == 3 ||
provider.getCurrentStep == 4 provider.getCurrentStep == 4 ||
provider.getCurrentStep == 8
? const SizedBox() ? const SizedBox()
: Align( : Align(
alignment: Alignment.bottomCenter, alignment: Alignment.bottomCenter,

View File

@ -18,24 +18,14 @@ class InitialSignature extends StatelessWidget {
) )
], ],
builder: (context, child) { builder: (context, child) {
return Column( return const Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
const TextCaption(title: 'Draw your digital sign'), TextCaption(title: 'Draw your digital sign'),
const ImageView(image: PathAssets.frameSignature), ImageView(image: PathAssets.frameSignature),
const ListTileView( ListTileView(
title: title:
'Make sure the sign you draw is match with your ID Card'), 'Make sure the sign you draw is match with your ID Card'),
// Consumer<SubmissionDataViewModel>(
// builder: (context, provider, child) {
// return ButtonView(
// name: 'Next',
// onPressed: () {
// provider.nextSubmission(context);
// routePush(context, page: const SubmitSignature());
// },
// );
// }),
], ],
); );
}); });