check web and tablet for logic

This commit is contained in:
amirrezaghabeli
2025-08-23 15:22:28 +03:30
parent b00ba07122
commit 14ab9a75ca
27 changed files with 569 additions and 282 deletions
@@ -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(),
);
},
),
],
)