import{e as g}from"./chunk-RBSSJWML.js";import{a as b}from"./chunk-WFZJP5WR.js";import{J as u}from"./chunk-YSQLW2JA.js";import{hc as y}from"./chunk-NVJ2ZZFT.js";import{Aa as r,Dc as m,_a as d,ab as p,bb as f,dd as x,ya as c}from"./chunk-SKPDQO4E.js";var h=`<div class="row mx-0 my-2 py-2 bg-white" *ngIf="userCaptions && summary" (click)="onClicked($event)"
  [ngClass]="{'cursor-pointer': showDays, 'bg-visible-days':visibleDays}">
  <div class="col-xl-3 col-lg-12">
    <armon-captionlines [captionlines]="userCaptions" [showBorder]="false">
    </armon-captionlines>
  </div>
  <div class="col-xl-9 col-lg-12">
    <div class="row h-100">
      <div class="col-2 d-flex flex-column justify-content-center b-l-2">
        <span class="text-xl"
          [ngClass]="{'text-bold': summary.workDaysCount > 0}">{{summary.workDaysCount>0?summary.workDaysCount:"-"}}</span>
        <span class="text-xs text-black-50">{{'WIDGET.PERSONNEL_WORKING_DAYS'|translate}}</span>
      </div>
      <div class="col-2 d-flex flex-column justify-content-center b-l-2">
        <span class="text-xl"
          [ngClass]="{'text-bold': summary.arrivedOnTimeDaysCount > 0}">{{summary.arrivedOnTimeDaysCount>0?summary.arrivedOnTimeDaysCount:"-"}}</span>
        <span class="text-xs text-black-50">{{'WIDGET.PERSONNEL_ARRIVED_ON_TIME_DAYS'|translate}}</span>
      </div>
      <div class="col-2 d-flex flex-column justify-content-center b-l-2">
        <span class="text-xl"
          [ngClass]="{'text-bold text-danger': summary.lateArrivedDaysCount > 0}">{{summary.lateArrivedDaysCount>0?summary.lateArrivedDaysCount:"-"}}</span>
        <span class="text-xs text-black-50">{{'WIDGET.PERSONNEL_CAME_LATE_DAYS'|translate}}</span>
      </div>
      <div class="col-2 d-flex flex-column justify-content-center b-l-2">
        <span class="text-xl"
          [ngClass]="{'text-bold text-danger': summary.earlyLeftDaysCount > 0}">{{summary.earlyLeftDaysCount>0?summary.earlyLeftDaysCount:"-"}}</span>
        <span class="text-xs text-black-50">{{'WIDGET.PERSONNEL_EARLY_OUT_DAYS'|translate}}</span>
      </div>
      <div class="col-2 d-flex flex-column justify-content-center b-l-2">
        <span class="text-xl"
          [ngClass]="{'text-bold text-success': summary.lateLeftDaysCount > 0}">{{summary.lateLeftDaysCount>0?summary.lateLeftDaysCount:"-"}}</span>
        <span class="text-xs text-black-50">{{'WIDGET.PERSONNEL_EXTRA_WORKING_DAYS'|translate}}</span>
      </div>
      <div class="col-2 d-flex flex-column justify-content-center b-l-2">
        <span class="text-xl"
          [ngClass]="{'text-bold color-ppermission': summary.ppermissionCount > 0}">{{summary.ppermissionCount>0?summary.ppermissionCount:"-"}}</span>
        <span class="text-xs text-black-50">{{'WIDGET.PACS_PERMISSION_COUNT'|translate}}</span>
      </div>
    </div>
  </div>
</div>
<div class="row mt-3" *ngIf="visibleDays">
  <div class="col-12 ps-4">
    <ng-container *ngFor="let record of records">
      <armon-report-pacs-daily-user [record]="record" [day]="record.day" [viewMode]="2"></armon-report-pacs-daily-user>
    </ng-container>
    <!-- <armon-report-entry-exit-user-table [items]="items"></armon-report-entry-exit-user-table> -->
  </div>
  <div class="col-12 d-flex justify-content-center" *ngIf="records && records.length >0">
    <button class="btn btn-sm btn-outline-primary my-2" (click)="onClicked($event)">
      <cds-icon shape="angle" direction="up" class="me-2"></cds-icon>{{'BUTTON.CLOSE'|translate}}
    </button>
  </div>
</div>`;var v=`.justify-content-center{-webkit-box-pack:center;-moz-box-pack:center;-webkit-flex-pack:center;-ms-flex-pack:center;-moz-justify-content:center;-webkit-justify-content:center;justify-content:center}.justify-content-flex-end{-webkit-box-pack:end;-moz-box-pack:end;-webkit-flex-pack:end;-ms-flex-pack:end;-moz-justify-content:flex-end;-webkit-justify-content:flex-end;justify-content:flex-end}.card-footer{padding:.28rem .7rem}.alert{font-size:.756rem}@media screen and (min-width: 992px){.modal-xxl{max-width:1640px}}@media screen and (min-width: 1200px){.modal-xxxl{max-width:1860px}}.modal-fs{max-width:none;position:absolute;margin:auto;inset:16px;height:100vh;display:flex}.btn-link{text-decoration:none}.btn-link:hover{text-decoration:underline}.invalid-feedback{margin-top:0!important;font-size:.672rem!important}.filterArea{background:#fff;border:1px solid rgb(235,235,235);padding:12px;border-radius:4px;box-shadow:0 3px 6px #ebebeb;-moz-transition:width .25s ease;-webkit-transition:width .25s ease;-o-transition:width .25s ease;transition:width .25s ease}.filterArea>div:first-child>p:first-child{margin-top:0}.filterSummary>p:first-child{margin-top:0}.filterContent>div{margin-bottom:12px}.filterContent clr-checkbox{margin-top:12px}.filterButtons{margin-top:12px}.filterSmallButtons>button:last-child{margin-right:0!important}.filterMoreInfo p{margin-top:0}.filterMoreInfo div{margin-bottom:8px}.filterMoreInfo div:last-child{margin-bottom:0}.resultArea{position:relative}.resultDisabled{position:absolute;width:100%;height:100%;background:linear-gradient(to top,#f3f4f6,transparent 150%)}.required:after{content:"*";font-size:1.1em;color:#c92100;margin-left:6px}.report-data-container{height:100%;display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-moz-box-orient:vertical;-webkit-flex-direction:column;-moz-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.report-data-container .report-filter-container{margin-bottom:.2rem}.report-data-container .report-data-table-container{overflow-y:auto;overflow-x:hidden;-webkit-flex-grow:1;-webkit-box-flex:1;-moz-flex-grow:1;-ms-flex-positive:1;flex-grow:1;height:0;display:block}.report-multi-data-cell{display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-moz-box-orient:vertical;-webkit-flex-direction:column;-moz-flex-direction:column;-ms-flex-direction:column;flex-direction:column;line-height:initial!important}.report-multi-data-cell .title-text{font-size:1.008rem}.report-multi-data-cell .main-text{font-size:.84rem}.report-multi-data-cell .sub-text{font-size:.672rem;color:#aaa}.report-form-label{font-size:.672rem;line-height:.84rem;font-weight:500;margin-top:.3rem;margin-bottom:.1rem!important}.report-form-label label{margin-bottom:0!important}.report-form-icon{position:absolute;color:#0a2a5a;right:15px;bottom:6px;cursor:pointer}.report-checkbox-label{font-size:.672rem}.bg-visible-days{background-color:#e6f0f6!important}
`;var C=function(o,t,s,i){var a=arguments.length,e=a<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,s):i,n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(o,t,s,i);else for(var l=o.length-1;l>=0;l--)(n=o[l])&&(e=(a<3?n(e):a>3?n(t,s,e):n(t,s))||e);return a>3&&e&&Object.defineProperty(t,s,e),e},w=class{reportService;userCaptions;summary;startDay;endDay;userId;workStatusFilter;showDays=!1;request;records;visibleDays=!1;constructor(t){this.reportService=t}ngOnInit(){}ngAfterViewInit(){}ngOnDestroy(){}onClicked(t){this.showDays&&(this.visibleDays?this.visibleDays=!1:this.records?this.visibleDays=!0:this.getReportData())}getReportData(){this.showDays&&this.userId&&(this.request=y.getEmptyModel(),this.request.dateRange.startDateTime=m.fromISO(this.startDay).startOf("day").toFormat("yyyy-MM-dd"),this.request.dateRange.endDateTime=m.fromISO(this.endDay).endOf("day").toFormat("yyyy-MM-dd"),this.request.userId=this.userId,this.request.workStatusFilter=this.workStatusFilter,this.request.paginationRequest.take=31,this.reportService.getPacsWorkingDetailEmployee(this.request).subscribe(t=>{this.records=t.items,this.visibleDays=!0}))}static ctorParameters=()=>[{type:u}];static propDecorators={userCaptions:[{type:r}],summary:[{type:r}],startDay:[{type:r}],endDay:[{type:r}],userId:[{type:r}],workStatusFilter:[{type:r}],showDays:[{type:r}]}};w=C([c({selector:"armon-report-entry-exit-user-range-summary",template:h,standalone:!0,imports:[f,d,b,p,g,x],styles:[v]})],w);export{w as a};
