|
|
|
@ -1,4 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
import 'package:test_sa/controllers/api_routes/urls.dart';
|
|
|
|
import 'package:test_sa/controllers/api_routes/urls.dart';
|
|
|
|
@ -77,8 +76,7 @@ class _PmActivitiesListViewState extends State<PmActivitiesListView> {
|
|
|
|
return sparePartActivityCard(pmProvider: pmProvider, userProvider: userProvider, context: context, activity: activities[index]);
|
|
|
|
return sparePartActivityCard(pmProvider: pmProvider, userProvider: userProvider, context: context, activity: activities[index]);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
).expanded,
|
|
|
|
).expanded,
|
|
|
|
if (userProvider.user!.type == UsersTypes.engineer &&
|
|
|
|
if (userProvider.user!.type == UsersTypes.engineer && (pmProvider.planPreventiveVisit?.visitStatus?.value != 5 && pmProvider.planPreventiveVisit?.visitStatus?.value != 3))
|
|
|
|
(pmProvider.planPreventiveVisit?.visitStatus?.value != 5 && pmProvider.planPreventiveVisit?.visitStatus?.value != 3))
|
|
|
|
|
|
|
|
FooterActionButton.footerContainer(
|
|
|
|
FooterActionButton.footerContainer(
|
|
|
|
context: context,
|
|
|
|
context: context,
|
|
|
|
child: AppFilledButton(
|
|
|
|
child: AppFilledButton(
|
|
|
|
@ -165,13 +163,28 @@ class _PmActivitiesListViewState extends State<PmActivitiesListView> {
|
|
|
|
label: context.translation.oracleCode,
|
|
|
|
label: context.translation.oracleCode,
|
|
|
|
value: activity.partCatalogItem?.oracleCode,
|
|
|
|
value: activity.partCatalogItem?.oracleCode,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
if (activity.quantity != null && activity.quantity! > 0)
|
|
|
|
|
|
|
|
InfoTextWidget(
|
|
|
|
|
|
|
|
label: context.translation.quantity,
|
|
|
|
|
|
|
|
value: activity.quantity.toString(),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
if (activity.installQty != null && activity.installQty! > 0)
|
|
|
|
|
|
|
|
InfoTextWidget(
|
|
|
|
|
|
|
|
label: context.translation.installedQty,
|
|
|
|
|
|
|
|
value: activity.installQty.toString(),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
if (activity.returnQty != null && activity.returnQty! > 0)
|
|
|
|
|
|
|
|
InfoTextWidget(
|
|
|
|
|
|
|
|
label: context.translation.returnQty,
|
|
|
|
|
|
|
|
value: activity.returnQty.toString(),
|
|
|
|
|
|
|
|
),
|
|
|
|
if (activity.comment?.isNotEmpty ?? false) ...[
|
|
|
|
if (activity.comment?.isNotEmpty ?? false) ...[
|
|
|
|
const Divider().defaultStyle(context),
|
|
|
|
const Divider().defaultStyle(context),
|
|
|
|
InfoTextLabelWidget(label: activity.comment ?? ""),
|
|
|
|
InfoTextLabelWidget(label: activity.comment ?? ""),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
if (activity.activitySparePartPPMAttachments.isNotEmpty) ...[
|
|
|
|
if (activity.activitySparePartPPMAttachments.isNotEmpty) ...[
|
|
|
|
const Divider().defaultStyle(context),
|
|
|
|
const Divider().defaultStyle(context),
|
|
|
|
FilesList(images: activity.activitySparePartPPMAttachments.map((toElement) => URLs.getFileUrl(toElement.name??'')??'').toList()),
|
|
|
|
FilesList(images: activity.activitySparePartPPMAttachments.map((toElement) => URLs.getFileUrl(toElement.name ?? '') ?? '').toList()),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
],
|
|
|
|
],
|
|
|
|
).toShadowContainer(context, showShadow: false).onPress(() {
|
|
|
|
).toShadowContainer(context, showShadow: false).onPress(() {
|
|
|
|
|