| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -5,10 +5,13 @@ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  <!-- CONTENT --> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  <section id="Content" class="p-6 pb-24 max-w-3xl mx-auto"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    <!-- Back --> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    <div class="text-lg text-center font-light relative px-7"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    <div | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      v-if="!hideBackButton" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      class="text-lg text-center font-light relative px-7" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    > | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      <h1 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        class="text-lg text-center px-2 py-1 absolute -left-2 -top-1" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        @click="cancel()" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        @click="cancelBack()" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      > | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        <fa icon="chevron-left" class="fa-fw"></fa> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      </h1> | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -31,7 +34,7 @@ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        class="rounded-l border border-r-0 border-slate-400 bg-slate-200 text-center text-blue-500 px-2 py-2 w-20" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        @click="changeUnitCode()" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      > | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        {{ libsUtil.UNIT_SHORT[unitCode] }} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        {{ libsUtil.UNIT_SHORT[unitCode] || unitCode }} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      </span> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      <div | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        class="border border-r-0 border-slate-400 bg-slate-200 px-4 py-2" | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -144,9 +147,11 @@ export default class GiftedDetails extends Vue { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  amountInput = "0"; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  description = ""; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  destinationNameAfter = ""; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  givenToUser = false; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  giverDid: string | undefined; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  giverName = ""; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  hideBackButton = false; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  imageUrl = ""; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  isTrade = false; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  message = ""; | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -161,24 +166,20 @@ export default class GiftedDetails extends Vue { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  libsUtil = libsUtil; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  async mounted() { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    this.amountInput = this.$route.query.amountInput as string; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    this.description = this.$route.query.description as string; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    this.amountInput = | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      (this.$route.query.amountInput as string) || this.amountInput; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    this.description = (this.$route.query.description as string) || ""; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    this.destinationNameAfter = this.$route.query | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      .destinationNameAfter as string; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    this.giverDid = this.$route.query.giverDid as string; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    this.giverName = this.$route.query.giverName as string; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    if (this.giverDid && !this.giverName) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.giverName = | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        this.giverDid === this.activeDid ? "you" : "someone not named"; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    this.message = this.$route.query.message as string; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    this.giverName = (this.$route.query.giverName as string) || ""; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    this.hideBackButton = this.$route.query.hideBackButton === "true"; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    this.message = (this.$route.query.message as string) || ""; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    this.offerId = this.$route.query.offerId as string; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    this.projectId = this.$route.query.projectId as string; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    this.recipientDid = this.$route.query.recipientDid as string; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    this.recipientName = this.$route.query.recipientName as string; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    if (this.recipientDid && !this.recipientName) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.recipientName = | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        this.recipientDid === this.activeDid ? "you" : "someone not named"; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    this.unitCode = this.$route.query.unitCode as string; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    this.recipientName = (this.$route.query.recipientName as string) || ""; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    this.unitCode = (this.$route.query.unitCode as string) || this.unitCode; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    this.imageUrl = | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      (this.$route.query.imageUrl as string) || | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -205,7 +206,15 @@ export default class GiftedDetails extends Vue { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.apiServer = settings?.apiServer || ""; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.activeDid = settings?.activeDid || ""; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      if (this.giverDid && !this.giverName) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        this.giverName = | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          this.giverDid === this.activeDid ? "you" : "someone not named"; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.givenToUser = this.recipientDid === this.activeDid; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      if (this.recipientDid && !this.recipientName) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        this.recipientName = | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          this.recipientDid === this.activeDid ? "you" : "someone not named"; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.showGivenToUser = | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        !this.projectId && this.recipientDid === this.activeDid; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -257,6 +266,15 @@ export default class GiftedDetails extends Vue { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  cancel() { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    this.deleteImage(); // not awaiting, so they'll go back immediately | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    if (this.destinationNameAfter) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.$router.push({ name: this.destinationNameAfter }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } else { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.$router.back(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  cancelBack() { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    this.deleteImage(); // not awaiting, so they'll go back immediately | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    this.$router.back(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  } | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -301,7 +319,7 @@ export default class GiftedDetails extends Vue { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        // don't bother with a notification | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        // (either they'll simply continue or they're canceling and going back) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } else { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        console.error("Non-success deleting image:", response); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        console.error("Problem deleting image:", response); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        this.$notify( | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            group: "alert", | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -452,7 +470,11 @@ export default class GiftedDetails extends Vue { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          5000, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        ); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        localStorage.removeItem("imageUrl"); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        this.$router.back(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (this.destinationNameAfter) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          this.$router.push({ name: this.destinationNameAfter }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } else { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          this.$router.back(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      // eslint-disable-next-line @typescript-eslint/no-explicit-any | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } catch (error: any) { | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |