|  | @ -2,7 +2,7 @@ | 
			
		
	
		
		
			
				
					|  |  |   <section id="Content" class="p-6 pb-24"> |  |  |   <section id="Content" class="p-6 pb-24"> | 
			
		
	
		
		
			
				
					|  |  |     <!-- Heading --> |  |  |     <!-- Heading --> | 
			
		
	
		
		
			
				
					|  |  |     <h1 id="ViewHeading" class="text-4xl text-center font-light pt-4 mb-8"> |  |  |     <h1 id="ViewHeading" class="text-4xl text-center font-light pt-4 mb-8"> | 
			
		
	
		
		
			
				
					
					|  |  |       My Projects |  |  |       My Plans | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |     </h1> |  |  |     </h1> | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |     <!-- Quick Search --> |  |  |     <!-- Quick Search --> | 
			
		
	
	
		
		
			
				
					|  | @ -32,10 +32,10 @@ | 
			
		
	
		
		
			
				
					|  |  |       <li |  |  |       <li | 
			
		
	
		
		
			
				
					|  |  |         class="border-b border-slate-300" |  |  |         class="border-b border-slate-300" | 
			
		
	
		
		
			
				
					|  |  |         v-for="project in projects" |  |  |         v-for="project in projects" | 
			
		
	
		
		
			
				
					
					|  |  |         :key="project.id" |  |  |         :key="project.handleId" | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |       > |  |  |       > | 
			
		
	
		
		
			
				
					|  |  |         <a |  |  |         <a | 
			
		
	
		
		
			
				
					
					|  |  |           @click="onClickLoadProject(project.id)" |  |  |           @click="onClickLoadProject(project.handleId)" | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |           class="block py-4 flex gap-4" |  |  |           class="block py-4 flex gap-4" | 
			
		
	
		
		
			
				
					|  |  |         > |  |  |         > | 
			
		
	
		
		
			
				
					|  |  |           <div class="flex-none w-12"> |  |  |           <div class="flex-none w-12"> | 
			
		
	
	
		
		
			
				
					|  | @ -68,7 +68,7 @@ import { AppString } from "@/constants/app"; | 
			
		
	
		
		
			
				
					|  |  |   components: {}, |  |  |   components: {}, | 
			
		
	
		
		
			
				
					|  |  | }) |  |  | }) | 
			
		
	
		
		
			
				
					|  |  | export default class ProjectsView extends Vue { |  |  | export default class ProjectsView extends Vue { | 
			
		
	
		
		
			
				
					
					|  |  |   projects: { id: string; name: string; description: string }[] = []; |  |  |   projects: { handleId: string; name: string; description: string }[] = []; | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |   onClickLoadProject(id: string) { |  |  |   onClickLoadProject(id: string) { | 
			
		
	
		
		
			
				
					|  |  |     console.log("projectId", id); |  |  |     console.log("projectId", id); | 
			
		
	
	
		
		
			
				
					|  | @ -82,10 +82,7 @@ export default class ProjectsView extends Vue { | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |   async LoadProjects(identity: IIdentifier) { |  |  |   async LoadProjects(identity: IIdentifier) { | 
			
		
	
		
		
			
				
					|  |  |     const endorserApiServer = AppString.DEFAULT_ENDORSER_API_SERVER; |  |  |     const endorserApiServer = AppString.DEFAULT_ENDORSER_API_SERVER; | 
			
		
	
		
		
			
				
					
					|  |  |     const url = |  |  |     const url = endorserApiServer + "/api/v2/report/plansByIssuer"; | 
			
				
				
			
		
	
		
		
			
				
					|  |  |       endorserApiServer + |  |  |  | 
			
		
	
		
		
			
				
					|  |  |       "/api/claim/?claimType=PlanAction&issuer=" + |  |  |  | 
			
		
	
		
		
			
				
					|  |  |       identity.did; |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					|  |  |     const token = await accessToken(identity); |  |  |     const token = await accessToken(identity); | 
			
		
	
		
		
			
				
					|  |  |     const headers = { |  |  |     const headers = { | 
			
		
	
		
		
			
				
					|  |  |       "Content-Type": "application/json", |  |  |       "Content-Type": "application/json", | 
			
		
	
	
		
		
			
				
					|  | @ -95,15 +92,13 @@ export default class ProjectsView extends Vue { | 
			
		
	
		
		
			
				
					|  |  |     try { |  |  |     try { | 
			
		
	
		
		
			
				
					|  |  |       const resp = await this.axios.get(url, { headers }); |  |  |       const resp = await this.axios.get(url, { headers }); | 
			
		
	
		
		
			
				
					|  |  |       if (resp.status === 200) { |  |  |       if (resp.status === 200) { | 
			
		
	
		
		
			
				
					
					|  |  |         const claims = resp.data; |  |  |         const plans = resp.data.data; | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |         console.log("All claims:", claims); |  |  |         for (let i = 0; i < plans.length; i++) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |         for (let i = 0; i < claims.length; i++) { |  |  |           const plan = plans[i]; | 
			
				
				
			
		
	
		
		
			
				
					|  |  |           const claim = claims[i].claim; |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					|  |  |           const data = { |  |  |           const data = { | 
			
		
	
		
		
			
				
					
					|  |  |             id: claims[i].id, |  |  |             name: plan.name, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |             name: claim.name, |  |  |             description: plan.description, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |             description: claim.description, |  |  |             handleId: plan.fullIri, | 
			
				
				
			
		
	
		
		
			
				
					|  |  |             identifier: claim.identifier, |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					|  |  |           }; |  |  |           }; | 
			
		
	
		
		
			
				
					|  |  |           this.projects.push(data); |  |  |           this.projects.push(data); | 
			
		
	
		
		
			
				
					|  |  |         } |  |  |         } | 
			
		
	
	
		
		
			
				
					|  | 
 |