|
|
@ -171,6 +171,7 @@ export default class NewEditProjectView extends Vue { |
|
|
|
includeLocation = false; |
|
|
|
isHiddenSave = false; |
|
|
|
isHiddenSpinner = true; |
|
|
|
lastClaimJwtId = ""; |
|
|
|
latitude = 0; |
|
|
|
longitude = 0; |
|
|
|
numAccounts = 0; |
|
|
@ -224,12 +225,12 @@ export default class NewEditProjectView extends Vue { |
|
|
|
"An ID is chosen but there are no keys for it so it cannot be used to talk with the service. Switch your ID.", |
|
|
|
); |
|
|
|
} |
|
|
|
this.LoadProject(identity); |
|
|
|
this.loadProject(identity); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
async LoadProject(identity: IIdentifier) { |
|
|
|
async loadProject(identity: IIdentifier) { |
|
|
|
const url = |
|
|
|
this.apiServer + |
|
|
|
"/api/claim/byHandle/" + |
|
|
@ -245,6 +246,7 @@ export default class NewEditProjectView extends Vue { |
|
|
|
if (resp.status === 200) { |
|
|
|
this.projectIssuerDid = resp.data.issuer; |
|
|
|
this.fullClaim = resp.data.claim; |
|
|
|
this.lastClaimJwtId = resp.data.id; |
|
|
|
if (this.fullClaim?.location) { |
|
|
|
this.includeLocation = true; |
|
|
|
this.latitude = this.fullClaim.location.geo.latitude; |
|
|
@ -259,11 +261,11 @@ export default class NewEditProjectView extends Vue { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private async SaveProject(identity: IIdentifier) { |
|
|
|
private async saveProject(identity: IIdentifier) { |
|
|
|
// Make a claim |
|
|
|
const vcClaim: PlanVerifiableCredential = this.fullClaim; |
|
|
|
if (this.projectId) { |
|
|
|
vcClaim.identifier = this.projectId; |
|
|
|
vcClaim.lastClaimId = this.lastClaimJwtId; |
|
|
|
} |
|
|
|
if (this.agentDid) { |
|
|
|
vcClaim.agent = { |
|
|
@ -394,7 +396,7 @@ export default class NewEditProjectView extends Vue { |
|
|
|
console.error("Error: there is no account."); |
|
|
|
} else { |
|
|
|
const identity = await this.getIdentity(this.activeDid); |
|
|
|
this.SaveProject(identity); |
|
|
|
this.saveProject(identity); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|