implemented editing of 'show closed tasks' setting in project

This commit is contained in:
2025-07-22 20:33:28 +02:00
parent 1e439b87ac
commit b03b0683bc
7 changed files with 45 additions and 20 deletions

View File

@@ -13,7 +13,7 @@ import org.json.JSONObject;
public class Project implements Mappable {
private final Map<Long,Member> members;
private final boolean showClosed;
private boolean showClosed;
private final Long companyId;
private Status status;
private String name;
@@ -67,9 +67,10 @@ public class Project implements Mappable {
public Project patch(JSONObject json) {
for (var key : json.keySet()){
switch (key){
case DESCRIPTION: description = json.getString(key); break;
case NAME: name = json.getString(key); break;
case STATUS: status = json.get(key) instanceof Number number ? Status.of(number.intValue()) : Status.valueOf(json.getString(key)); break;
case DESCRIPTION: description = json.getString(key); break;
case NAME: name = json.getString(key); break;
case SHOW_CLOSED: showClosed = json.getBoolean(SHOW_CLOSED); break;
case STATUS: status = json.get(key) instanceof Number number ? Status.of(number.intValue()) : Status.valueOf(json.getString(key)); break;
default: key = null;
}
if (key != null) dirtyFields.add(key);