WIP: epic/Referrals
6/10 discussions resolved
- Last updated by Olivia Madrid
181 182 ->setEntityType('user') 182 183 ->setAction('referral') 183 184 ->push(); 185 186 187 $referral = new Referral(); - Owner
Can we make this a delegate? ie. -> Core/Rewards/Join/Delegates/ReferralDelegate
changed this line in version 2 of the diff
- Last updated by Olivia Madrid
104 } 105 106 return $success; 107 } 108 109 /** 110 * Update a referral 111 * @param Referral $referral 112 * @return bool 113 */ 114 public function update(Referral $referral) 115 { 116 // incoming $referral will have prospectGuid and joinTimestamp 117 118 // OJMTODO: check - shouldn't need IF EXISTS because referralValidator 119 $template = "UPDATE referrals SET join_timestamp = ? WHERE prospect_guid = ?"; - Owner
should not be necessary as cassandra will upsert
changed this line in version 2 of the diff
- Resolved by Olivia Madrid
- Last updated by Olivia Madrid
14 15 public function __construct( 16 $repository = null 17 ) 18 { 19 $this->repository = $repository ?: new Repository; 20 } 21 22 /** 23 * Create referral for registered prospect 24 * @param ReferrerGuid $referrerGuid 25 * @return bool 26 */ 27 public function add($referral) 28 { 29 // OJMQ: what happens if the add() fails? - Owner
I would return the value of repository add to solve
changed this line in version 2 of the diff
- Resolved by Olivia Madrid
- Resolved by Olivia Madrid
- Resolved by Olivia Madrid
- Last updated by Olivia Madrid
36 38 $params['user']->save(); 37 39 $params['user']->subscribe($user->guid); 38 40 } 41 42 // OJMQ: should I put a null value for joinTimestamp here? 43 $referral = new Referral(); 44 $referral->setProspectGuid(Core\Session::getLoggedInUserGuid()) - Owner
Don't assume current session when outside of Controllers.
$params['user']
is passed and a user entity, so we cant take from there changed this line in version 2 of the diff
- Resolved by Olivia Madrid
- Resolved by Olivia Madrid
added 22 commits
- 9f11fc4c...01d29bd9 - 18 commits from branch
minds:master
- 30f1c3e1 - WIP: Referrals console
- f0233165 - WIP: Referrals console - update repository getList to accommodate incoming referral model
- fc910d6b - WIP: Referrals - make changes based on Mark feedback
- 42c7a29c - WIP: Referrals
Toggle commit list- 9f11fc4c...01d29bd9 - 18 commits from branch
added 32 commits
- 42c7a29c...a7925db0 - 27 commits from branch
minds:master
- 96336f68 - WIP: Referrals console
- 627d5c1c - WIP: Referrals console - update repository getList to accommodate incoming referral model
- 62241026 - WIP: Referrals - make changes based on Mark feedback
- a8385534 - WIP: Referrals
- 904b4e84 - WIP: Referrals console - accommodate infinite scrolling
Toggle commit list- 42c7a29c...a7925db0 - 27 commits from branch
added MR::Awaiting Review label
closed