Skip to content

Commit

Permalink
Changed: ProjectManagerContext bridgehead of type Bridghead instead o…
Browse files Browse the repository at this point in the history
…f string
  • Loading branch information
djuarezgf committed Nov 12, 2024
1 parent 5da8141 commit b856414
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/components/BridgeheadOverview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export default class BridgeheadOverview extends Vue {
}
fetchContext(bridgehead: Bridgehead) {
return new ProjectManagerContext(this.context.projectCode, bridgehead.bridgehead);
return new ProjectManagerContext(this.context.projectCode, bridgehead);
}
async fetchExistsVotums(): Promise<boolean[]> {
Expand Down
2 changes: 1 addition & 1 deletion src/components/DocumentsTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export default class DocumentsTable extends Vue {
}
createContext(bridgehead: Bridgehead) {
return new ProjectManagerContext(this.context.projectCode, bridgehead.bridgehead);
return new ProjectManagerContext(this.context.projectCode, bridgehead);
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/ProjectView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<div class="card" v-if="visibleBridgeheads && visibleBridgeheads.length === 1" style="padding: 3px 20px;">
<div class="card-body" style="padding: 0px 0px;">
<span style="padding: 0px 0px;">{{ context.bridgehead }}</span>
<span style="padding: 0px 0px;">{{ context.bridgehead.humanReadable }}</span>
</div>
</div>
Expand Down Expand Up @@ -545,7 +545,7 @@ export default defineComponent({
watch: {
activeBridgehead(newValue, oldValue) {
this.activeBridgeheadIndex = this.visibleBridgeheads.findIndex(bridgehead => bridgehead === newValue);
this.context = new ProjectManagerContext(this.projectCode, newValue.bridgehead);
this.context = new ProjectManagerContext(this.projectCode, newValue);
},
context(newValue, oldValue) {
this.projectManagerBackendService = new ProjectManagerBackendService(newValue, Site.PROJECT_VIEW_SITE);
Expand Down
2 changes: 1 addition & 1 deletion src/components/UserInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export default class UserInput extends Vue {
}
createContext(bridgehead: Bridgehead | undefined) {
return (bridgehead) ? new ProjectManagerContext(this.context.projectCode, bridgehead.bridgehead) : this.context;
return (bridgehead) ? new ProjectManagerContext(this.context.projectCode, bridgehead) : this.context;
}
selectSuggestion(suggestion: User) {
Expand Down
6 changes: 3 additions & 3 deletions src/services/projectManagerBackendService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,9 @@ function jsonToActionMetadata(json: any): ActionMetadata | undefined {

export class ProjectManagerContext {
projectCode: string | undefined;
bridgehead: string | undefined;
bridgehead: Bridgehead | undefined;

constructor(projectCode: string | undefined, bridgehead: string | undefined) {
constructor(projectCode: string | undefined, bridgehead: Bridgehead | undefined) {
this.projectCode = projectCode;
this.bridgehead = bridgehead;
}
Expand Down Expand Up @@ -340,7 +340,7 @@ export class ProjectManagerBackendService {

public addContextToMap(map: Map<string, unknown>, context: ProjectManagerContext): void {
if (context.projectCode) map.set(projectCodeParam, context.projectCode);
if (context.bridgehead) map.set(bridgeheadParam, context.bridgehead);
if (context.bridgehead) map.set(bridgeheadParam, context.bridgehead.bridgehead);
}

public async downloadFile(
Expand Down

0 comments on commit b856414

Please sign in to comment.