<div class="app-header bg-header-1">
    <div class="layout-fixed full-h text-center">
        <div class="full-h v-bottom-i pdB15">
            <div class="app-content-header bg-header-1">
                <div class="text-name-header-1 nowrap">{{ detailCustomerData.first_name }} {{ detailCustomerData.last_name }}</div>
                <div class="text-title-header-1 nowrap mgT10">Files on appointment history</div>
            </div>
        </div>
    </div>
    <button class="popup-back-button bg-transparent pd0-i biger-3-time" type="button" ng-click="closeTarget('#popupScheduleDetailFileManagement')"></button>
</div>
<div class="app-content">
    <div class="app-content-inner content-pd">
        <ion-scroll class="scroll-area" direction="y" has-bouncing="false" overflow-scroll="false" delegate-handle="scrollScheduleDetailFileManagement" on-scroll="scrollContent('scrollScheduleDetailFileManagement')">
            <div class="stripe-1">
            <div class="box-setting-4 full-w-i" ng-repeat="(key, appointmentHistoryItem) in allAppointmentHistoryData">
                <div class="content content-in">
                    <div class="itm row-one-content">
                        <div class="layout-fixed" ng-click="get_appointmentHistoryOnFilemanager(appointmentHistoryItem.id, appointmentHistoryItem.dateofappt)">
                            <div class="w25px v-top-i pdT5">
                                <div class="stt-1">{{ key + 1 }}</div>
                            </div>
                            <div ng-click="show_appointmentHistoryOnFilemanager(appointmentHistoryItem)">
                                <div class="name clr-clickable first-capitalize">{{ appointmentHistoryItem.fieldworkerName }} - {{ changeDatetime('DT2D', appointmentHistoryItem.dateofappt) }} - {{ appointmentHistoryItem.appointmentgroupsName }} </div>
                            </div>
                            <div class="w30px clear v-top-i pdT5" ng-if="appointmentHistoryItem.files.length>0 && viewDownload">
                                <button class="bg-transparent pd0-i biger-3-time block-i right" type="button" ng-click="createZipFile(appointmentHistoryItem)">
                                    <svg class="block h20px clr-symbol-clickable" viewBox="0 0 482.14 482.14"> <path d="M302.614,0H108.967C80.676,0,57.651,23.026,57.651,51.315v379.509c0,28.289,23.025,51.316,51.316,51.316h264.221   c28.274,0,51.301-23.026,51.301-51.316V121.449L302.614,0z M373.188,450.698H108.967c-10.954,0-19.875-8.905-19.875-19.874V51.315   c0-10.953,8.921-19.858,19.875-19.858l24.728-0.022v22.732c0,4.437,3.594,8.031,8.03,8.031h30.298v33.616h-30.298   c-4.436,0-8.03,3.594-8.03,8.03v17.558c0,4.437,3.594,8.028,8.03,8.028h30.298v33.617h-30.298c-4.436,0-8.03,3.594-8.03,8.03   v17.558c0,4.437,3.594,8.028,8.03,8.028h30.298v25.588c0,4.437,3.594,8.029,8.031,8.029h44.302c4.428,0,8.022-3.593,8.022-8.029   v-17.557c0-4.436-3.594-8.031-8.022-8.031H194.05v-33.616h30.307c4.428,0,8.022-3.593,8.022-8.029v-17.557   c0-4.436-3.594-8.031-8.022-8.031H194.05V95.814h30.307c4.428,0,8.022-3.593,8.022-8.029V70.229c0-4.437-3.594-8.03-8.022-8.03   H194.05V31.37l96.807-0.101v67.217c0,19.653,15.934,35.604,35.587,35.604l65.862-0.188l0.741,296.924   C393.046,441.793,384.143,450.698,373.188,450.698z" /> <path d="M202.196,301.778v-41.087c0-4.429-3.592-8.021-8.021-8.021H171.89c-4.429,0-8.022,3.593-8.022,8.021v41.079l-12.395,36.415   c-3.468,10.149-1.804,21.425,4.445,30.164c6.249,8.723,16.382,13.933,27.114,13.933c10.734,0,20.868-5.21,27.117-13.933   c6.249-8.739,7.911-20.015,4.444-30.156L202.196,301.778z M197.019,358.957c-6.43,8.999-21.544,8.999-27.975,0   c-3.223-4.508-4.081-10.323-2.3-15.563l4.16-12.214h24.255l4.161,12.222C201.102,348.634,200.241,354.449,197.019,358.957z" /> </svg>
                                </button>
                            </div>
                        </div>
                        <div class="layout-fixed mgT10" ng-click="get_appointmentHistoryOnFilemanager(appointmentHistoryItem.id, appointmentHistoryItem.dateofappt)">
                            <div class="layout-w-1:2 pdL25" ng-if="filetypeAppointment=='All' || filetypeAppointment=='Photo'">
                                <div class="layout-fixed w-auto-i baseline">
                                    <div class="text-title-4">Captured photo</div>
                                    <div class="text pdL3">{{appointmentHistoryItem.countPhoto}}<span class="fz10 pdL2">file</span></div>
                                </div>
                            </div>
                            <div ng-if="filetypeAppointment=='All' || filetypeAppointment=='PDDs'">
                                <div class="layout-fixed w-auto-i baseline">
                                    <div class="text-title-4">Pdf</div>
                                    <div class="text pdL3">{{appointmentHistoryItem.countPdf}}<span class="fz10 pdL2">file</span></div>
                                </div>
                            </div>
                            <div ng-if="filetypeAppointment=='All' || filetypeAppointment=='Other'">
                                <div class="layout-fixed w-auto-i baseline">
                                    <div class="text-title-4">Other</div>
                                    <div class="text pdL3">{{appointmentHistoryItem.countOther}}<span class="fz10 pdL2">file</span></div>
                                </div>
                            </div>
                            <div ng-if="filetypeAppointment=='All' || filetypeAppointment=='url'">
                                <div class="layout-fixed w-auto-i baseline">
                                    <div class="text-title-4">Url</div>
                                    <div class="text pdL3">{{appointmentHistoryItem.countUrl}}<span class="fz10 pdL2">url</span></div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            </div>
        </ion-scroll>
    </div>
</div>
