check web and tablet for logic
This commit is contained in:
@@ -24,23 +24,77 @@ class TenderDetailActions extends StatelessWidget {
|
||||
? Row(
|
||||
children: [
|
||||
Spacer(),
|
||||
BaseButton(
|
||||
isEnabled: true,
|
||||
text: AppStrings.tenderRejectButton,
|
||||
textColor: AppColors.red10,
|
||||
backgroundColor: AppColors.backgroundColor,
|
||||
borderWidth: 1,
|
||||
onPressed: () {},
|
||||
width: 120.0.w(),
|
||||
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()),
|
||||
BaseButton(
|
||||
isEnabled: true,
|
||||
text: AppStrings.tenderSubmitButton,
|
||||
backgroundColor: AppColors.lightBlue,
|
||||
textColor: AppColors.mainBlue,
|
||||
onPressed: () {},
|
||||
width: 120.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 == 'approved') {
|
||||
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