tablet navigation bar fixed
This commit is contained in:
@@ -57,7 +57,7 @@ class TenderDetailHeader extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
StatusTag(
|
||||
text: detail.status ?? '',
|
||||
text: detail.procurementTypeCode ?? '',
|
||||
textColor: AppColors.cyanTeal,
|
||||
backgroundColor: AppColors.cyanAqua,
|
||||
),
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:tm_app/core/constants/strings.dart';
|
||||
import 'package:tm_app/data/services/model/tender_data/tender_data.dart';
|
||||
import 'package:tm_app/views/detail/widgets/deadline_item.dart';
|
||||
@@ -19,13 +20,13 @@ class TenderDetailInfoSection extends StatelessWidget {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
InfoItem(title: AppStrings.tenderIdLabel, value: detail.id ?? ''),
|
||||
InfoItem(title: AppStrings.tenderIdLabel, value: detail.tenderId ?? ''),
|
||||
DeadlineItem(
|
||||
title: AppStrings.tenderDeadlineLabel,
|
||||
approvalText: AppStrings.tenderApprovalText,
|
||||
approvalDate: '',
|
||||
approvalDate: unixToDate(detail.submissionDeadline),
|
||||
submissionText: AppStrings.tenderSubmissionText,
|
||||
submissionDate: '',
|
||||
submissionDate: unixToDate(detail.applicationDeadline),
|
||||
isScreenBig: isScreenBig,
|
||||
),
|
||||
InfoItem(
|
||||
@@ -33,8 +34,12 @@ class TenderDetailInfoSection extends StatelessWidget {
|
||||
value: detail.buyerOrganization!.name ?? '',
|
||||
),
|
||||
InfoItem(
|
||||
title: AppStrings.tenderDeliveryLocationsLabel,
|
||||
value: detail.countryCode ?? '',
|
||||
title: AppStrings.estimatedValue,
|
||||
value: '${detail.estimatedValue} ${detail.currency ?? ''}',
|
||||
),
|
||||
InfoItem(
|
||||
title: AppStrings.duration,
|
||||
value: '${detail.duration} ${detail.durationUnit ?? ''}',
|
||||
),
|
||||
InfoItem(
|
||||
title: AppStrings.tenderReferenceNumberLabel,
|
||||
@@ -44,3 +49,16 @@ class TenderDetailInfoSection extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
String unixToDate(int? unixTimestamp, {String format = 'yyyy-MM-dd'}) {
|
||||
if (unixTimestamp == null) {
|
||||
return '';
|
||||
}
|
||||
|
||||
// Convert seconds to milliseconds if needed
|
||||
int timestampInMs =
|
||||
unixTimestamp > 1000000000000 ? unixTimestamp : unixTimestamp * 1000;
|
||||
|
||||
final DateTime dateTime = DateTime.fromMillisecondsSinceEpoch(timestampInMs);
|
||||
return DateFormat(format).format(dateTime);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user