fix web bug and navigations
This commit is contained in:
@@ -21,83 +21,7 @@ class TenderDetailActions extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return isScreenBig
|
||||
? Row(
|
||||
children: [
|
||||
Spacer(),
|
||||
Consumer<TenderDetailViewModel>(
|
||||
builder: (context, viewModel, child) {
|
||||
return viewModel.isRejectApprovalLoading
|
||||
? BaseButton(
|
||||
isEnabled: true,
|
||||
text: AppStrings.tenderRejectButton,
|
||||
textColor: AppColors.red10,
|
||||
backgroundColor: AppColors.backgroundColor,
|
||||
borderWidth: 1,
|
||||
onPressed: () {},
|
||||
width: 120.0.w(),
|
||||
)
|
||||
: BaseButton(
|
||||
isEnabled: true,
|
||||
text: AppStrings.tenderRejectButton,
|
||||
textColor: AppColors.red10,
|
||||
backgroundColor: AppColors.backgroundColor,
|
||||
borderWidth: 1,
|
||||
onPressed: () {
|
||||
viewModel.rejectTenderApproval(
|
||||
tenderId: detail.id!,
|
||||
submissionMode: 'self-apply',
|
||||
);
|
||||
},
|
||||
width: 120.0.w(),
|
||||
);
|
||||
},
|
||||
),
|
||||
SizedBox(width: 5.0.w()),
|
||||
Consumer<TenderDetailViewModel>(
|
||||
builder: (context, viewModel, child) {
|
||||
return viewModel.isSubmitApprovalLoading
|
||||
? BaseButton(
|
||||
isEnabled: true,
|
||||
text: AppStrings.tenderSubmitButton,
|
||||
backgroundColor: AppColors.lightBlue,
|
||||
textColor: AppColors.mainBlue,
|
||||
onPressed: () {},
|
||||
width: 120.0.w(),
|
||||
)
|
||||
: BaseButton(
|
||||
isEnabled: true,
|
||||
text: AppStrings.tenderSubmitButton,
|
||||
backgroundColor: AppColors.lightBlue,
|
||||
textColor: AppColors.mainBlue,
|
||||
onPressed: () {
|
||||
if (viewModel.status == 'submitted') {
|
||||
viewModel.submitTenderApproval(
|
||||
tenderId: detail.id!,
|
||||
submissionMode: 'self-apply',
|
||||
);
|
||||
} else {
|
||||
showModalBottomSheet(
|
||||
isDismissible: true,
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return SelectSubmissionBottomSheet(
|
||||
onConfirm: (value) {
|
||||
viewModel.submitTenderApproval(
|
||||
tenderId: detail.id!,
|
||||
submissionMode: value,
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
},
|
||||
width: 120.0.w(),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
)
|
||||
? _webActions()
|
||||
: Column(
|
||||
children: [
|
||||
Consumer<TenderDetailViewModel>(
|
||||
@@ -180,4 +104,84 @@ class TenderDetailActions extends StatelessWidget {
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Row _webActions() {
|
||||
return Row(
|
||||
children: [
|
||||
Spacer(),
|
||||
Consumer<TenderDetailViewModel>(
|
||||
builder: (context, viewModel, child) {
|
||||
return viewModel.isRejectApprovalLoading
|
||||
? BaseButton(
|
||||
isEnabled: true,
|
||||
text: AppStrings.tenderRejectButton,
|
||||
textColor: AppColors.red10,
|
||||
backgroundColor: AppColors.backgroundColor,
|
||||
borderWidth: 1,
|
||||
onPressed: () {},
|
||||
width: 120.0.w(),
|
||||
)
|
||||
: BaseButton(
|
||||
isEnabled: true,
|
||||
text: AppStrings.tenderRejectButton,
|
||||
textColor: AppColors.red10,
|
||||
backgroundColor: AppColors.backgroundColor,
|
||||
borderWidth: 1,
|
||||
onPressed: () {
|
||||
viewModel.rejectTenderApproval(
|
||||
tenderId: detail.id!,
|
||||
submissionMode: 'self-apply',
|
||||
);
|
||||
},
|
||||
width: 120.0.w(),
|
||||
);
|
||||
},
|
||||
),
|
||||
SizedBox(width: 5.0.w()),
|
||||
Consumer<TenderDetailViewModel>(
|
||||
builder: (context, viewModel, child) {
|
||||
return viewModel.isSubmitApprovalLoading
|
||||
? BaseButton(
|
||||
isEnabled: true,
|
||||
text: AppStrings.tenderSubmitButton,
|
||||
backgroundColor: AppColors.lightBlue,
|
||||
textColor: AppColors.mainBlue,
|
||||
onPressed: () {},
|
||||
width: 120.0.w(),
|
||||
)
|
||||
: BaseButton(
|
||||
isEnabled: true,
|
||||
text: AppStrings.tenderSubmitButton,
|
||||
backgroundColor: AppColors.lightBlue,
|
||||
textColor: AppColors.mainBlue,
|
||||
onPressed: () {
|
||||
if (viewModel.status == 'submitted') {
|
||||
viewModel.submitTenderApproval(
|
||||
tenderId: detail.id!,
|
||||
submissionMode: 'self-apply',
|
||||
);
|
||||
} else {
|
||||
showModalBottomSheet(
|
||||
isDismissible: true,
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return SelectSubmissionBottomSheet(
|
||||
onConfirm: (value) {
|
||||
viewModel.submitTenderApproval(
|
||||
tenderId: detail.id!,
|
||||
submissionMode: value,
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
},
|
||||
width: 120.0.w(),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user