Skip to content

Commit b43c39c

Browse files
committed
Teams: Fixed: Local storage issues on Firefox
1 parent 7d3c793 commit b43c39c

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

src/app/model/meta-store.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,12 @@ export class MetaStore {
105105
}
106106

107107
public saveTeamsAndGroups() {
108-
let yamlStr: string = this.yamlService.stringify(this.teams);
108+
let yamlStr: string = this.yamlService.stringify({ teams: this.teams });
109109
localStorage.setItem(STORAGE_TEAMS_KEY, yamlStr);
110-
yamlStr = this.yamlService.stringify(this.teamGroups);
110+
console.log('Saved teams to localStorage: ' + yamlStr);
111+
yamlStr = this.yamlService.stringify({ teamGroups: this.teamGroups });
111112
localStorage.setItem(STORAGE_GROUPS_KEY, yamlStr);
113+
console.log('Saved team groups to localStorage: ' + yamlStr);
112114
this.hasLocalStorage = true;
113115
}
114116

@@ -122,13 +124,13 @@ export class MetaStore {
122124
let storedTeams: string | null = localStorage.getItem(STORAGE_TEAMS_KEY);
123125
let storedGroups: string | null = localStorage.getItem(STORAGE_GROUPS_KEY);
124126
try {
125-
let metaTeams: TeamNames | null = null;
126-
let metaGroups: TeamGroups | null = null;
127+
let metaTeams: { teams: TeamNames } | null = null;
128+
let metaGroups: { teamGroups: TeamGroups } | null = null;
127129

128130
if (storedTeams) metaTeams = this.yamlService.parse(storedTeams);
129131
if (storedGroups) metaGroups = this.yamlService.parse(storedGroups);
130132

131-
this.addMeta({ teams: metaTeams, teamGroups: metaGroups });
133+
this.addMeta({ teams: metaTeams?.teams, teamGroups: metaGroups?.teamGroups });
132134
this.hasLocalStorage = true;
133135
console.log('Loaded stored meta from localStorage');
134136
} catch (error) {

src/assets/Markdown Files/TODO-v4.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
- Heatmap: Outer rim: Make hover display Dimension (over subdimension)
4343
### Activity view
4444
- Activity: Input Teams' evidence
45+
- Activity: Dependency: Do not list activities beyond Max Level
4546
### Documentation
4647
- Doc: Update `Usage`
4748
- Doc: Update `README.md`

0 commit comments

Comments
 (0)