<ion-view view-title="考勤管理" cache-view="false" ng-init="init()">
    <ion-content>
        <div class="list">
            <div class="item item-divider"></div>
            <a class="item item-icon-right assertive" ng-click="addnew()">新增考勤
                <i class="icon ion-android-add"></i>
            </a>
            <div class="item item-divider"></div>
            <div class="workatd-setting-item">
                <div ng-repeat="item in settings">
                    <div>
                        <a class="item item-icon-right" href="#/workatd-settingdetail/{{item.id}}">
                            <span ng-if="item.isallcheck == 1">全员考勤</span>
                            <span ng-if="item.isallcheck == 0" ng-repeat="dept in item.workatddept">{{dept.dept__depname}}{{$last ? '' : '、'}}</span>
                            <i class="icon ion-chevron-right icon-accessory"></i>
                        </a>
                        <a class="item" href="#/workatd-settingdetail/{{item.id}}">
                            <div class="date1" ng-if="item.ischeckmonday == 1 && item.ischecktuesday == 1 && item.ischeckwednesday == 1
                            && item.ischeckthursday == 1 && item.ischeckfriday == 1 && item.ischecksaturday == 0 && item.ischecksunday == 0">工作日
                            </div>
                            <div class="date1" ng-if="!(item.ischeckmonday == 1 && item.ischecktuesday == 1 && item.ischeckwednesday == 1
                            && item.ischeckthursday == 1 && item.ischeckfriday == 1 && item.ischecksaturday == 0 && item.ischecksunday == 0)">
                                每周
                                <span ng-if="item.ischeckmonday == 1">一 </span>
                                <span ng-if="item.ischecktuesday == 1">二 </span>
                                <span ng-if="item.ischeckwednesday == 1">三 </span>
                                <span ng-if="item.ischeckthursday == 1">四 </span>
                                <span ng-if="item.ischeckfriday == 1">五 </span>
                                <span ng-if="item.ischecksaturday == 1">六 </span>
                                <span ng-if="item.ischecksunday == 1">日</span>
                            </div>
                            <div class="date2">
                                <span ng-if="item.am_ontime">上午上班: {{item.am_ontime | strtimeformat:item.am_ontime}}</span>
                                <span ng-if="item.am_offtime">上午下班: {{item.am_offtime | strtimeformat:item.am_offtime}}</span>
                            </div>
                            <div class="date2">
                                <span ng-if="item.pm_ontime">下午上班: {{item.pm_ontime | strtimeformat:item.pm_ontime}}</span>
                                <span ng-if="item.pm_offtime">下午下班: {{item.pm_offtime | strtimeformat:item.am_ontime}}</span>
                            </div>
                        </a>
                        <a class="item" ng-if="item.workatdcustomdate.length > 0">
                            自定义时间
                        </a>
                    </div>
                </div>
            </div>
        </div>
    </ion-content>
</ion-view>