script(data-id="export-schedule", type="text/ng-template")
    div(id="export-schedule-container")
        table(class="table")
            tbody
                tr
                    td <b>#{__("lblLocationName")}:</b>
                    td {{location}}
                tr
                    td <b>#{__("material name")}:</b>
                    td
                        <span>{{getMaterialName(material)}}</span>
                        <span class="meta-item"><b>#{__("lblMaterialCode")}:</b>&nbsp;&nbsp;{{material.code}}</span>
                        <span class="meta-item"><b>#{__("lblMaterialDescription")}:</b>&nbsp;&nbsp;{{material.desc}}</span>
                        <span class="meta-item"><b>#{__("lblMaterialPO")}:</b>&nbsp;&nbsp;{{material.po}}</span>
        div(id="export-item-container")
            div(class="export-item", data-ng-repeat="item in items")
                p <b>#{__("date")}:</b>&nbsp;{{item.date}}
                table(class="table table-striped export-item")
                    thead
                        tr
                            td(style="min-width:100px;") #{__("time")}
                            td #{__("qty")}
                            td &nbsp;
                    tbody
                        tr(data-ng-repeat="bucket in item.buckets", data-ng-hide="timeLessThanNow(bucket.datetime)")
                            td {{ bucket.datetime | date : "hh:mm a" }}
                            td {{ bucket.qty | number }} <span class="text-uom">{{ bucket.uom }}</span>
                            td <span data-ng-show="bucket.exported">Delivery for {{bucket.datetime | date : "hh:mm a"}} has been exported.</span><a href="#" data-ng-hide="bucket.exported" data-ng-click="export($event, bucket)">#{__("export to apex")}</a>
        div(style="text-align:center;")
            button(class="btn btn-primary btn-lg", data-ng-click="returnToMaterialDetail()", data-ng-disabled="isBackDisabled") #{__("return to detail")}
