-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(unaccepted shares) My accounts show unaccepted shares
- Loading branch information
VladislavSokov
committed
Aug 31, 2023
1 parent
40152a8
commit 31d45b5
Showing
5 changed files
with
72 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
tr | ||
td= account_share.account.name | ||
td= account_share.account.parent.email | ||
td= account_share.created_at.to_formatted_s(:short) | ||
td= link_to 'link', accept_account_share_url(token: account_share.token) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
= [current_user.name, account.email].select(&:present?).join(" ") | ||
br | ||
| Account balance: #{account.balance} | ||
br | ||
- account.children.each do |child| | ||
.card.box | ||
.card-content | ||
.media | ||
.media-content | ||
p.title.is-4= link_to child.name, account_path(child) | ||
p.subtitle.is-6= child.balance | ||
footer.card-footer | ||
= link_to '+ Add', new_account_topup_path(child), class: 'card-footer-item' | ||
= link_to '- Spend', new_account_spend_path(child), class: 'card-footer-item' | ||
|
||
= link_to 'add account', new_account_path | ||
br | ||
| Shared accounts | ||
- shared_accounts.each do |shared_account| | ||
.card.box | ||
.card-content | ||
.media | ||
.media-content | ||
p.title.is-6 Owner: #{shared_account.parent.email} | ||
p.title.is-4= link_to shared_account.name, account_path(shared_account) | ||
p.subtitle.is-6= shared_account.balance | ||
footer.card-footer | ||
= link_to '+ Add', new_account_topup_path(shared_account), class: 'card-footer-item' | ||
= link_to '- Spend', new_account_spend_path(shared_account), class: 'card-footer-item' | ||
|
||
- if unaccepted_shares.present? | ||
h2.title | ||
| Unaccepted shares | ||
.columns | ||
.column | ||
.card | ||
.card-content | ||
table.table.is-fullwidth.is-striped | ||
thead | ||
tr | ||
th Account | ||
th From | ||
th Created | ||
th Link | ||
= render partial: 'account_share', collection: unaccepted_shares.order(created_at: :desc) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters