remove the last of the localStorage for passing parameters

This commit is contained in:
2024-08-30 21:55:08 -06:00
parent b15476e379
commit 0947c55110
6 changed files with 14 additions and 38 deletions

View File

@@ -192,7 +192,6 @@ import {
getHeaders,
PlanVerifiableCredential,
} from "@/libs/endorserServer";
import { useAppStore } from "@/store/app";
@Component({
components: { ImageMethodDialog, LMap, LMarker, LTileLayer, QuickNav },
@@ -224,7 +223,7 @@ export default class NewEditProjectView extends Vue {
latitude = 0;
longitude = 0;
numAccounts = 0;
projectId = localStorage.getItem("projectId") || "";
projectId = "";
projectIssuerDid = "";
startDateInput?: string;
startTimeInput?: string;
@@ -240,6 +239,8 @@ export default class NewEditProjectView extends Vue {
this.activeDid = (settings?.activeDid as string) || "";
this.apiServer = (settings?.apiServer as string) || "";
this.projectId = (this.$route as Router).query["projectId"] || "";
if (this.projectId) {
if (this.numAccounts === 0) {
this.errNote("There was a problem loading your account info.");
@@ -421,11 +422,8 @@ export default class NewEditProjectView extends Vue {
if (resp.data?.success?.handleId) {
this.errorMessage = "";
useAppStore()
.setProjectId(resp.data.success.handleId)
.then(() => {
(this.$router as Router).push({ name: "project" });
});
const projectPath = encodeURIComponent(resp.data.success.handleId);
(this.$router as Router).push({ path: "/project/" + projectPath });
} else {
console.error(
"Got unexpected 'data' inside response from server",