To solve your problem, you can follow the approach below.
For example, you make changes through the web client. At this time, your mobile phone is disconnected. These changes are saved on the server. Now you have made changes to your mobile devices also offline. Here is the hard part to do. When your mobile phone goes online, first check if there are any changes made through the web client? if so, ask the user that "do you want to overwrite it with the latest changes?" like this kind of message or something else that you want to display in order to warn the user that the changes contradict each other.
If "Yes" is selected, go and add the changes made by your mobile phone.
Hope this helps you solve your problem.
source share