templates/user_profile/withdrawal-history.html.twig line 1

  1. {% extends 'base.html.twig' %}
  2. {% block title %}Profile{% endblock %}
  3. {% block body %}
  4.     <div class="grid-container fluid full-width" style="padding: 50px 0 50px 0;">
  5.         <div class="grid-x grid-padding-y grid-padding-x">
  6.             <div class="small-12 cell">
  7.                 <div class="grid-container" style="max-width: 1200px;">
  8.                     <div class="grid-x">
  9.                         <div class="small-12 large-2 cell" style="text-align: center;">
  10.                             <img class="user-profile-avatar" style="display: block;" src="{{ asset('build/images/web/icon-profile-otter.png') }}" />
  11.                             <h2 style="text-align: center; padding: 0; margin: 0;">{{ user.username ? user.username : '' }}</h2>
  12.                             {% if user.activeWallet is defined and user.activeWallet.address is defined %}
  13.                                 <a href="https://explorer.thetatoken.org/account/{{ user.activeWallet.address }}" target="_blank"><span style="font-weight: normal; font-size: 1em; color: #999; font-family: sans-serif;">{{ user.activeWallet.address ? user.activeWallet.address|slice(0,6) ~ '...' ~ user.activeWallet.address|slice(37,42) : '' }}</span></a>
  14.                             {% endif %}
  15.                         </div>
  16.                         <div class="small-12 large-8 cell">
  17.                             <div class="grid-x">
  18.                                 <div class="small-12 large-offset-1 cell">
  19.                                     <span class='family-orgovan' style="font-size: 3em;">{{ user.experience|number_format(0,'.',',') }}</span>
  20.                                     <span style="font-size: 2em; font-weight: bold; color: goldenrod;"> <em>{{ currentRank }}</em></span>
  21.                                 </div>
  22.                                 <div class="small-12 large-offset-1 cell">
  23.                                     <div class="grid-x">
  24.                                         {% set luck, distance, tension = 0, 3, 0 %}
  25.                                         {% for gear in userGear %}
  26.                                             <div class="small-12 large-1 cell" style="padding:5px;">
  27.                                                 {% if gear.inventoryEquipment is not null %}
  28.                                                     {% set luck = luck + gear.inventoryEquipment.statStar %}
  29.                                                     {% set distance = distance + gear.inventoryEquipment.statRectangle %}
  30.                                                     {% set tension = tension + gear.inventoryEquipment.statCircle %}
  31.                                                     <img style="border-radius: 10px;" src="{{ asset('https://tinyknightgames.s3.us-east-2.amazonaws.com' ~ gear.inventoryEquipment.template.imageUrl) }}" alt="{{ gear.inventoryEquipment.template.name }}"/></a>
  32.                                                 {% endif %}
  33.                                                 {% if gear.nftMetadata is not null %}
  34.                                                     {% set luck = luck + gear.nftMetadata.statStar %}
  35.                                                     {% set distance = distance + gear.nftMetadata.statRectangle %}
  36.                                                     {% set tension = tension + gear.nftMetadata.statCircle %}
  37.                                                     {% if gear.nftMetadata.nftMetadataQuest.progress > gear.nftMetadata.nftMetadataQuest.goal %}
  38.                                                         {% set luck = luck + gear.nftMetadata.nftMetadataQuest.statStarMod %}
  39.                                                         {% set distance = distance + gear.nftMetadata.nftMetadataQuest.statRectangleMod %}
  40.                                                         {% set tension = tension + gear.nftMetadata.nftMetadataQuest.statCircleMod %}
  41.                                                     {% endif %}
  42.                                                     <a href="{{ path('explorer_asset_detail', { id: gear.nftMetadata.nftHub.id }) }}"><img style="border:3px solid #fff; border-radius: 7px;" src="{{ asset(gear.nftMetadata.imageUrl) }}" alt="{{ gear.nftMetadata.name }}"/></a>
  43.                                                 {% endif %}
  44.                                             </div>
  45.                                         {% endfor %}
  46.                                         <div class="small-12 large-5 end cell"></div>
  47.                                         <div class="small-12 large-2 cell">
  48.                                             <div style="background: purple; margin: 5px; padding: 5px; border-radius: 5px; font-size: .9em; font-weight: bold; text-align: center;">
  49.                                                 L: {{ luck }}
  50.                                             </div>
  51.                                         </div>
  52.                                         <div class="small-12 large-2 cell">
  53.                                             <div style="background: purple; margin: 5px; padding: 5px; border-radius: 5px; font-size: .9em; font-weight: bold; text-align: center;">
  54.                                                 D: {{ distance }}
  55.                                             </div>
  56.                                         </div>
  57.                                         <div class="small-12 large-2 cell">
  58.                                             <div style="background: purple; margin: 5px; padding: 5px; border-radius: 5px; font-size: .9em; font-weight: bold; text-align: center;">
  59.                                                 T: {{ tension }}
  60.                                             </div>
  61.                                         </div>
  62.                                     </div>
  63.                                 </div>
  64.                                 <div class="small-12 large-offset-1 cell"  style="background: #222; border-radius: 10px; padding: 15px; margin-top: 15px;">
  65.                                     <div class="grid-container">
  66.                                         <div class="grid-x">
  67.                                             {% if userRecords is not null %}
  68.                                                 <div class="small-12 large-3">
  69.                                                     <p class="user-profile-record-num">{{ userRecords.totalCaught ? userRecords.totalCaught|number_format(0,'.',',') : 0 }}</p>
  70.                                                     <p class="user-profile-record-label">Caught</p>
  71.                                                 </div>
  72.                                                 <div class="small-12 large-3">
  73.                                                     <p class="user-profile-record-num">{{ userRecords.totalSalvaged ? userRecords.totalSalvaged|number_format(0,'.',',') : 0 }}</p>
  74.                                                     <p class="user-profile-record-label">Salvaged</p>
  75.                                                 </div>
  76.                                                 <div class="small-12 large-3">
  77.                                                     <p class="user-profile-record-num">{{ userRecords.totalCrafted ? userRecords.totalCrafted|number_format(0,'.',',') : 0 }}</p>
  78.                                                     <p class="user-profile-record-label">Crafted Items</p>
  79.                                                 </div>
  80.                                                 <div class="small-12 large-3">
  81.                                                     <p class="user-profile-record-num">{{ userRecords.totalConverted ? userRecords.totalConverted|number_format(0,'.',',') : 0 }}</p>
  82.                                                     <p class="user-profile-record-label">Converted to NFT</p>
  83.                                                 </div>
  84.                                             {% endif %}
  85.                                         </div>
  86.                                     </div>
  87.                                 </div>
  88.                             </div>
  89.                         </div>
  90.                     </div>
  91.                 </div>
  92.             </div>
  93.         </div>
  94.     </div>
  95.     <div class="grid-container" style="margin-top: 50px; margin-bottom: 50px;">
  96.         <div class="grid-x">
  97.             <div class="small-12 medium-2 cell">
  98.                 <ul class="vertical menu">
  99.                     <li><a href="{{ path('user_profile', { userId: user.id, domain: app_domain }) }}">NFT Inventory</a></li>
  100.                     <li><a href="{{ path('user_profile_crates', { userId: user.id, domain: app_domain }) }}">Ancient Crates</a></li>
  101.                     <li><a href="{{ path('user_profile_opened_crates', { userId: user.id, domain: app_domain }) }}">Opened Crates</a></li>
  102.                     <li>Market</li>
  103.                     <li><a href="{{ path('user_sent_offers', { userId: user.id }) }}">Sent Offers</a></li>
  104.                     <li><a href="{{ path('user_received_offers', { userId: user.id }) }}">Received Offers</a></li>
  105.                     <li><a href="{{ path('user_active_listings', { userId: user.id }) }}">Active Listings</a></li>
  106.                     <li><a href="{{ path('user_sold_listings', { userId: user.id }) }}">Sold Listings</a></li>
  107.                     <li><a href="{{ path('user_purchased_listings', { userId: user.id }) }}">Purchased Listings</a></li>
  108.                     <li><a href="{{ path('user_withdrawal_history', { userId: user.id }) }}">Withdrawal History</a></li>
  109.                 </ul>
  110.             </div>
  111.             <div class="small-12 medium-10 cell">
  112.                 <turbo-frame>
  113.                     <div class="grid-x">
  114.                         <div class="small-12 cell">
  115.                             <h2>Withdrawal History</h2>
  116.                         </div>
  117.                         {% if withdrawalLog is empty %}
  118.                             <div class="small-12 cell">
  119.                                 <p>No Withdrawals found.</p>
  120.                             </div>
  121.                         {% else %}
  122.                             {% for withdrawal in withdrawalLog %}
  123.                                 <div class="small-12 cell" style="margin-bottom: 10px;">
  124.                                     {{ withdrawal.withdrawnAt|date }}
  125.                                     <img height="20" width="20" src="{{ asset('build/images/web/tfuel-logo.svg') }}" style="vertical-align: top;" />
  126.                                     <span style="color: #ffa50d; font-size: .9em; vertical-align: top; font-weight: bold;">{{ withdrawal.amount|number_format(2,'.',',')  }}</span> <span style="color: #ffa50d; font-size: .9em; vertical-align: top; font-weight: bold;">TFUEL</span>
  127.                                     <a href="https://explorer.thetatoken.org/txs/{{ withdrawal.tx }}" target="_blank">View Withdrawal in Explorer</a>
  128.                                 </div>
  129.                             {% endfor %}
  130.                         {% endif %}
  131.                         {#                    {% if nftMetadatas is empty %}#}
  132.                         {#                        <div class="small-12 cell">#}
  133.                         {#                            <p>Learn how to <a href="/support#howtopurchasenft">convert your items into NFTs</a> using <strong>Sand Dollars</strong>.</p>#}
  134.                         {#                        </div>#}
  135.                         {#                    {% else %}#}
  136.                         {#                        {% for nftMetadata in nftMetadatas %}#}
  137.                         {#                            {% include 'explorer/includes/asset-card.html.twig' with {'nftMetadata': nftMetadata, 'app': app} %}#}
  138.                         {#                        {% endfor %}#}
  139.                         {#                    {% endif %}#}
  140.                     </div>
  141.                 </turbo-frame>
  142.             </div>
  143.         </div>
  144.         <div class="grid-x">
  145.             {#            <div class="small-12 cell">#}
  146.             {#                <h2>Market Listings</h2>#}
  147.             {#            </div>#}
  148.             {#            {% if marketListings is empty %}#}
  149.             {#                <div class="small-12 cell">#}
  150.             {#                    <p>Market Listings is empty.</p>#}
  151.             {#                </div>#}
  152.             {#            {% else %}#}
  153.             {#                {% for marketItem in marketListings %}#}
  154.             {#                    {% include 'explorer/includes/asset-card.html.twig' with {'nftMetadata': marketItem.nftHub.nftMetadata, 'app': app} %}#}
  155.             {#                {% endfor %}#}
  156.             {#            {% endif %}#}
  157.         </div>
  158.     </div>
  159. {% endblock %}