Merge pull request 'added company profile and fixed some parts' (#58) from feat-company_profile into main
Reviewed-on: https://repo.ravanertebat.com/TM/tm_app/pulls/58
This commit is contained in:
@@ -75,23 +75,24 @@ class _MobileProfilePageState extends State<MobileProfilePage> {
|
||||
SizedBox(height: 36.0.h()),
|
||||
TitleDescription(
|
||||
title: 'Company Name',
|
||||
description: 'Telecom Solutions GmbH',
|
||||
description: viewModel.companyProfileData!.name!,
|
||||
),
|
||||
TitleDescription(
|
||||
title: 'National ID',
|
||||
description: '12345678901',
|
||||
description: viewModel.companyProfileData!.id!,
|
||||
),
|
||||
TitleDescription(
|
||||
title: 'Registration No.',
|
||||
description: 'DE-55667788',
|
||||
description:
|
||||
viewModel.companyProfileData!.registrationNumber!,
|
||||
),
|
||||
TitleDescription(title: 'Business Type', description: '-'),
|
||||
TitleDescription(
|
||||
title: 'Business Type',
|
||||
description: 'Telecommunications',
|
||||
title: 'Founded',
|
||||
description:
|
||||
viewModel.companyProfileData!.foundedYear!.toString(),
|
||||
),
|
||||
TitleDescription(title: 'Founded', description: '2010'),
|
||||
SizedBox(height: 32.0.h()),
|
||||
|
||||
Align(
|
||||
alignment: AlignmentDirectional.centerStart,
|
||||
child: Text(
|
||||
|
||||
@@ -11,51 +11,54 @@ class ApprovedTenders extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ListView.builder(
|
||||
padding: const EdgeInsets.only(top: 20),
|
||||
itemCount: approvedTenders.data!.length,
|
||||
itemBuilder: (context, index) {
|
||||
final tender = approvedTenders.data![index];
|
||||
return TenderCard(
|
||||
date: tender.createdAt!.toString(),
|
||||
title: tender.tender!.title!,
|
||||
description: tender.tender!.description!,
|
||||
location: tender.tender!.countryCode!,
|
||||
countryFlag: AssetsManager.seFlag,
|
||||
status: tender.status,
|
||||
projectStatus: tender.tender!.status!,
|
||||
backgroundColor:
|
||||
tender.status == 'Won'
|
||||
? AppColors.green0
|
||||
: tender.status == 'approved'
|
||||
? AppColors.grey0
|
||||
: AppColors.red0.withValues(alpha: 0.2),
|
||||
borderColor:
|
||||
tender.status == 'Won'
|
||||
? AppColors.green10
|
||||
: tender.status == 'approved'
|
||||
? AppColors.grey30
|
||||
: AppColors.red0,
|
||||
statusIcon:
|
||||
tender.status == 'Won'
|
||||
? AssetsManager.tickCircle
|
||||
: tender.status == 'approved'
|
||||
? null
|
||||
: AssetsManager.closeCircle,
|
||||
statusCardColor:
|
||||
tender.status == 'Won'
|
||||
? AppColors.green20
|
||||
: tender.status == 'approved'
|
||||
? AppColors.green20
|
||||
: AppColors.red0,
|
||||
statusTextColor:
|
||||
tender.status == 'Won'
|
||||
? AppColors.green30
|
||||
: tender.status == 'approved'
|
||||
? AppColors.green30
|
||||
: AppColors.red10,
|
||||
return approvedTenders.data == null
|
||||
? const Center(child: Text('No data available'))
|
||||
: ListView.builder(
|
||||
padding: const EdgeInsets.only(top: 20),
|
||||
itemCount: approvedTenders.data!.length,
|
||||
itemBuilder: (context, index) {
|
||||
final tender = approvedTenders.data![index];
|
||||
return TenderCard(
|
||||
date: tender.createdAt!.toString(),
|
||||
title: tender.tender!.title!,
|
||||
description: tender.tender!.description!,
|
||||
location: tender.tender!.countryCode!,
|
||||
countryFlag: AssetsManager.seFlag,
|
||||
status: tender.status,
|
||||
countryCode: tender.tender!.countryCode!,
|
||||
projectStatus: tender.tender!.status!,
|
||||
backgroundColor:
|
||||
tender.status == 'Won'
|
||||
? AppColors.green0
|
||||
: tender.status == 'approved'
|
||||
? AppColors.grey0
|
||||
: AppColors.red0.withValues(alpha: 0.2),
|
||||
borderColor:
|
||||
tender.status == 'Won'
|
||||
? AppColors.green10
|
||||
: tender.status == 'approved'
|
||||
? AppColors.grey30
|
||||
: AppColors.red0,
|
||||
statusIcon:
|
||||
tender.status == 'Won'
|
||||
? AssetsManager.tickCircle
|
||||
: tender.status == 'approved'
|
||||
? null
|
||||
: AssetsManager.closeCircle,
|
||||
statusCardColor:
|
||||
tender.status == 'Won'
|
||||
? AppColors.green20
|
||||
: tender.status == 'approved'
|
||||
? AppColors.green20
|
||||
: AppColors.red0,
|
||||
statusTextColor:
|
||||
tender.status == 'Won'
|
||||
? AppColors.green30
|
||||
: tender.status == 'approved'
|
||||
? AppColors.green30
|
||||
: AppColors.red10,
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import 'package:country_flags/country_flags.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
|
||||
@@ -18,12 +19,14 @@ class TenderCard extends StatelessWidget {
|
||||
final String? statusIcon;
|
||||
final Color? statusCardColor;
|
||||
final Color? statusTextColor;
|
||||
final String countryCode;
|
||||
|
||||
const TenderCard({
|
||||
required this.date,
|
||||
required this.title,
|
||||
required this.description,
|
||||
required this.location,
|
||||
required this.countryCode,
|
||||
this.countryFlag = 'assets/icons/SE.png',
|
||||
this.status = 'Completed',
|
||||
this.projectStatus = 'Self Control',
|
||||
@@ -155,10 +158,13 @@ class TenderCard extends StatelessWidget {
|
||||
),
|
||||
SizedBox(width: 8.0.w()),
|
||||
// Country flag
|
||||
Image.asset(
|
||||
countryFlag,
|
||||
SizedBox(
|
||||
width: 32.0.w(),
|
||||
height: 21.0.h(),
|
||||
child: CountryFlag.fromCountryCode(
|
||||
countryCode,
|
||||
shape: RoundedRectangle(4),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -23,6 +23,7 @@ class TendersSubmitted extends StatelessWidget {
|
||||
location: tender.location,
|
||||
countryFlag: tender.countryFlag,
|
||||
status: tender.status,
|
||||
countryCode: '',
|
||||
projectStatus: tender.projectStatus,
|
||||
backgroundColor:
|
||||
tender.status == 'Won'
|
||||
|
||||
Reference in New Issue
Block a user