<ion-view class="schedule" hide-nav-bar="true" view-title="Schedule">
    <ion-content id="schedule_page" scroll="false">
        <div class="app-main" id="main-content">
            <div compile-html="dataAppHtml.menuHeader" class="app-header"></div>
            <div class="box-setting-4 bg-header-1 no-saperator app-query-time">
                <div class="bg-overlay-1 pdTB15">
                    <div class="layout-fixed">
                        <div class="pdL50">
                            <button class="calendar-1 small bg-transparent" type="button" ng-model="dataAppHtml.scheduleDay" ion-datetime-picker date>
                                <svg class="h40px" viewBox="0 0 512 512" y="0px" x="0px"> <path d="M512,55.652v55.652v356.174C512,492.066,492.066,512,467.478,512H44.522  C19.933,512,0,492.066,0,467.478V111.304V55.652c0-12.295,9.966-22.261,22.261-22.261h467.478C502.034,33.391,512,43.357,512,55.652  z" style="fill:#327EBB;" /> <path d="M512,55.652v44.522v333.913c0,24.588-19.933,44.522-44.522,44.522H44.522  C19.933,478.609,0,458.675,0,434.087V100.174V55.652c0-12.295,9.966-22.261,22.261-22.261h467.478  C502.034,33.391,512,43.357,512,55.652z" style="fill:#333;" /> <path d="M0,111.304V55.652c0-12.295,9.966-22.261,22.261-22.261h467.478c12.295,0,22.261,9.966,22.261,22.261  v55.652H0z" style="fill:#327EBB;" /> <path d="M512,122.435H0v-22.261h512V122.435z" style="fill:#252525;" /> <path d="M111.304,11.13v55.652c0,6.147-4.983,11.13-11.13,11.13c-6.147,0-11.13-4.983-11.13-11.13V11.13  c0-6.147,4.983-11.13,11.13-11.13C106.321,0,111.304,4.983,111.304,11.13z M411.826,0c-6.147,0-11.13,4.983-11.13,11.13v55.652  c0,6.147,4.983,11.13,11.13,11.13c6.147,0,11.13-4.983,11.13-11.13V11.13C422.957,4.983,417.973,0,411.826,0z" style="fill:#FFF;" /> </svg>
                                <div class="date-area">
                                    <input type="hidden" name="" value="{{dataAppHtml.scheduleDay | date: 'yyyy-MM-dd'}}" id="scheduleDayValue" />
                                    <div class="layout-fixed full-h">
                                        <div id="scheduleDay">
                                            <div class="day"></div>
                                            <div class="month"></div>
                                        </div>
                                    </div>
                                </div>
                            </button>
                        </div>
                        <div class="w145px clear" ng-if="showButtonMap">
                            <div class="layout-fixed w-auto-i">
                                <div>
                                    <button class="button-field-1 white w40px h40px" onclick="redirectTo('map.html')">
                                        <svg class="h20px clr-symbol-clickable" viewBox="0 0 46.412 46.412"> <path d="M39.652,16.446C39.652,7.363,32.289,0,23.206,0C14.124,0,6.761,7.363,6.761,16.446c0,1.775,0.285,3.484,0.806,5.086h0  c0,0,1.384,6.212,15.536,24.742c8.103-10.611,12.018-17.178,13.885-20.857C38.67,22.836,39.652,19.756,39.652,16.446z   M23.024,27.044c-5.752,0-10.416-4.663-10.416-10.416c0-5.752,4.664-10.415,10.416-10.415s10.416,4.663,10.416,10.415  C33.439,22.381,28.776,27.044,23.024,27.044z" /> <path d="M23.206,46.412c-0.036-0.047-0.07-0.092-0.105-0.139c-0.036,0.047-0.07,0.091-0.106,0.139H23.206z" /> </svg>
                                    </button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="app-content">
                <div compile-html="dataAppHtml.schedulesMainContent" class="app-content-inner content-pd"></div>
            </div>
            <div class="schedule-app-create-button app-create-button show" ng-if="showAddnoteTask">
                <button class="button-add-plus-1 pd0-i w50px h50px" type="button" ng-click="openPopupAddScheduleNote('')"></button>
            </div>
        </div>

        <div class="app-content-popup-area">
            <div compile-html="dataAppHtml.popupScheduleFilter" id="popupScheduleFilter" class="app-content-popup"></div>
            <div compile-html="dataAppHtml.popupScheduleListView" id="popupScheduleListView" class="app-content-popup"></div>
            <div compile-html="dataAppHtml.popupAddScheduleListView" id="popupAddScheduleListView" class="app-content-popup"></div>
            <div compile-html="dataAppHtml.popupEditScheduleListView" id="popupEditScheduleListView" class="app-content-popup"></div>
            <div compile-html="dataAppHtml.confirmDeleteScheduleListView" id="confirmDeleteScheduleListView" class="app-confirm-popup"></div>
            <div compile-html="dataAppHtml.popupScheduleToSchedule" id="popupScheduleToSchedule" class="app-content-popup"></div>
            <div ng-controller="notetasksController">
                <div compile-html="dataAppHtml.popupAddScheduleNote" id="popupAddScheduleNote" class="app-content-popup"></div>
                <div compile-html="dataAppHtml.popupEditScheduleNote" id="popupEditScheduleNote" class="app-content-popup"></div>
                <div compile-html="dataAppHtml.popupNoteTaskLog" id="popupNoteTaskLog" class="app-content-popup"></div>
            </div>
            <div compile-html="dataAppHtml.scheduleContent" id="scheduleContent" class="app-content-popup"></div>
            <div id="scheduleContentAppointmentMoveTo" class="app-content-popup">
                <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">Schedule {YYYY-MM-DD}</div>
                                <div class="text-title-header-1 nowrap mgT5">{Employee name}</div>
                            </div>
                        </div>
                    </div>
                    <button type="button" class="popup-back-button bg-transparent pd0-i biger-3-time" ng-click="closeTarget('#scheduleContentAppointmentMoveTo')">
                        <svg class="h20px" viewBox="0 0 129 129"> <path fill="#FFFFFF" d="m88.6,121.3c0.8,0.8 1.8,1.2 2.9,1.2s2.1-0.4 2.9-1.2c1.6-1.6 1.6-4.2 0-5.8l-51-51 51-51c1.6-1.6 1.6-4.2 0-5.8s-4.2-1.6-5.8,0l-54,53.9c-1.6,1.6-1.6,4.2 0,5.8l54,53.9z" /> </svg>
                    </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="scrollScheduleContentAppointmentMoveTo" on-scroll="scrollContent('scrollScheduleContentAppointmentMoveTo')">
                            <div class="box-setting-4 no-saperator">
                                <div class="title">Move (appointment | schedule note)</div>
                                <div class="content content-in">
                                    <ul class="lst-schedule-time">
                                        <!-- Neu la Appointment -->
                                        <li>
                                            <div class="layout-fixed">
                                                <div class="appoinment-cell" style="border-color: #3ffe23">
                                                    <div class="bar" style="background: #134CA2"></div>
                                                    <div class="light" style="background: #274E13"></div>
                                                </div>
                                                <div>
                                                    <div class="time pdLR10-i">
                                                        <div class="bar-area"></div>
                                                        <div class="mark-start"><span class="text-date-1 lowercase pdL10">12:00 pm</span></div>
                                                        <div class="mark-end"><span class="text-date-1 lowercase pdR10">03:00 pm</span></div>
                                                    </div>
                                                    <div class="schedule-content layout-fixed pdTB5 pdLR10">
                                                        <div class="text-content">
                                                            <div>Cai nay cho Appoinment</div>
                                                            <div>Instruction</div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                            <div class="box-setting-4 no-saperator">
                                <div class="title">To</div>
                                <div class="content content-in">
                                    <!--Appoinment cua thang nao thi thang do di chuyen len dau tien va co class 'disabled'-->
                                    <div class="itm itm-chooseable row-one-content no-saperator disabled">
                                        <input name="rd_" id="" type="radio" />
                                        <div class="background"></div>
                                        <div class="prevent layout-fixed">
                                            <div class="w50px v-top-i">
                                                <div class="box-image-thumnail-2 w40px h40px">
                                                    <a href="javascript:void(0)" class="image-outer">
                                                        <img src="https://app.reliablegaragedoor.com/upload/users/glinkingcrm1-secret_secret@yahoo.com/top_secret_image_classic_round_sticker-rbde268f8b54a4aeaa47ca03857e888f3_v9waf_8byvr_512.png">
                                                    </a>
                                                </div>
                                            </div>
                                            <div class="v-top-i">
                                                <div class="name clr-black capitalize">!!SECRET SECRET!!</div>
                                                <div class="layout-fixed mgT8">
                                                    <div>
                                                        <div class="layout-fixed w-auto-i left">
                                                            <div class="text-title-4">Apointment:</div>
                                                            <div class="text-date-1 pdL3">6<span class="fz10 pdL2">appts</span></div>
                                                        </div>
                                                    </div>
                                                    <div>
                                                        <div class="layout-fixed w-auto-i left">
                                                            <div class="text-title-4">Schedule notes:</div>
                                                            <div class="text-date-1 pdL3">1<span class="fz10 pdL2">notes</span></div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="itm itm-chooseable row-one-content no-saperator">
                                        <input name="rd_" id="" type="radio" />
                                        <div class="background"></div>
                                        <div class="prevent layout-fixed">
                                            <div class="w50px v-top-i">
                                                <div class="box-image-thumnail-2 w40px h40px">
                                                    <a href="javascript:void(0)" class="image-outer">
                                                        <img src="https://app.reliablegaragedoor.com/upload/users/glinkingcrm1-secret_secret@yahoo.com/top_secret_image_classic_round_sticker-rbde268f8b54a4aeaa47ca03857e888f3_v9waf_8byvr_512.png">
                                                    </a>
                                                </div>
                                            </div>
                                            <div class="v-top-i">
                                                <div class="name clr-black capitalize">!!INSTALL SECRET!!</div>
                                                <div class="layout-fixed mgT8">
                                                    <div>
                                                        <div class="layout-fixed w-auto-i left">
                                                            <div class="text-title-4">Apointment:</div>
                                                            <div class="text-date-1 pdL3">2<span class="fz10 pdL2">appts</span></div>
                                                        </div>
                                                    </div>
                                                    <div>
                                                        <div class="layout-fixed w-auto-i left">
                                                            <div class="text-title-4">Schedule notes:</div>
                                                            <div class="text-date-1 pdL3">0<span class="fz10 pdL2">notes</span></div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="itm itm-chooseable row-one-content no-saperator">
                                        <input name="rd_" id="" type="radio" />
                                        <div class="background"></div>
                                        <div class="prevent layout-fixed">
                                            <div class="w50px v-top-i">
                                                <div class="box-image-thumnail-2 w40px h40px">
                                                    <a href="javascript:void(0)" class="image-outer">
                                                        <img src="https://app.reliablegaragedoor.com/upload/users/glinkingcrm1-secret_secret@yahoo.com/top_secret_image_classic_round_sticker-rbde268f8b54a4aeaa47ca03857e888f3_v9waf_8byvr_512.png">
                                                    </a>
                                                </div>
                                            </div>
                                            <div class="v-top-i">
                                                <div class="name clr-black capitalize">Dai ca tuan em</div>
                                                <div class="layout-fixed mgT8">
                                                    <div>
                                                        <div class="layout-fixed w-auto-i left">
                                                            <div class="text-title-4">Apointment:</div>
                                                            <div class="text-date-1 pdL3">2<span class="fz10 pdL2">appts</span></div>
                                                        </div>
                                                    </div>
                                                    <div>
                                                        <div class="layout-fixed w-auto-i left">
                                                            <div class="text-title-4">Schedule notes:</div>
                                                            <div class="text-date-1 pdL3">0<span class="fz10 pdL2">notes</span></div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </ion-scroll>
                    </div>
                </div>
                <div class="app-control">
                    <div class="layout-fixed full-h pdT2">
                        <div class="full-h">
                            <button type="button" class="button-form-field-1 darkgray position-left full" ng-click="closeTarget('#scheduleContentAppointmentMoveTo');">
                                Cancel
                            </button>
                        </div>
                        <div class="full-h">
                            <button class="button-form-field-1 position-right full">
                                OK
                            </button>
                        </div>
                    </div>
                </div>
            </div>
            <div compile-html="dataAppHtml.scheduleDetailEdit" id="scheduleDetailEdit" class="schedule-detail-popup app-content-popup {{appIsCancel != 0 ? 'cancel':''}}"></div><!--Them class Cancel khi Appointmt bi huy-->
            <div id="optionScheduleEstimateInvoiceManagerment" class="app-confirm-popup" compile-html="dataAppHtml.optionScheduleEstimateInvoiceManagerment"></div>
            <div compile-html="dataAppHtml.optionScheduleDetail" id="optionScheduleDetail" class="app-confirm-popup"></div>
            <div compile-html="dataAppHtml.optionScheduleDetailFileManagement" id="optionScheduleDetailFileManagement" class="app-confirm-popup"></div>
            <div compile-html="dataAppHtml.popupScheduleDetailFileManagementDetail" id="popupScheduleDetailFileManagementDetail" class="app-content-popup"></div>
            <div compile-html="dataAppHtml.schedulesSearch" class="app-setting appoinment-search"></div>

            <div id="popupScheduleDetailCallRecording" class="app-content-popup">
                <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 pdLR40"></div>
                                <div class="text-title-header-1 nowrap mgT5">Appointment call recording</div>
                            </div>
                        </div>
                    </div>
                    <button type="button" class="close-audio popup-back-button bg-transparent pd0-i biger-3-time" ng-click="closeTarget('#popupScheduleDetailCallRecording')">
                        <svg class="h20px" viewBox="0 0 129 129"> <path fill="#FFFFFF" d="m88.6,121.3c0.8,0.8 1.8,1.2 2.9,1.2s2.1-0.4 2.9-1.2c1.6-1.6 1.6-4.2 0-5.8l-51-51 51-51c1.6-1.6 1.6-4.2 0-5.8s-4.2-1.6-5.8,0l-54,53.9c-1.6,1.6-1.6,4.2 0,5.8l54,53.9z" /> </svg>
                    </button>
                </div>
                <div class="app-content">
                    <div class="app-content-inner content-pd">
                        <div class="absolute full-w fixed-bottom-left pdB20">
                            <div id="callRecordAudioArea" class="w300px center"></div>
                        </div>
                    </div>
                </div>
            </div>

            <div compile-html="dataAppHtml.popupScheduleDetailFileManagementDetailOfHistory" id="popupScheduleDetailFileManagementDetailOfHistory" class="app-content-popup"></div>
            <div compile-html="dataAppHtml.popupAddScheduleDetailFileManagementDetail" id="popupAddScheduleDetailFileManagementDetail" class="app-content-popup"></div>
            <div compile-html="dataAppHtml.popupFileViewerSchedule" id="popupFileViewerSchedule" class="app-content-popup"></div>
            <div compile-html="dataAppHtml.optionFileDetailSchedule" id="optionFileDetailSchedule" class="app-confirm-popup"></div>
            <div compile-html="dataAppHtml.popupScheduleDetailDowntime" id="popupScheduleDetailDowntime" class="app-content-popup"></div>
            <div compile-html="dataAppHtml.popupAddScheduleDetailDowntime" id="popupAddScheduleDetailDowntime" class="app-content-popup"></div>
            <div compile-html="dataAppHtml.popupScheduleDetailJobStatus" id="popupScheduleDetailJobStatus" class="app-content-popup"></div>
            <div id="popupAppointmentUrl" compile-html="dataAppHtml.popupAppointmentUrl" class="app-content-popup"></div>
            <div id="popupAppointmentAddUrl" compile-html="dataAppHtml.popupAppointmentAddUrl" class="app-content-popup"></div>
            <div id="confirmChangeJobStatus" class="app-confirm-popup">
                <div class="overlay-area" ng-click="closeTarget('#confirmChangeJobStatus')"></div>
                <div class="content-area popup-2">
                    <div class="title">
                        <div class="icon">
                            <svg class="h20px" viewBox="0 0 60 60"> <path d="M14,36C8.486,36,4,40.486,4,46s4.486,10,10,10s10-4.486,10-10S19.514,36,14,36z M14,54c-4.411,0-8-3.589-8-8s3.589-8,8-8   s8,3.589,8,8S18.411,54,14,54z" /> <path d="M46,32H14C6.28,32,0,38.28,0,46s6.28,14,14,14h32c7.72,0,14-6.28,14-14S53.72,32,46,32z M46,58H14C7.383,58,2,52.617,2,46   s5.383-12,12-12h32c6.617,0,12,5.383,12,12S52.617,58,46,58z" /> <path d="M14,28h32c7.72,0,14-6.28,14-14S53.72,0,46,0H14C6.28,0,0,6.28,0,14S6.28,28,14,28z M46,4c5.514,0,10,4.486,10,10   s-4.486,10-10,10s-10-4.486-10-10S40.486,4,46,4z" /> </svg>
                        </div>
                        Tieu de
                    </div>
                    <div class="content">
                        Noi dung
                        <div class="layout-fixed mgT10">
                            <div>
                                <div class="input-form-field-1">
                                    <input class="h32px" type="text" name="" value="" />
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="buttons">
                        <div class="layout-fixed h40px pdLR10">
                            <div class="full-h">
                                <button class="button-form-field-1 position-left darkgray full" type="button">
                                    Cancel
                                </button>
                            </div>
                            <div class="full-h">
                                <button class="button-form-field-1 position-right full" type="button">
                                    Submit
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div compile-html="dataAppHtml.popupScheduleDetailJobSites" id="popupScheduleDetailJobSites" class="app-content-popup"></div>
            <div compile-html="dataAppHtml.popupScheduleDetailHistories" id="popupScheduleDetailHistories" class="app-content-popup"></div>
            <div compile-html="dataAppHtml.customerDetailPopupAppointmentHistoryViewLog" id="customerDetailPopupAppointmentHistoryViewLog" class="app-content-popup"></div>
            <div compile-html="dataAppHtml.popupScheduleDetailFileManagement" id="popupScheduleDetailFileManagement" class="app-content-popup"></div>
            <div compile-html="dataAppHtml.scheduleEditModal" id="scheduleEditModal" class="app-content-popup"></div>
            <div compile-html="dataAppHtml.schedulesPopupViewMessLogmodal" id="schedulesPopupViewMessLogmodal" class="app-content-popup"></div>

            <div compile-html="dataAppHtml.schedulesPopupConfirmChangeFielworker" id="schedulesPopupConfirmChangeFielworker" class="app-confirm-popup"></div>

            <div compile-html="dataAppHtml.popupPendingToEnroutemodal" id="popupPendingToEnroutemodal" class="app-content-popup popup-center"></div>
            <div compile-html="dataAppHtml.popupEnrouteToArivemodal" id="popupEnrouteToArivemodal" class="app-content-popup popup-center"></div>
            <div compile-html="dataAppHtml.popupAriveToWorkingmodal" id="popupAriveToWorkingmodal" class="app-content-popup popup-center"></div>
            <div compile-html="dataAppHtml.popupRemindersmodal" id="popupRemindersmodal" class="app-content-popup popup-center"></div>
            <div compile-html="dataAppHtml.popupWorkingToFinishmodal" id="popupWorkingToFinishmodal" class="app-content-popup popup-center"></div>
            <div compile-html="dataAppHtml.popupPendingToEnrouteCAmodal" id="popupPendingToEnrouteCAmodal" class="app-content-popup popup-center"></div>
            <div compile-html="dataAppHtml.popupRetrySentMessegemodal" id="popupRetrySentMessegemodal" class="app-content-popup popup-center"></div>
            <div compile-html="dataAppHtml.popupAppointmentDetailCustomerFlagNote" id="popupAppointmentDetailCustomerFlagNote" class="app-content-popup popup-center"></div>
            <div compile-html="dataAppHtml.popupAppointmentDetailCustomerAddFlagNote" id="popupAppointmentDetailCustomerAddFlagNote" class="app-content-popup popup-center"></div>
            <div compile-html="dataAppHtml.popupAppointmentDetailAddress" id="popupAppointmentDetailAddress" class="app-content-popup"></div>
            <div compile-html="dataAppHtml.popupAppointmentDetailOrderOption" id="popupAppointmentDetailOrderOption" class="app-content-popup popup-center"></div>
            <div compile-html="dataAppHtml.popupAppointmentDetailOrderHistory" id="popupAppointmentDetailOrderHistory" class="app-content-popup"></div>
            <div compile-html="dataAppHtml.popupAppointmentDetailPhone" id="popupAppointmentDetailPhone" class="app-content-popup"></div>
            <div compile-html="dataAppHtml.popupAppointmentDetailEmail" id="popupAppointmentDetailEmail" class="app-content-popup popup-center"></div>
            <div compile-html="dataAppHtml.popupAppointmentDetailZillow" id="popupAppointmentDetailZillow" class="app-content-popup popup-center"></div>
            <div compile-html="dataAppHtml.popupAppointmentDetailReplaceAddressConfirm" id="popupAppointmentDetailReplaceAddressConfirm" class="app-content-popup popup-center"></div>
            <div compile-html="dataAppHtml.popupAppointmentDetailRevertAppointmentConfirm" id="popupAppointmentDetailRevertAppointmentConfirm" class="app-content-popup popup-center"></div>
            <div compile-html="dataAppHtml.popupAppointmentDetailJobStatusChat" id="popupAppointmentDetailJobStatusChat" class="app-content-popup popup-center"></div>
            <div compile-html="dataAppHtml.photoViewer" id="photoViewer" class="app-content-popup files-viewer-popup"></div>

            <div compile-html="dataAppHtml.popupAppointmentDetailTakePictureOption" id="popupAppointmentDetailTakePictureOption" class="app-content-popup popup-center"></div>
            <div compile-html="dataAppHtml.pdfViewer" id="pdfViewer" class="app-content-popup files-viewer-popup"></div>
            <div compile-html="dataAppHtml.popupAppointmentDetailAddEditWorkingInvoice" id="popupAppointmentDetailAddEditWorkingInvoice" class="app-content-popup"></div>
            <div compile-html="dataAppHtml.schedulesPopupConfirmDeleteFlagNote" id="schedulesPopupConfirmDeleteFlagNote" class="app-content-popup popup-center"></div>
            <div compile-html="dataAppHtml.popupConfirmAddWorkingInvoice" id="popupConfirmAddWorkingInvoice" class="app-content-popup popup-center"></div>
            <div ng-controller="checklistCtrl">
                <div compile-html="dataAppHtml.checklistPopup" class="app-content-popup" id="checklistPopup"></div>
                <div compile-html="dataAppHtml.checklistPopupConfirm" class="app-confirm-popup" id="checklistPopupConfirm"></div>
                <div compile-html="dataAppHtml.selectInvoice" class="app-content-popup" id="selectInvoice"></div>
                <form ng-submit="Add_Payment()" compile-html="dataAppHtml.addpayment" class="app-content-popup" id="addpayment" novalidate="" name="formPaymentAdd"></form>
                <div id="checklistPopupSubmitConfirm" class="app-confirm-popup" ng-include="'templates/dashboard/checklist/submit.tpl'"></div>
            </div>
        </div>
    </ion-content>
</ion-view>
