From 2997eef5ad6d27d9a7d9870a593ba05e9070b0d5 Mon Sep 17 00:00:00 2001 From: Sikander Saleem Date: Wed, 11 Feb 2026 12:40:21 +0300 Subject: [PATCH] chat sync fixes. --- lib/modules/cx_module/chat/chat_provider.dart | 2 +- .../tm_module/device_transfer/device_transfer_details.dart | 6 +++--- lib/modules/tm_module/gas_refill/gas_refill_details.dart | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/modules/cx_module/chat/chat_provider.dart b/lib/modules/cx_module/chat/chat_provider.dart index 8d56bcf2..0755d74f 100644 --- a/lib/modules/cx_module/chat/chat_provider.dart +++ b/lib/modules/cx_module/chat/chat_provider.dart @@ -167,7 +167,7 @@ class ChatProvider with ChangeNotifier, DiagnosticableTreeMixin { if (!readOnly) { await buildHubConnection(chatParticipantModel!.id!.toString()); } - + userChatHistory = null; userChatHistory = await ChatApiClient().loadChatHistory(moduleId, requestId, myId, assigneeEmployeeNumber); chatResponseList = userChatHistory ?? []; chatResponseList.sort((a, b) => b.createdDate!.compareTo(a.createdDate!)); diff --git a/lib/modules/tm_module/device_transfer/device_transfer_details.dart b/lib/modules/tm_module/device_transfer/device_transfer_details.dart index 9ef3aac9..de9da297 100644 --- a/lib/modules/tm_module/device_transfer/device_transfer_details.dart +++ b/lib/modules/tm_module/device_transfer/device_transfer_details.dart @@ -226,9 +226,9 @@ class _DeviceTransferDetailsState extends State { isShow: context.settingProvider.isUserFlowMedical && _model!.senderMachineStatusValue! != 4, isReadOnly: _model!.senderMachineStatusValue! != 1, requestId: widget.model.id!.toInt(), - assigneeEmployeeNumber: _model!.senderAssignedEmployeeNumber, + assigneeEmployeeNumber: _model!.senderAssignedEmployeeId, myLoginUserID: context.userProvider.user!.employeeId ?? context.userProvider.user!.username!, - contactEmployeeINumber: _model!.assetTransferContactPersons!.first.employeeId ?? _model!.assetTransferContactPersons!.first.employeeNumber, + contactEmployeeINumber: _model!.assetTransferContactPersons!.first.employeeNumber ?? _model!.assetTransferContactPersons!.first.employeeNumber, ), if ((_userProvider!.user?.type == UsersTypes.engineer)) if (isCurrentEngineerEligibleForEdit && isCurrentRequestEditAble) @@ -289,7 +289,7 @@ class _DeviceTransferDetailsState extends State { requestId: widget.model.id!.toInt(), assigneeEmployeeNumber: isSender ? _deviceTransfer.senderAssignedEmployeeNumber! : _deviceTransfer.receiverAssignedEmployeeNumber!, myLoginUserID: context.userProvider.user!.employeeId ?? context.userProvider.user!.username!, - contactEmployeeINumber: _model!.assetTransferContactPersons!.first.employeeId ?? _deviceTransfer.assetTransferContactPersons!.first.employeeNumber, + contactEmployeeINumber: _model!.assetTransferContactPersons!.first.employeeNumber ?? _deviceTransfer.assetTransferContactPersons!.first.employeeNumber, ), if ((_userProvider!.user?.type == UsersTypes.engineer)) if (isCurrentEngineerEligibleForEdit && !isCurrentRequestClosed) diff --git a/lib/modules/tm_module/gas_refill/gas_refill_details.dart b/lib/modules/tm_module/gas_refill/gas_refill_details.dart index 91fac826..e5dec643 100644 --- a/lib/modules/tm_module/gas_refill/gas_refill_details.dart +++ b/lib/modules/tm_module/gas_refill/gas_refill_details.dart @@ -73,7 +73,7 @@ class _GasRefillDetailsPageState extends State { requestId: widget.model.id!.toInt(), assigneeEmployeeNumber: _gasRefillModel.assignedEmployee?.employeeId!, myLoginUserID: context.userProvider.user!.employeeId ?? context.userProvider.user!.username!, - contactEmployeeINumber: _gasRefillModel.gasRefillContactPerson!.first.employeeId ?? _gasRefillModel.gasRefillContactPerson!.first.employeeCode!, + contactEmployeeINumber: _gasRefillModel.gasRefillContactPerson!.first.employeeCode!, ); }) ],