forked from jsnbuchanan/crowd-funder-for-time-pwa
Fix: stepType was being set to an object
This commit is contained in:
@@ -144,11 +144,14 @@ export default class EntitySelectionStep extends Vue {
|
||||
get stepLabel(): string {
|
||||
if (this.stepType === "recipient") {
|
||||
return "Choose who received the gift:";
|
||||
} else if (this.showProjects) {
|
||||
return "Choose a project benefitted from:";
|
||||
} else {
|
||||
return "Choose a person received from:";
|
||||
} else if (this.stepType === "giver") {
|
||||
if (this.shouldShowProjects) {
|
||||
return "Choose a project benefitted from:";
|
||||
} else {
|
||||
return "Choose a person received from:";
|
||||
}
|
||||
}
|
||||
return "Choose entity:";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -166,10 +169,13 @@ export default class EntitySelectionStep extends Vue {
|
||||
* Whether to show projects in the grid
|
||||
*/
|
||||
get shouldShowProjects(): boolean {
|
||||
return (
|
||||
(this.stepType === "giver" && this.giverEntityType === "project") ||
|
||||
(this.stepType === "recipient" && this.recipientEntityType === "project")
|
||||
);
|
||||
// When editing an entity, show the appropriate entity type for that entity
|
||||
if (this.stepType === "giver") {
|
||||
return this.giverEntityType === "project";
|
||||
} else if (this.stepType === "recipient") {
|
||||
return this.recipientEntityType === "project";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user