Merge branch 'design_3.0_ppm_new_flow' into design_3.0_transfer_request_new_flow

design_3.0_task_module_new
WaseemAbbasi22 9 months ago
commit 48591de22a

@ -54,9 +54,7 @@ class _SingleItemDropDownMenuState<T extends Base, X extends LoadingListNotifier
provider = Provider.of<X>(widget.context); provider = Provider.of<X>(widget.context);
} }
if (widget.initialValue != null) { if (widget.initialValue != null) {
print("$provider:start1:${DateTime.now()}");
final result = (X == NullableLoadingProvider ? widget.staticData : provider?.items)?.where((element) => element.identifier == widget.initialValue?.identifier); final result = (X == NullableLoadingProvider ? widget.staticData : provider?.items)?.where((element) => element.identifier == widget.initialValue?.identifier);
print("$provider:start2:${DateTime.now()}");
if (result?.isNotEmpty ?? false) _selectedItem = result!.first as T?; if (result?.isNotEmpty ?? false) _selectedItem = result!.first as T?;
if (widget.onSelect != null && (widget.initialValue?.identifier ?? "") != (_selectedItem?.identifier ?? "")) { if (widget.onSelect != null && (widget.initialValue?.identifier ?? "") != (_selectedItem?.identifier ?? "")) {
widget.onSelect!(_selectedItem); // Non-null assertion after null check widget.onSelect!(_selectedItem); // Non-null assertion after null check

@ -71,6 +71,7 @@ class _UpdatePpmState extends State<UpdatePpm> with TickerProviderStateMixin {
AllRequestsProvider allRequestsProvider = Provider.of<AllRequestsProvider>(context, listen: false); AllRequestsProvider allRequestsProvider = Provider.of<AllRequestsProvider>(context, listen: false);
allRequestsProvider.reset(); allRequestsProvider.reset();
allRequestsProvider.getAllRequests(context, typeTransaction: 4); allRequestsProvider.getAllRequests(context, typeTransaction: 4);
ppmProvider.ppmPlanAttachments = [];
} }
// allRequestsProvider.recurrentWoData?.recurrentWoTimerModel=null; // allRequestsProvider.recurrentWoData?.recurrentWoTimerModel=null;
Navigator.pop(context); Navigator.pop(context);

@ -174,7 +174,7 @@ class _WoInfoFormState extends State<WoInfoForm> {
selectedTime.minute, selectedTime.minute,
); );
setState(() { setState(() {
widget.planPreventiveVisit.acutalDateOfVisit = selectedDate; widget.planPreventiveVisit.acutalDateOfVisit = selectedDateTime;
}); });
} }
}); });
@ -244,9 +244,7 @@ class _WoInfoFormState extends State<WoInfoForm> {
}, },
), ),
8.height, 8.height,
_timerWidget(context, totalWorkingHours), _timerWidget(context, totalWorkingHours),
8.height, 8.height,
AppTextFormField( AppTextFormField(
labelText: context.translation.callComments, labelText: context.translation.callComments,
@ -259,7 +257,7 @@ class _WoInfoFormState extends State<WoInfoForm> {
widget.planPreventiveVisit.comments = value; widget.planPreventiveVisit.comments = value;
}, },
), ),
8.height, 16.height,
MultiFilesPicker( MultiFilesPicker(
label: context.translation.attachments, label: context.translation.attachments,
files: ppmProvider.ppmPlanAttachments, files: ppmProvider.ppmPlanAttachments,
@ -323,7 +321,7 @@ class _WoInfoFormState extends State<WoInfoForm> {
], ],
), ),
], ],
8.height, // 8.height,
], ],
); );
} }

@ -35,7 +35,7 @@ class MultiFilesPickerItem extends StatelessWidget {
Container( Container(
margin: EdgeInsetsDirectional.only(top: 4.toScreenHeight, end: 6.toScreenWidth), margin: EdgeInsetsDirectional.only(top: 4.toScreenHeight, end: 6.toScreenWidth),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.red, color: AppColor.neutral90,
border: Border.all(width: 1, color: context.isDark ? AppColor.neutral30 : AppColor.neutral30), border: Border.all(width: 1, color: context.isDark ? AppColor.neutral30 : AppColor.neutral30),
image: DecorationImage( image: DecorationImage(
image: getImage(isImage, isPdf, isExcel, file), image: getImage(isImage, isPdf, isExcel, file),

Loading…
Cancel
Save