|
7 | 7 | <div class="md:p-2 p-1 w-1/2">
|
8 | 8 | <%= build_pointplot(@point_data, @point_options) %>
|
9 | 9 | </div>
|
10 |
| - <div class="flex flex-wrap md:p-2 p-1 w-3/4"> |
11 |
| - <div class="p-1 w-full"> |
12 |
| - <div class="mx-auto max-w-screen-xl px-4 py-8 sm:px-6 sm:py-12 lg:px-8"> |
13 |
| - <dl class="mt-6 grid grid-cols-1 gap-4 sm:mt-8 sm:grid-cols-1 lg:grid-cols-2"> |
14 |
| - <div class="flex flex-col rounded-lg bg-blue-50 px-4 py-8 text-center"> |
15 |
| - <dt class="order-last text-lg font-medium text-gray-500">Total Transactions</dt> |
16 |
| - <dd class="text-xl font-extrabold text-blue-600 md:text-3xl"> |
17 |
| - <%= @info.transactions_count %> |
18 |
| - </dd> |
19 |
| - </div> |
20 |
| - <div class="flex flex-col rounded-lg bg-blue-50 px-4 py-8 text-center"> |
21 |
| - <dt class="order-last text-lg font-medium text-gray-500">Total Sales</dt> |
22 |
| - |
23 |
| - <dd class="text-xl font-extrabold text-blue-600 md:text-2xl"> |
24 |
| - <%= @info.total_amount %> |
25 |
| - </dd> |
26 |
| - </div> |
27 |
| - </dl> |
28 |
| - </div> |
29 |
| - </div> |
30 |
| - <div class="md:p-2 p-1 w-full"> |
31 |
| - <.table id="devices" rows={@devices}> |
32 |
| - <:col :let={device} label="Identifier"><%= device.id %></:col> |
33 |
| - <:col :let={device} label="AVG speed">1 Mb</:col> |
34 |
| - <:col :let={device} label=""> |
35 |
| - <%= make_red_plot(@test_data) %> |
36 |
| - </:col> |
37 |
| - </.table> |
38 |
| - </div> |
39 |
| - </div> |
40 | 10 | <div class="md:p-2 p-1 w-1/4">
|
41 |
| - <h2 class="font-medium title-font tracking-widest text-gray-900 mb-4 text-sm text-center sm:text-left"> |
| 11 | + <h2 class="font-medium title-font tracking-widest text-gray-900 mt-10 mb-4 text-sm text-center sm:text-left"> |
42 | 12 | TOP CUSTOMERS
|
43 | 13 | </h2>
|
44 |
| - <nav class="flex flex-col sm:items-start sm:text-left text-center items-center -mb-1 space-y-2.5"> |
45 |
| - <a :for={customer <- @info.top_customers} id={customer}> |
| 14 | + <div class="flex flex-col sm:items-start sm:text-left font-small text-center items-center -mb-1 space-y-2.5"> |
| 15 | + <a :for={customer <- @info.top_customers} id={customer} class="text-sm"> |
46 | 16 | <span class="bg-yellow-100 text-yellow-500 w-4 h-4 mr-2 rounded-full inline-flex items-center justify-center">
|
47 | 17 | <svg
|
48 | 18 | fill="none"
|
|
58 | 28 | </span>
|
59 | 29 | <%= customer %>
|
60 | 30 | </a>
|
61 |
| - </nav> |
| 31 | + </div> |
| 32 | + </div> |
| 33 | + <div class="md:p-2 p-1 w-1/4"> |
62 | 34 | <h2 class="font-medium title-font tracking-widest text-gray-900 mt-10 mb-4 text-sm text-center sm:text-left">
|
63 | 35 | LAST CUSTOMERS
|
64 | 36 | </h2>
|
65 |
| - <nav class="flex flex-col sm:items-start sm:text-left text-center items-center -mb-1 space-y-2.5"> |
66 |
| - <a :for={customer <- @info.last_customers} id={customer}> |
67 |
| - <span class="bg-yellow-100 text-yellow-500 w-4 h-4 mr-2 rounded-full inline-flex items-center justify-center"> |
| 37 | + <div class="flex flex-col sm:items-start sm:text-left text-center items-center -mb-1 space-y-2.5 text-base"> |
| 38 | + <a :for={customer <- @info.last_customers} id={customer} class="text-sm"> |
| 39 | + <span class="bg-yellow-100 text-yellow-500 w-4 h-4 mr-2 rounded-full inline-flex items-center justify-center "> |
68 | 40 | <svg
|
69 | 41 | fill="none"
|
70 | 42 | stroke="currentColor"
|
|
79 | 51 | </span>
|
80 | 52 | <%= customer %>
|
81 | 53 | </a>
|
82 |
| - </nav> |
| 54 | + </div> |
| 55 | + </div> |
| 56 | + <div class="flex flex-wrap md:p-2 p-1 w-1/2"> |
| 57 | + <div class="p-1 w-full"> |
| 58 | + <div class="mx-auto max-w-screen-xl px-4 py-8 sm:px-6 sm:py-12 lg:px-8"> |
| 59 | + <dl class="mt-2 grid grid-cols-1 gap-4 sm:grid-cols-1 md:grid-cols-2"> |
| 60 | + <div class="flex flex-col rounded-lg bg-blue-50 px-2 py-4 text-center"> |
| 61 | + <dt class="order-last text-lg font-medium text-gray-500">Total Transactions</dt> |
| 62 | + <dd class="text-xl font-extrabold text-blue-600 md:text-3xl"> |
| 63 | + <%= @info.transactions_count %> |
| 64 | + </dd> |
| 65 | + </div> |
| 66 | + <div class="flex flex-col rounded-lg bg-blue-50 px-2 py-4 text-center"> |
| 67 | + <dt class="order-last text-lg font-medium text-gray-500">Total Sales</dt> |
| 68 | + <dd class="text-xl font-extrabold text-blue-600 md:text-2xl"> |
| 69 | + <%= @info.total_amount %> |
| 70 | + </dd> |
| 71 | + </div> |
| 72 | + </dl> |
| 73 | + </div> |
| 74 | + </div> |
83 | 75 | </div>
|
84 | 76 | </div>
|
85 |
| - <div class="items-center "> |
| 77 | + <div class="p-1 w-3/4"> |
| 78 | + <.table id="devices" rows={@devices}> |
| 79 | + <:col :let={device} label="Identifier"><%= device.id %></:col> |
| 80 | + <:col :let={device} label="AVG speed">1 Mb</:col> |
| 81 | + <:col :let={device} label=""> |
| 82 | + <%= make_red_plot(@test_data) %> |
| 83 | + </:col> |
| 84 | + </.table> |
| 85 | + </div> |
| 86 | + |
| 87 | + <div class="items-center w-1/4 "> |
86 | 88 | <pre class="text-gray-300 bg-gray-800 code p-4 rounded-md whitespace-pre overflow-x-auto">
|
87 |
| -<code> <%= inspect(@info.monthly_data, pretty: true) %> |
| 89 | +<code> |
| 90 | + <%= inspect(@info.monthly_data, pretty: true) %> |
88 | 91 | </code>
|
89 | 92 | </pre>
|
90 | 93 | </div>
|
|
0 commit comments