@ -102,9 +102,11 @@ export default class ContactGiftingView extends Vue {
activeDid = "" ;
allContacts : Array < Contact > = [ ] ;
apiServer = "" ;
description = "" ;
projectId = "" ;
prompt = "" ;
description = "" ;
amountInput = "0" ;
unitCode = "HUR" ;
recipientProjectName = "" ;
recipientProjectImage = "" ;
recipientProjectHandleId = "" ;
@ -143,6 +145,9 @@ export default class ContactGiftingView extends Vue {
this . recipientProjectHandleId =
( this . $route . query [ "recipientProjectHandleId" ] as string ) || "" ;
this . prompt = ( this . $route . query [ "prompt" ] as string ) ? ? this . prompt ;
this . description = ( this . $route . query [ "description" ] as string ) || "" ;
this . amountInput = ( this . $route . query [ "amountInput" ] as string ) || "0" ;
this . unitCode = ( this . $route . query [ "unitCode" ] as string ) || "HUR" ;
/ / R e a d n e w c o n t e x t p a r a m e t e r s
this . stepType = ( this . $route . query [ "stepType" ] as string ) || "giver" ;
@ -182,7 +187,7 @@ export default class ContactGiftingView extends Vue {
openDialog ( contact ? : GiverReceiverInputInfo | "Unnamed" ) {
if ( contact === "Unnamed" ) {
/ / S p e c i a l c a s e : P a s s u n d e f i n e d t o t r i g g e r S t e p 1 , b u t w i t h " U n n a m e d " p r e - s e l e c t e d
/ / S p e c i a l c a s e : H a n d l e " U n n a m e d " c o n t a c t s f o r b o t h g i v e r s a n d r e c i p i e n t s
let recipient : GiverReceiverInputInfo ;
let giver : GiverReceiverInputInfo | undefined ;
@ -226,9 +231,17 @@ export default class ContactGiftingView extends Vue {
recipient ,
undefined ,
this . prompt ,
this . description ,
this . amountInput ,
this . unitCode ,
) ;
/ / I m m e d i a t e l y s e l e c t " U n n a m e d " a n d m o v e t o S t e p 2
( this . $refs . giftedDialog as GiftedDialog ) . selectGiver ( ) ;
/ / I m m e d i a t e l y s e l e c t " U n n a m e d " a n d m o v e t o S t e p 2 b a s e d o n s t e p T y p e
if ( this . stepType === "giver" ) {
( this . $refs . giftedDialog as GiftedDialog ) . selectGiver ( ) ;
} else {
( this . $refs . giftedDialog as GiftedDialog ) . selectRecipient ( ) ;
}
} else {
/ / R e g u l a r c a s e : c o n t a c t i s a G i v e r R e c e i v e r I n p u t I n f o
let giver : GiverReceiverInputInfo ;
@ -276,6 +289,9 @@ export default class ContactGiftingView extends Vue {
recipient ,
undefined ,
this . prompt ,
this . description ,
this . amountInput ,
this . unitCode ,
) ;
}
}