@@ -57,21 +57,17 @@ public class UserService {
5757 private final transient UserRepository userRepository ;
5858 private final transient ProjectRepository projectRepository ;
5959
60- @ Autowired
61- private final transient QuestionnaireScheduleService scheduleService ;
6260
6361 private static final String FCM_TOKEN_PREFIX = "unregistered_" ;
6462
6563 @ Autowired
6664 public UserService (
6765 UserConverter userConverter ,
6866 UserRepository userRepository ,
69- ProjectRepository projectRepository ,
70- QuestionnaireScheduleService scheduleService ) {
67+ ProjectRepository projectRepository ) {
7168 this .userConverter = userConverter ;
7269 this .userRepository = userRepository ;
7370 this .projectRepository = projectRepository ;
74- this .scheduleService = scheduleService ;
7571 }
7672
7773 @ Transactional (readOnly = true )
@@ -165,8 +161,6 @@ public FcmUserDto saveUserInProject(FcmUserDto userDto) {
165161 // maintain a bi-directional relationship
166162 newUser .getUsermetrics ().setUser (newUser );
167163 User savedUser = this .userRepository .saveAndFlush (newUser );
168- // Generate schedule for user
169- this .scheduleService .generateScheduleForUser (savedUser );
170164 return userConverter .entityToDto (savedUser );
171165 }
172166
@@ -195,14 +189,6 @@ public FcmUserDto updateUser(FcmUserDto userDto) {
195189 // maintain a bi-directional relationship
196190 user .getUsermetrics ().setUser (user );
197191 User savedUser = this .userRepository .saveAndFlush (user );
198- // Generate schedule for user
199- if (!user .getAttributes ().equals (userDto .getAttributes ())
200- || !user .getTimezone ().equals (userDto .getTimezone ())
201- || !user .getEnrolmentDate ().equals (userDto .getEnrolmentDate ())
202- || !user .getLanguage ().equals (userDto .getLanguage ()))
203- {
204- this .scheduleService .generateScheduleForUser (savedUser );
205- }
206192 return userConverter .entityToDto (savedUser );
207193 }
208194
0 commit comments