|
|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
import 'package:test_sa/controllers/api_routes/urls.dart';
|
|
|
|
|
import 'package:test_sa/extensions/context_extension.dart';
|
|
|
|
|
import 'package:test_sa/extensions/int_extensions.dart';
|
|
|
|
|
import 'package:test_sa/extensions/string_extensions.dart';
|
|
|
|
|
@ -9,6 +10,7 @@ import 'package:test_sa/models/new_models/work_order_detail_model.dart';
|
|
|
|
|
import 'package:test_sa/new_views/app_style/app_color.dart';
|
|
|
|
|
import 'package:test_sa/service_request_latest/service_request_detail_provider.dart';
|
|
|
|
|
import 'package:test_sa/service_request_latest/utilities/service_request_utils.dart';
|
|
|
|
|
import 'package:test_sa/views/widgets/buttons/app_back_button.dart';
|
|
|
|
|
import 'package:test_sa/views/widgets/loaders/no_data_found.dart';
|
|
|
|
|
import 'package:test_sa/views/widgets/requests/request_status.dart';
|
|
|
|
|
|
|
|
|
|
@ -73,8 +75,6 @@ class HistoryLogView extends StatelessWidget {
|
|
|
|
|
child: Column(children: items),
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
],
|
|
|
|
|
));
|
|
|
|
|
});
|
|
|
|
|
@ -98,8 +98,31 @@ class HistoryLogView extends StatelessWidget {
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
if (object.assetVerificationType?.value == 4 && object.photoVerfication != null) ...[
|
|
|
|
|
Padding(
|
|
|
|
|
padding: EdgeInsets.symmetric(vertical: 12.toScreenWidth),
|
|
|
|
|
|
|
|
|
|
child: InteractiveViewer(child: Image.network(URLs.getFileUrl(object.photoVerfication ?? '')!, height: 143.toScreenHeight)),
|
|
|
|
|
).onPress(() async {
|
|
|
|
|
Navigator.of(context).push(
|
|
|
|
|
MaterialPageRoute(
|
|
|
|
|
builder: (_) => Scaffold(
|
|
|
|
|
body: SafeArea(
|
|
|
|
|
child: Stack(
|
|
|
|
|
children: [
|
|
|
|
|
InteractiveViewer(child: Image.network(URLs.getFileUrl(object.photoVerfication ?? '')!)).center,
|
|
|
|
|
const ABackButton(),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
],
|
|
|
|
|
object.step!.name!.bodyText(context).custom(color: AppColor.black10),
|
|
|
|
|
object.timeDifference.isNotEmpty ? object.timeDifference.tinyFont(context).custom(color: context.isDark ? AppColor.neutral30 : AppColor.neutral120) : const SizedBox(),
|
|
|
|
|
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
@ -123,7 +146,7 @@ class HistoryLogView extends StatelessWidget {
|
|
|
|
|
String statusText(String status) {
|
|
|
|
|
if (status == "new" || status == "open") {
|
|
|
|
|
return "Open Request".addTranslation;
|
|
|
|
|
} else if (status == "in progress") {
|
|
|
|
|
} else if (status == "in progress") {
|
|
|
|
|
return "Status update to In Progress".addTranslation;
|
|
|
|
|
} else if (status == "closed") {
|
|
|
|
|
return "Status update to Closed".addTranslation;
|
|
|
|
|
|