Browse Source

on "give details" page, distinguish between project & user destination

pull/105/head
Trent Larson 8 months ago
parent
commit
67f34f9826
  1. 14
      src/views/GiftedDetails.vue

14
src/views/GiftedDetails.vue

@ -51,6 +51,10 @@
</div> </div>
</div> </div>
<div v-if="projectId" class="flex justify-center mt-2">
<label class="text-sm">This is given to a project</label>
</div>
<div class="flex justify-center mb-4 mt-4"> <div class="flex justify-center mb-4 mt-4">
<span v-if="imageUrl"> <span v-if="imageUrl">
Includes Image: Includes Image:
@ -70,14 +74,17 @@
</router-link> </router-link>
</span> </span>
</div> </div>
<div class="mt-4">
<div v-if="!projectId" class="mt-4">
<input type="checkbox" class="h-6 w-6 mr-2" v-model="givenToUser" /> <input type="checkbox" class="h-6 w-6 mr-2" v-model="givenToUser" />
<label class="text-sm">Given to you</label> <label class="text-sm">Given to you</label>
</div> </div>
<div class="mt-4"> <div class="mt-4">
<input type="checkbox" class="h-6 w-6 mr-2" v-model="isTrade" /> <input type="checkbox" class="h-6 w-6 mr-2" v-model="isTrade" />
<label class="text-sm">Trade (not a gift)</label> <label class="text-sm">Trade (not a gift)</label>
</div> </div>
<p class="text-center mb-2 mt-6 italic"> <p class="text-center mb-2 mt-6 italic">
Sign & Send to publish to the world Sign & Send to publish to the world
</p> </p>
@ -139,12 +146,15 @@ export default class GiftedDetails extends Vue {
this.description = this.$route.query.description as string; this.description = this.$route.query.description as string;
this.giverDid = this.$route.query.giverDid as string; this.giverDid = this.$route.query.giverDid as string;
this.giverName = this.$route.query.giverName as string; this.giverName = this.$route.query.giverName as string;
this.imageUrl = localStorage.getItem("imageUrl") || "";
this.message = this.$route.query.message as string; this.message = this.$route.query.message as string;
this.offerId = this.$route.query.offerId as string; this.offerId = this.$route.query.offerId as string;
this.projectId = this.$route.query.projectId as string; this.projectId = this.$route.query.projectId as string;
this.unitCode = this.$route.query.unitCode as string; this.unitCode = this.$route.query.unitCode as string;
this.imageUrl = localStorage.getItem("imageUrl") || "";
this.givenToUser = !this.projectId;
try { try {
await db.open(); await db.open();
const settings = (await db.settings.get(MASTER_SETTINGS_KEY)) as Settings; const settings = (await db.settings.get(MASTER_SETTINGS_KEY)) as Settings;

Loading…
Cancel
Save