Projekt

Obecné

Profil

« Předchozí | Další » 

Revize b9c4aa8a

Přidáno uživatelem Lukas Cerny před téměř 6 roky(ů)

Fixed endpoint for user's notification

Zobrazit rozdíly:

server/src/main/java/cz/zcu/yamanager/business/mock/ManagerMock.java
212 212

  
213 213
    @Override
214 214
    public void changeSettings(Long userId, UserSettings settings) {
215
        userSettings.put(userId, settings);
215

  
216
        if (userSettings.containsKey(userId)) {
217
            if (settings.getId().equals(userId)) {
218
                userSettings.get(userId).setNotification(settings.getNotification());
219
            }
220
        } else {
221
            userSettings.put(userId, settings);
222
        }
216 223
    }
217 224

  
218 225
    @Override
server/src/main/java/cz/zcu/yamanager/dto/UserSettings.java
1 1
package cz.zcu.yamanager.dto;
2 2

  
3
import java.time.LocalDateTime;
4

  
3 5
public class UserSettings {
4 6

  
5 7
    private Long id;
6 8
    private Float vacationCount;
7 9
    private Integer sickdayCount;
8 10
    private UserRole role;
11
    private LocalDateTime notification;
9 12

  
10 13
    public Long getId() {
11 14
        return id;
......
38 41
    public void setRole(UserRole role) {
39 42
        this.role = role;
40 43
    }
44

  
45
    public LocalDateTime getNotification() {
46
        return notification;
47
    }
48

  
49
    public void setNotification(LocalDateTime notification) {
50
        this.notification = notification;
51
    }
41 52
}

Také k dispozici: Unified diff