Skip to content

Commit

Permalink
Remove Custom Name on save
Browse files Browse the repository at this point in the history
  • Loading branch information
ingalls committed Oct 15, 2024
1 parent 4d4d2d2 commit 3966a80
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions api/web/src/components/CloudTAK/Menu/SettingsCallsign.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,11 @@ export default {
await this.fetchConfig();
await profileStore.load();
const profile = JSON.parse(JSON.stringify(profileStore.profile));
profile.tak_groups = this.config.groups[profile.tak_groups];
if (this.config.groups[profile.tak_group]) {
profile.tak_group = `${profile.tak_group} - ${this.config.groups[profile.tak_group]}`;
}
this.profile = profile;
this.loading = false;
},
Expand All @@ -104,7 +108,11 @@ export default {
};
},
updateProfile: async function() {
await profileStore.update(this.profile);
const profile = JSON.parse(JSON.stringify(this.profile));
profile.tak_group = profile.tak_group.replace(/\s-\s.*$/, '');
await profileStore.update(profile);
this.$router.push("/menu/settings");
}
}
Expand Down

0 comments on commit 3966a80

Please sign in to comment.