<ion-scroll class="scroll-area" direction="y" has-bouncing="false" overflow-scroll="false">
    <ion-refresher pulling-text="Refreshing data" on-refresh="getSchedule(true)"></ion-refresher>
    <div class="box-setting-4 no-saperator" ng-repeat="mychedule in myschedule" ng-if="mychedule.dataAppointment != '' || mychedule.dataTask != ''" ng-init="parentIndex = $index">
        <div class="title clear">
            {{mychedule.date | date: 'MM/dd/yyyy'}}
            <div class="layout-fixed w-auto-i text-date-1 fz12-i clr-black lowercase-i right mgT5">
                <!--<div ng-bind-html="displayHourTime(calculateTimeWorked(value))"></div>-->
                <div ng-if="mychedule.workingTime == 'Off' "><span class="clr-red uppercase">{{mychedule.workingTime}}</span></div>
                <div ng-if="mychedule.workingTime != 'Off' "><span class="clr-green">{{mychedule.workingTimeFrom}}</span> - <span class="clr-red">{{mychedule.workingTimeTo}}</span></div>
            </div>
        </div>
        <div class="content content-in stripe-1">
            <div class="itm row-one-content pd0-i" ng-repeat="item in mychedule.dataMerge" ng-init="item.action=='notetasks' ? TaskIndex = item.position : AppointmentIndex = item.position ">
                <div class="layout-fixed">
                    <div class="w25px bdr-black-50" style="background-color:{{item.cancalled=='1'?'#F2E311':(item.statusInfo.name != 'Pending' ? (item.statusInfo.name == 'EnRoute' && item.detail != 'No CA' ? differentNoCaAndRouteColor : item.statusInfo.bgcolor ) : '')}}"></div>
                    <div class="v-top-i pd10 pdB8">
                        <div class="name clr-black" ng-if="item.action=='notetasks'">{{item.detail}}</div>
                        <div class="name clr-black" ng-if="item.action!='notetasks'">{{item.name}}</div>
                        <div class="text" ng-if="item.action!='notetasks'">{{item.titleInfo}}</div>
                        <div class="layout-fixed mgT20">
                            <div>
                                <div class="layout-fixed w-auto-i text-date-1 lowercase">
                                    <div>{{item.re_str | date: fshortDate}}</div>
                                    <div class="w16px text-center pdB2">
                                        <svg class="h6px" viewBox="0 0 14 14"> <g> <g> <path fill="#b1c7d7" d="M5.396,13.433C8.037,10.859,12,7,12,7S8.037,3.141,5.396,0.567C5.033,0.218,4.543,0,4,0    C2.896,0,2,0.896,2,2v10c0,1.104,0.896,2,2,2C4.543,14,5.033,13.782,5.396,13.433z" /> </g> </g> </svg>
                                    </div>
                                    <div>{{item.re_end | date: fshortDate}}</div>
                                </div>
                            </div>
                            <div>
                                <svg ng-if="item.hasjobsite" class="h20px clr-symbol" viewBox="0 0 60 60"> <path d="M0,0v9h1v51h18V48h38V9h3V0H0z M4,58H3V9h1V58z M8,58H6V9h2V58z M11,58h-1V9h1V58z M14,58h-1V9h1V58z M17,13v29v6v10h-1V9   h1V13z M27,42h-8V13h8V42z M53,44H31V30h-1v-5h1V11h22V44z M58,7h-1H19h-2H2V2h56V7z" style="fill: rgb(255, 255, 255);" /> <polygon points="51,13 33,13 33,25 40,25 40,30 33,30 33,42 51,42  " style="fill: rgb(255, 255, 255);" /> </svg>
                            </div>
                            <div class="w40px clear v-bottom-i">
                                <button class="app-item-next-icon bg-transparent pd0-i right biger-4-time" ng-if="item.action=='notetasks'" ng-click="editNotetasksFormMyschedule(item.id)" type="button"></button>
                                <button class="app-item-next-icon bg-transparent pd0-i right biger-4-time" ng-if="item.action!='notetasks'" onclick="callingPopAppDetail(this)" my-id="{{item.id}}" type="button"></button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</ion-scroll>
<script>
    function callingPopAppDetail($this) {
        var id = $($this).attr('my-id');
        scope.apppointment.getSchedulesCustomerInfo(id);
    }
</script>
