Refactor tender detail models and UI components for improved clarity and functionality
- Updated the `Lot`, `Organization`, and `OrganizationAddress` models to enhance data mapping for tender details. - Revised the `TenderData` model to include additional fields reflecting the API response structure. - Improved UI components across desktop, mobile, and tablet views by commenting out unused sections for future use. - Added new string constants for lot details in the tender information section. - Enhanced unit tests to cover new model fields and ensure resilience to partial API payloads.
This commit is contained in:
@@ -8,13 +8,12 @@ import 'package:tm_app/data/services/model/organization/organization.dart';
|
||||
part 'tender_data.freezed.dart';
|
||||
part 'tender_data.g.dart';
|
||||
|
||||
// AI-NOTE (for PR reviewer): New fields were added to mirror the
|
||||
// /tenders/details/:id response so the tender-details page can show them:
|
||||
// notice_type_code, form_type, notice_language_code, issue_date, issue_time,
|
||||
// lots, official_languages. issue_date/issue_time reuse unixTimestampFromJson
|
||||
// (epoch seconds, tolerant of ms/string) like the other timestamp fields. All
|
||||
// fields are nullable to stay resilient to partial API payloads. Freezed/json
|
||||
// codegen (.freezed.dart/.g.dart) was regenerated for these.
|
||||
// Fields mirror the /tenders/details/:id response so the tender-details page
|
||||
// can show them: notice_type_code, form_type, notice_language_code, issue_date,
|
||||
// issue_time, lots, official_languages. issue_date/issue_time reuse
|
||||
// unixTimestampFromJson (epoch seconds, tolerant of ms/string) like the other
|
||||
// timestamp fields. All fields are nullable to stay resilient to partial API
|
||||
// payloads.
|
||||
@freezed
|
||||
abstract class TenderData with _$TenderData {
|
||||
const factory TenderData({
|
||||
|
||||
Reference in New Issue
Block a user