{extends file="[shared]/window.tpl"}

{block tabs}
   <li>
      <a data-toggle="tab" href="#StockInCheck" data-tab="StockInCheck">Kontrola převodky&nbsp;</a>
   </li>
{/block}

{block size}
   width = 1680;
   height = 1050;
{/block}


{block css append}
   {foreach $assets.css as $asset}
      <link href="{$asset}" rel="stylesheet">
   {/foreach}

   <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
   <meta name="theme-color" content="#000000">

   <link rel="manifest" href="/web/bundles/warehouse/check-app/manifest.json">
   <link rel="shortcut icon" href="/web/bundles/warehouse/check-app/favicon.ico">
{/block}

{block "js-onready"}
   {foreach $assets.js as $asset}
      <script type="text/javascript" src="{$asset}"></script>
   {/foreach}
{/block}

{block tabsContent}
   <div id="flapStockInCheck" class="tab-pane fade in active boxStatic">
      <div id="root" data-type="store-transfer-check" data-id="{$body.data.id}" data-config="{$config|json_encode}"></div>
   </div>
{/block}

{block windowButtons}{/block}


<script type="text/javascript">
   {block onready}

   {if $body.submitted}
      $(document).on('click','.modal-footer button', () => {
         if (window.opener) {
            window.opener.location.reload();
         }
         window.close();
      });
   {/if}

   {if $body.acn=='erased'}
      refreshOpener(window.opener.top.mainFrame);
      closeWindow();
   {/if}
   {/block}
</script>
