forked from jsnbuchanan/crowd-funder-for-time-pwa
Feature: Project Gifting
- Gifting dialog: added ability to pick a project to benefit from - Project view: modified dialog calls in Project view to toggle between giving to and benefiting from a project - Project view: removed redundant person selection - Project view: benefiting from a project locks the project selection in dialog to enforce context.
This commit is contained in:
@@ -132,7 +132,7 @@ Raymer * @version 1.0.0 */
|
||||
<div class="grid grid-cols-2 gap-2">
|
||||
<button
|
||||
type="button"
|
||||
@click="openDialog()"
|
||||
@click="openDialogPerson()"
|
||||
class="text-center text-base uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-3 py-2 rounded-lg"
|
||||
>
|
||||
<font-awesome icon="user" />
|
||||
@@ -140,7 +140,7 @@ Raymer * @version 1.0.0 */
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
@click="openDialog()"
|
||||
@click="openProjectDialog()"
|
||||
class="text-center text-base uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-3 py-2 rounded-lg"
|
||||
>
|
||||
<font-awesome icon="folder-open" />
|
||||
@@ -153,7 +153,7 @@ Raymer * @version 1.0.0 */
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<GiftedDialog ref="customDialog" />
|
||||
<GiftedDialog ref="customDialog" :show-projects="showProjectsDialog" />
|
||||
<GiftedPrompts ref="giftedPrompts" />
|
||||
<FeedFilters ref="feedFilters" />
|
||||
|
||||
@@ -439,6 +439,7 @@ export default class HomeView extends Vue {
|
||||
selectedImageData: Blob | null = null;
|
||||
isImageViewerOpen = false;
|
||||
imageCache: Map<string, Blob | null> = new Map();
|
||||
showProjectsDialog = false;
|
||||
|
||||
/**
|
||||
* Initializes the component on mount
|
||||
@@ -1862,5 +1863,15 @@ export default class HomeView extends Vue {
|
||||
this.$router.push({ name: "contact-qr" });
|
||||
}
|
||||
}
|
||||
|
||||
openDialogPerson(giver?: GiverReceiverInputInfo | "Unnamed", description?: string) {
|
||||
this.showProjectsDialog = false;
|
||||
this.openDialog(giver, description);
|
||||
}
|
||||
|
||||
openProjectDialog() {
|
||||
this.showProjectsDialog = true;
|
||||
(this.$refs.customDialog as any).open();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user