merge branches

This commit is contained in:
amirrezaghabeli
2025-08-20 13:11:22 +03:30
parent 1af9c0a76b
commit 4b51071aad
36 changed files with 1894 additions and 167 deletions
+68 -8
View File
@@ -55,6 +55,10 @@ class TenderCard extends StatelessWidget {
_deadlineBadge(),
SizedBox(height: 12.0.h()),
// Approval status badge
// _approvalStatusBadge(),
SizedBox(height: 12.0.h()),
// Title
_tenderTitle(),
SizedBox(height: 8.0.h()),
@@ -148,6 +152,59 @@ class TenderCard extends StatelessWidget {
);
}
// Widget _approvalStatusBadge() {
// return Consumer<TendersViewModel>(
// builder: (context, viewModel, child) {
// final approvalStatus = viewModel.getApprovalStatusForTender(tender.id!);
// final statusText = approvalStatus ?? 'Pending';
// Color statusColor;
// switch (approvalStatus) {
// case 'approved':
// statusColor = AppColors.successColor;
// break;
// case 'rejected':
// statusColor = AppColors.errorColor;
// break;
// default:
// statusColor = AppColors.grey60;
// }
// return Container(
// width: double.infinity,
// height: 24.0.h(),
// padding: EdgeInsets.symmetric(horizontal: 8.0.w()),
// decoration: BoxDecoration(
// color: AppColors.grey20,
// borderRadius: BorderRadius.circular(4),
// border: Border.all(color: statusColor),
// ),
// child: Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [
// Text(
// 'Approval Status',
// style: TextStyle(
// color: AppColors.grey80,
// fontSize: 14.0.sp(),
// fontWeight: FontWeight.w500,
// ),
// ),
// Text(
// statusText.toUpperCase(),
// style: TextStyle(
// color: statusColor,
// fontSize: 14.0.sp(),
// fontWeight: FontWeight.w500,
// ),
// ),
// ],
// ),
// );
// },
// );
// }
Widget _tenderTitle() {
return Text(
tender.title ?? '',
@@ -244,14 +301,15 @@ class TenderCard extends StatelessWidget {
),
SizedBox(width: 8.0.w()),
// Country flag placeholder
SizedBox(
width: 32.0.w(),
height: 21.0.h(),
child: CountryFlag.fromCountryCode(
tender.countryCode!,
shape: RoundedRectangle(4),
if (tender.countryCode != null)
SizedBox(
width: 32.0.w(),
height: 21.0.h(),
child: CountryFlag.fromCountryCode(
tender.countryCode!,
shape: RoundedRectangle(4),
),
),
),
],
),
);
@@ -260,7 +318,9 @@ class TenderCard extends StatelessWidget {
Widget _seeMoreButton(BuildContext context) {
return InkWell(
onTap: () {
TenderDetailRouteData(tenderId: tender.id!).push(context);
if (tender.id != null) {
TenderDetailRouteData(tenderId: tender.id!).push(context);
}
},
child: Container(
width: 108.0.w(),