@@ -12,6 +12,8 @@ defmodule AlgoraWeb.Org.JobLive do
12
12
13
13
require Logger
14
14
15
+ defp default_tab , do: "applicants"
16
+
15
17
defmodule WirePaymentForm do
16
18
@ moduledoc false
17
19
use Ecto.Schema
@@ -96,7 +98,15 @@ defmodule AlgoraWeb.Org.JobLive do
96
98
97
99
@ impl true
98
100
def mount ( % { "org_handle" => handle , "id" => id } , _session , socket ) do
99
- { :ok , push_navigate ( socket , to: ~p" /#{ handle } /jobs/#{ id } /applicants" ) }
101
+ { :ok , push_navigate ( socket , to: ~p" /#{ handle } /jobs/#{ id } /#{ default_tab ( ) } " ) }
102
+ end
103
+
104
+ @ impl true
105
+ def handle_params ( % { "tab" => "activate" } , _uri , socket ) do
106
+ { :noreply ,
107
+ socket
108
+ |> assign ( :current_tab , default_tab ( ) )
109
+ |> assign ( :show_payment_drawer , true ) }
100
110
end
101
111
102
112
@ impl true
@@ -1578,14 +1588,6 @@ defmodule AlgoraWeb.Org.JobLive do
1578
1588
{ Money . to_string! ( price ( ) ) }
1579
1589
</ span >
1580
1590
</ div >
1581
- < div class = "flex justify-between items-center " >
1582
- < span class = "text-sm text-muted-foreground " > Processing Fee (4%)</ span >
1583
- < span class = "font-semibold font-display " >
1584
- { Money . to_string! (
1585
- Money . mult! ( @ current_org . subscription_price , Decimal . new ( "0.04" ) )
1586
- ) }
1587
- </ span >
1588
- </ div >
1589
1591
1590
1592
< div class = "flex justify-between items-center " >
1591
1593
< span class = "text-sm text-muted-foreground " >
@@ -1601,6 +1603,15 @@ defmodule AlgoraWeb.Org.JobLive do
1601
1603
</ span >
1602
1604
</ div >
1603
1605
1606
+ < div class = "flex justify-between items-center " >
1607
+ < span class = "text-sm text-muted-foreground " > Processing Fee (4%)</ span >
1608
+ < span class = "font-semibold font-display " >
1609
+ { Money . to_string! (
1610
+ Money . mult! ( @ current_org . subscription_price , Decimal . new ( "0.04" ) )
1611
+ ) }
1612
+ </ span >
1613
+ </ div >
1614
+
1604
1615
< div class = "border-t pt-4 flex justify-between items-center " >
1605
1616
< span class = "font-semibold " > Total</ span >
1606
1617
< span class = "font-semibold font-display " >
@@ -1626,26 +1637,69 @@ defmodule AlgoraWeb.Org.JobLive do
1626
1637
< div data-tab = "wire " class = "hidden " >
1627
1638
< . card >
1628
1639
< . card_header >
1629
- < . card_title > Wire Transfer Details</ . card_title >
1630
- < . card_description > Send payment to the following account</ . card_description >
1640
+ < . card_title > Billing Details</ . card_title >
1641
+ < . card_description >
1642
+ Enter your billing details to generate an invoice
1643
+ </ . card_description >
1631
1644
</ . card_header >
1632
1645
< . card_content class = "pt-0 " >
1646
+ < div class = "space-y-4 " >
1647
+ < . input
1648
+ type = "text "
1649
+ label = "Billing Name "
1650
+ field = { @ wire_form [ :billing_name ] }
1651
+ value = {
1652
+ @ current_org . billing_name || @ current_org . display_name ||
1653
+ @ current_org . handle
1654
+ }
1655
+ />
1656
+ < . input
1657
+ type = "textarea "
1658
+ label = "Billing Address "
1659
+ field = { @ wire_form [ :billing_address ] }
1660
+ value = { @ current_org . billing_address }
1661
+ />
1662
+ < div class = "grid grid-cols-1 md:grid-cols-2 gap-4 " >
1663
+ < . input
1664
+ type = "text "
1665
+ label = "Executive Name "
1666
+ field = { @ wire_form [ :executive_name ] }
1667
+ value = { @ current_org . executive_name }
1668
+ />
1669
+ < . input
1670
+ type = "text "
1671
+ label = "Executive Role "
1672
+ field = { @ wire_form [ :executive_role ] }
1673
+ value = { @ current_org . executive_role }
1674
+ />
1675
+ </ div >
1676
+ < . input
1677
+ type = "date "
1678
+ label = "Invoice Date "
1679
+ field = { @ wire_form [ :payment_date ] }
1680
+ value = { Date . utc_today ( ) }
1681
+ />
1682
+ </ div >
1683
+
1684
+ < h4 class = "pt-6 tracking-tight font-semibold leading-none text-2xl mb-4 " >
1685
+ Wire Transfer Details
1686
+ </ h4 >
1633
1687
< div class = "space-y-4 " >
1634
1688
< div class = "grid grid-cols-2 gap-2 text-sm " >
1635
- < span class = "text-muted-foreground " > Bank Name </ span >
1636
- < span class = "font-medium " > { @ wire_details [ "bank_name " ] } </ span >
1689
+ < span class = "text-muted-foreground " > Beneficiary (Account Holder) </ span >
1690
+ < span class = "font-medium " > { @ wire_details [ "beneficiary " ] } </ span >
1637
1691
1638
- < span class = "text-muted-foreground " > Account Name </ span >
1639
- < span class = "font-medium " > { @ wire_details [ "account_name " ] } </ span >
1692
+ < span class = "text-muted-foreground " > ACH and Wire Routing Number </ span >
1693
+ < span class = "font-medium " > { @ wire_details [ "routing_number " ] } </ span >
1640
1694
1641
1695
< span class = "text-muted-foreground " > Account Number</ span >
1642
1696
< span class = "font-medium " > { @ wire_details [ "account_number" ] } </ span >
1643
1697
1644
- < span class = "text-muted-foreground " > Routing Number </ span >
1645
- < span class = "font-medium " > { @ wire_details [ "routing_number " ] } </ span >
1698
+ < span class = "text-muted-foreground " > Account Type </ span >
1699
+ < span class = "font-medium " > { @ wire_details [ "account_type " ] } </ span >
1646
1700
1647
- < span class = "text-muted-foreground " > SWIFT Code </ span >
1648
- < span class = "font-medium " > { @ wire_details [ "swift_code " ] } </ span >
1701
+ < span class = "text-muted-foreground " > Bank Address </ span >
1702
+ < span class = "font-medium " > { @ wire_details [ "bank_address " ] } </ span >
1649
1703
</ div >
1650
1704
1651
1705
< div class = "border-t pt-4 " >
@@ -1655,18 +1709,6 @@ defmodule AlgoraWeb.Org.JobLive do
1655
1709
{ Money . to_string! ( price ( ) ) }
1656
1710
</ span >
1657
1711
1658
- < span class = "text-muted-foreground line-through block " >
1659
- Stripe Processing Fee
1660
- </ span >
1661
- < span class = "font-medium font-display flex " >
1662
- < span class = "text-muted-foreground line-through " > $0</ span >
1663
- < span class = "text-success-400 ml-auto " >
1664
- ({ Money . to_string! (
1665
- Money . mult! ( @ current_org . subscription_price , Decimal . new ( "0.04" ) )
1666
- ) } saved!)
1667
- </ span >
1668
- </ span >
1669
-
1670
1712
< span class = "text-muted-foreground block " >
1671
1713
Early Believer Discount
1672
1714
</ span >
@@ -1680,6 +1722,18 @@ defmodule AlgoraWeb.Org.JobLive do
1680
1722
) }
1681
1723
</ span >
1682
1724
</ span >
1725
+
1726
+ < span class = "text-muted-foreground line-through block " >
1727
+ Stripe Processing Fee
1728
+ </ span >
1729
+ < span class = "font-medium font-display flex " >
1730
+ < span class = "text-muted-foreground line-through " > $0</ span >
1731
+ < span class = "text-success-400 ml-auto " >
1732
+ ({ Money . to_string! (
1733
+ Money . mult! ( @ current_org . subscription_price , Decimal . new ( "0.04" ) )
1734
+ ) } saved!)
1735
+ </ span >
1736
+ </ span >
1683
1737
</ div >
1684
1738
</ div >
1685
1739
@@ -1691,49 +1745,6 @@ defmodule AlgoraWeb.Org.JobLive do
1691
1745
</ span >
1692
1746
</ div >
1693
1747
</ div >
1694
-
1695
- < div class = "pt-6 " >
1696
- < h4 class = "tracking-tight font-semibold leading-none text-2xl mb-4 " >
1697
- Billing Details
1698
- </ h4 >
1699
- < div class = "space-y-4 " >
1700
- < . input
1701
- type = "text "
1702
- label = "Billing Name "
1703
- field = { @ wire_form [ :billing_name ] }
1704
- value = {
1705
- @ current_org . billing_name || @ current_org . display_name ||
1706
- @ current_org . handle
1707
- }
1708
- />
1709
- < . input
1710
- type = "textarea "
1711
- label = "Billing Address "
1712
- field = { @ wire_form [ :billing_address ] }
1713
- value = { @ current_org . billing_address }
1714
- />
1715
- < div class = "grid grid-cols-1 md:grid-cols-2 gap-4 " >
1716
- < . input
1717
- type = "text "
1718
- label = "Executive Name "
1719
- field = { @ wire_form [ :executive_name ] }
1720
- value = { @ current_org . executive_name }
1721
- />
1722
- < . input
1723
- type = "text "
1724
- label = "Executive Role "
1725
- field = { @ wire_form [ :executive_role ] }
1726
- value = { @ current_org . executive_role }
1727
- />
1728
- </ div >
1729
- < . input
1730
- type = "date "
1731
- label = "Invoice Date "
1732
- field = { @ wire_form [ :payment_date ] }
1733
- value = { Date . utc_today ( ) }
1734
- />
1735
- </ div >
1736
- </ div >
1737
1748
</ div >
1738
1749
< p class = "text-sm text-muted-foreground pt-4 " >
1739
1750
You will receive an invoice via email once you confirm.
0 commit comments