import{b as Ze}from"./chunk-MFZ3EXVF.js";import{a as tt}from"./chunk-R6MVWAVG.js";import{c as ue,d as Xe}from"./chunk-SDHD5Z3H.js";import{a as Ye,b as q,c as Y,f as U,g as he,h as C,i as fe,n as F,p as G,s as X,v as ge}from"./chunk-JNXLVPIF.js";import{a as qe}from"./chunk-PWALQELY.js";import{a as pe}from"./chunk-D4RZOGGF.js";import{a as Qe}from"./chunk-PMJFQIXL.js";import{a as Je}from"./chunk-IMWNGRKR.js";import{a as et}from"./chunk-C7NDY7PV.js";import{a as me}from"./chunk-WFZJP5WR.js";import{$ as Be,J as N,Mb as de,Ob as A,Y as He,Z as K,_ as J,aa as _e,ba as Ve,f as Ue,g as Fe,j as Ge,la as le,oa as $e}from"./chunk-YSQLW2JA.js";import{$ as De,$b as Ke,ga as $,ha as T,hc as ce,ia as O,ja as j,ra as Re,t as Ce,u as re,v as V,w as I,x as se}from"./chunk-NVJ2ZZFT.js";import{$c as ze,Aa as f,Ba as R,Dc as u,Hb as ie,Pd as je,Qd as We,Qf as z,Rd as ne,Sd as ae,W as Oe,Wb as Me,Yg as W,_a as Z,ab as L,bb as w,bf as oe,cb as Q,cd as Ne,db as ee,dd as S,eb as Le,fb as _,g as Te,gb as te,ha as D,hd as P,jb as M,ya as v}from"./chunk-SKPDQO4E.js";var it=`<ng-container *ngIf="visibleComponent">

  <ng-container *ngIf="noRecord; then noRecordView else showContentView"></ng-container>

  <ng-template #showContentView>
    <div class="main-container" (click)="onCardClicked($event)" [attr.clickable]="!showDetail && !disabled"
      [ngClass]="{'shadow-box-1': !disabled}">
      <div class="left-side" (click)="onLeftSideClicked($event)" click-stop-propagation
        [attr.clickable]="showDetail && !disabled">
        <ng-container [ngSwitch]="viewMode">
          <ng-container *ngSwitchCase="1">
            <armon-captionlines *ngIf="record.userCaption" [showBorder]="false" [captionlines]="record.userCaption">
            </armon-captionlines>
            <armon-pacs-user-score class="mt-2 mx-1" [score]="record.score?record.score:0"></armon-pacs-user-score>
            <ng-template *ngTemplateOutlet="reportButtonsTemplate">
            </ng-template>
          </ng-container>
          <ng-container *ngSwitchCase="2">
            <div class="day-text-container">
              <div class="w-100 d-flex align-items-baseline justify-content-between">
                <armon-pacs-user-score class="mt-2 mx-1" [score]="record.score?record.score:0"></armon-pacs-user-score>
                <span class="day-text">{{record.dayText}}</span>
              </div>
              <span class="text-xs text-italic color-gray" *ngIf="record.isMultiDay">
                {{record.dayRange.start|date:'d MMMM'}} - {{record.dayRange.end|date:'d MMMM'}}
              </span>
              <span class="weekday-text">{{record.dayWeekdayText}}</span>
              <span class="year-text">{{record.dayYearText}}</span>
            </div>
            <ng-template *ngTemplateOutlet="reportButtonsTemplate">
            </ng-template>
          </ng-container>
        </ng-container>
      </div>
      <div class="right-side">
        <div><span class="text-xs line-height-xs text-italic color-gray-dark"
            *ngIf="record.workplanDuration && record.workplanDuration>0">{{'REPORT.PACS_COL_WORKPLAN_DURATION'|translate}}
            : {{record.workplanDuration|minuteFormatter}}</span></div>
        <armon-percentage-graph [data]="graphData"></armon-percentage-graph>
        <div class="d-flex align-items-center pt-2">
          <ng-container *ngFor="let durationDataItem of durationData">
            <armon-duration-formatter [data]="durationDataItem"></armon-duration-formatter>
          </ng-container>
          <div class="d-flex flex-column align-items-end ms-auto entry-exit-container">
            <div class="entry-state" [ngStyle]="{'background-color': record.statusColor}" *ngIf="record.statusText">
              {{record.statusText|translate}}
            </div>
            <div class="entry-exit-data-cell">
              <div class="enter-container">
                <span *ngIf="record.firstStart"
                  class="entry-exit-hour-text">{{record.firstStartText}}&nbsp;-&nbsp;</span>
                <span *ngIf="!record.firstStart" class="entry-exit-main-text">__:__&nbsp;-&nbsp;</span>
              </div>
              <div class="exit-container">
                <span *ngIf="record.lastLeave" class="entry-exit-hour-text">{{record.lastLeaveText}}</span>
                <span *ngIf="!record.lastLeave" class="entry-exit-main-text">__:__</span>
              </div>
            </div>
          </div>
        </div>
        <div *ngIf="record.hasConflicts">
          <cds-icon shape="conflict" class="me-2 text-danger"></cds-icon><span
            class="text-xs text-danger">{{'PACS.CONFLICT_SEGMENTS'|translate}}</span>
        </div>
        <div *ngIf="record.unpairedAccesses && record.unpairedAccesses.length>0">
          <cds-icon shape="upload" direction="right" class="me-2 text-primary">
          </cds-icon><span class="text-xs text-primary">{{'PACS.UNPAIRED_HAS_SEGMENTS_TITLE'|translate}}</span>
        </div>
        <div *ngIf="record.hasRejectedPermissions">
          <cds-icon shape="vacation" class="me-2 text-danger"></cds-icon><span
            class="text-xs text-danger">{{'PACS.PPERMISSION_STATUS_REJECTED_INFO'|translate}}</span>
        </div>
        <div *ngIf="record.hasWaitingPermissions">
          <cds-icon shape="vacation" class="me-2 color-ppermission"></cds-icon><span
            class="text-xs color-ppermission">{{'PACS.PPERMISSION_STATUS_WAITING_INFO'|translate}}</span>
        </div>
        <div *ngIf="!showDetail && record.usedPermissions && record.usedPermissions.length>0"
          class="w-100 d-flex flex-column mt-2">
          <ng-container *ngFor="let usedPermission of record.usedPermissions">
            <div class="d-flex align-items-end">
              <cds-icon *ngIf="usedPermission.typeDefinition" [attr.shape]="usedPermission.typeDefinition.icon"
                class="me-2 color-ppermission" nz-tooltip
                nzTooltipTitle="{{usedPermission.typeDefinition.description|translate}}"></cds-icon>
              <span class="text-xs fw-medium color-ppermission me-2">{{usedPermission.name}}</span>
              <span class="text-xs color-ppermission">{{usedPermission.rangeText}}</span>
            </div>
          </ng-container>
        </div>
        <div *ngIf="showDetail" class="w-100 mt-2">
          <armon-pacs-timeline-user [day]="day" [userId]="record.userId" [multiDay]="record.isMultiDay"
            (dataLoaded)="onDataLoaded($event)" (interactionStarted)="onInteractionStarted($event)"
            (routingStarted)="onRoutingStarted($event)" (interactionFinished)="onInteractionFinished($event)">
          </armon-pacs-timeline-user>
        </div>
        <div class="d-flex align-items-stretch">
          <div *ngIf="record.waitingRecalculation">
            <span>
              <span class="spinner-grow spinner-grow-sm text-secondary"></span>
              <span class="text-40rem text-italic color-gray ms-1">{{'PACS.WAITING_CALCULATION_WAIT'|translate}}&nbsp;(
                <ng-container *ngFor="let recalculationReasonText of record.recalculationReasonTexts">
                  <span class="comma">{{recalculationReasonText|translate}}</span>
                </ng-container>)
              </span>
            </span>
          </div>
          <div class="d-flex justify-content-end flex-grow-1 mt-3" *ngIf="showDetail">
            <button class="btn btn-outline-info btn-sm me-2" (click)="showDetail=false" *ngIf="!disabled"
              click-stop-propagation>{{'BUTTON.CLOSE' | translate}}</button>
            <button class="btn btn-outline-primary btn-sm" *ngIf="visibleAddPPermissionButton" click-stop-propagation
              (click)="onAddPPermissionClicked($event)">{{'PACS.ADD_USER_PPERMISSION' | translate}}</button>
          </div>
        </div>
      </div>
    </div>
  </ng-template>

  <ng-template #noRecordView>
    <div class="no-record-container">
      <div class="left-side">
        <span class="day-text">{{record.dayText}} {{record.dayWeekdayText}}</span>
      </div>
    </div>
  </ng-template>

</ng-container>

<ng-template #reportButtonsTemplate>
  <div class="button-container" *ngIf="showDetail">
    <div class="icon-btn-container" (click)="onEmployeeReportClicked($event)" click-stop-propagation>
      <cds-icon shape="report" style="width: 18px; height: 18px;"
        title="{{'PAGES.REPORT_PACS_EMPLOYEE_DETAILED'|translate}}">
      </cds-icon>
    </div>
    <div class="icon-btn-container" (click)="onEmployeeChartsClicked($event)" click-stop-propagation>
      <cds-icon shape="analysis" style="width: 18px; height: 18px;"
        title="{{'PAGES.ANALYSIS_PACS_USER_MONTHLY_SUMMARY'|translate}}">
      </cds-icon>
    </div>
  </div>
</ng-template>`;var nt=`.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}:host{display:block}.no-record-container{display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-moz-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;flex-direction:row;padding:3px;margin:3px 0;background-color:#e9eaec;-webkit-border-radius:.375rem;-moz-border-radius:.375rem;border-radius:.375rem}@media screen and (max-width: 768px){.no-record-container{-webkit-box-orient:vertical;-moz-box-orient:vertical;-webkit-flex-direction:column;-moz-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.no-record-container .left-side{width:100%}}.no-record-container .left-side{width:20%;display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-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}.no-record-container .left-side .day-text{font-size:.504rem;color:#aaabac}.main-container{display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-moz-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-border-radius:.56rem;-moz-border-radius:.56rem;border-radius:.56rem;padding:12px;margin:6px 0;position:relative;background-color:#fff}@media screen and (max-width: 768px){.main-container{-webkit-box-orient:vertical;-moz-box-orient:vertical;-webkit-flex-direction:column;-moz-flex-direction:column;-ms-flex-direction:column;flex-direction:column}}.main-container .left-side{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;width:20%;padding-top:6px;padding-left:6px;border-right:1px solid #eee;cursor:initial}@media screen and (max-width: 768px){.main-container .left-side{padding-top:12px;width:auto;border-right:none;-webkit-flex-grow:1;-webkit-box-flex:1;-moz-flex-grow:1;-ms-flex-positive:1;flex-grow:1}}.main-container .left-side[clickable=true]{cursor:pointer}.main-container .left-side .button-container{display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-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;margin-top:auto;padding:0 6px}.main-container .left-side .button-container .icon-btn-container{cursor:pointer;padding:3px;color:#0a2a5a;-webkit-border-radius:.375rem;-moz-border-radius:.375rem;border-radius:.375rem}.main-container .left-side .button-container .icon-btn-container:hover{color:#0369a1}.main-container .left-side .day-text-container{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;-webkit-box-align:end;-ms-flex-align:end;-webkit-align-items:flex-end;-moz-align-items:flex-end;align-items:flex-end;padding:0 12px 0 0}@media screen and (max-width: 768px){.main-container .left-side .day-text-container{-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;-moz-align-items:center;align-items:center}.main-container .left-side .day-text-container span{text-align:center}}.main-container .left-side .day-text-container .day-text{font-size:1.05rem;color:#aaa;font-weight:lighter}.main-container .left-side .day-text-container .weekday-text{font-size:.672rem;color:#999;font-weight:bolder;margin-bottom:3px}.main-container .left-side .day-text-container .year-text{font-size:.588rem;color:#ccc}.main-container .right-side{-webkit-flex-grow:1;-webkit-box-flex:1;-moz-flex-grow:1;-ms-flex-positive:1;flex-grow:1;min-width:300px;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;padding:0 0 0 6px}@media screen and (max-width: 768px){.main-container .right-side{padding:12px 0 0 6px}}.main-container .right-side .entry-exit-container .entry-state{font-size:.672rem;font-weight:500;background-color:#62a325;color:#fff;padding:.14rem .28rem;margin-bottom:3px;-webkit-border-radius:.375rem;-moz-border-radius:.375rem;border-radius:.375rem}@media screen and (max-width: 768px){.main-container .right-side .entry-exit-container .entry-state{font-size:.588rem}}.main-container .right-side .entry-exit-container .entry-exit-data-cell{display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-moz-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;-moz-align-items:center;align-items:center}.main-container .right-side .entry-exit-container .entry-exit-data-cell .enter-container{display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-align:end;-ms-flex-align:end;-webkit-align-items:flex-end;-moz-align-items:flex-end;align-items:flex-end}.main-container .right-side .entry-exit-container .entry-exit-data-cell .exit-container{display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex}.main-container .right-side .entry-exit-container .entry-exit-data-cell .entry-exit-main-text,.main-container .right-side .entry-exit-container .entry-exit-data-cell .entry-exit-hour-text{font-size:1.05rem;color:#ccc;font-weight:lighter}@media screen and (max-width: 768px){.main-container .right-side .entry-exit-container .entry-exit-data-cell .entry-exit-main-text,.main-container .right-side .entry-exit-container .entry-exit-data-cell .entry-exit-hour-text{font-size:.756rem}}.main-container .right-side .entry-exit-container .entry-exit-data-cell .entry-exit-hour-text{color:#666}.main-container[clickable=false]{cursor:initial}.main-container[clickable=true]{cursor:pointer}.main-container[clickable=true]:hover{background-color:#f8f9fa}
`;var at=`<ng-container *ngIf="visibleComponent">
  <div class="modal-header b-b-1">
    <armon-captionlines *ngIf="userCaptions" [showBorder]="false" [captionlines]="userCaptions"></armon-captionlines>
  </div>
  <!-- TAB GELECEK-->
  <div class="modal-body">
    <div class="button-container">
      <div class="data-arrow-button" (click)="onPrevDataClicked($event)">
        <cds-icon shape="angle" direction="left" size="md" class="cursor-pointer"></cds-icon>
      </div>
      <span class="category-title">{{selectedCategory.title|translate}}</span>
      <div class="data-arrow-button" (click)="onNextDataClicked($event)">
        <cds-icon shape="angle" direction="right" size="md" class="cursor-pointer"></cds-icon>
      </div>
      <span class="ms-auto">{{'DATEPICKER.LABEL_LAST_MONTH'|translate}}</span>
    </div>
    <div class="chart-container" *ngIf="selectedCategory">
      <ng-container [ngSwitch]="selectedCategory.chartType">
        <ng-container *ngSwitchDefault>
          <d3-bar-chart [chartData]="selectedCategory.chartData" [chartLabels]="selectedCategory.chartLabels"
            [margin]="margin" [chartColors]="selectedCategory.chartColors"
            [chartOptions]="selectedCategory.chartOptions" [yLabelTextOptions]="selectedCategory.yLabelTextOptions"
            [yAxisRange]="selectedCategory.yAxisRange" [averageValue]="selectedCategory.averageValue"></d3-bar-chart>
        </ng-container>
        <ng-container *ngSwitchCase="2">
          <d3-negative-bar-chart [chartData]="selectedCategory.chartData" [chartLabels]="selectedCategory.chartLabels"
            [yLabelTextOptions]="selectedCategory.yLabelTextOptions" [margin]="margin"
            [chartColors]="selectedCategory.chartColors" [chartOptions]="selectedCategory.chartOptions">
          </d3-negative-bar-chart>
        </ng-container>
      </ng-container>
    </div>
  </div>

  <div class="modal-footer">
    <button class="btn btn-primary" (click)="closeClicked($event)">
      {{'BUTTON.CLOSE' | translate}}
    </button>
  </div>
</ng-container>`;var ot=`.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}:host .button-container{display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;-moz-align-items:center;align-items:center}:host .button-container .category-title{font-size:.756rem;margin-right:3px;margin-left:3px;color:#0a2a5a}:host .button-container cds-icon{color:#999}:host .chart-container{display:block;margin:18px 0;padding:0;height:200px}
`;var rt=`<div nz-tooltip nzTooltipTitle="{{'WIDGET.PACS_PERFORMANCE' | translate}}" class="pacs-user-score-container d-flex">
    <div class="pacs-user-score-container-left d-flex align-items-center justify-content-center px-2">
        <span class="text-center fw-normal text-sm">{{"PACS.ABBREVIATION"|translate}}</span>
    </div>
    <div class="pacs-user-score-container-right d-flex align-items-center justify-content-center px-2"
        [ngStyle]="{'background-color': color}">
        <span class="text-center fw-bold text-sm">{{score}}</span>
    </div>
</div>`;var st=`.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}.pacs-user-score-container{width:fit-content}.pacs-user-score-container .pacs-user-score-container-left{height:20px;width:fit-content;background-color:#e2e2e2;color:#515151;padding-top:1px;-webkit-border-top-left-radius:.25rem;-moz-border-radius-topleft:.25rem;border-top-left-radius:.25rem;-webkit-border-v-left-radius:.25rem;-moz-border-radius-bottomleft:.25rem;border-bottom-left-radius:.25rem}.pacs-user-score-container .pacs-user-score-container-right{height:20px;width:fit-content;color:#fff;padding-top:1px;-webkit-border-top-right-radius:.25rem;-moz-border-radius-topv:.25rem;border-top-right-radius:.25rem;-webkit-border-v-right-radius:.25rem;-moz-border-radius-bottomright:.25rem;border-bottom-right-radius:.25rem}
`;var Dt=function(o,e,t,n){var r=arguments.length,i=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(o,e,t,n);else for(var l=o.length-1;l>=0;l--)(s=o[l])&&(i=(r<3?s(i):r>3?s(e,t,i):s(e,t))||i);return r>3&&i&&Object.defineProperty(e,t,i),i},Ie,H=class{static{Ie=this}score;color;constructor(){}ngOnInit(){this.color=Ie.getColorByScore(this.score)}static getColorByScore(e){return e>=80?"#00CE7A":e>=60?"#FEBD3F":e==0?"#869B9D":"#FF6975"}static ctorParameters=()=>[];static propDecorators={score:[{type:f}]}};H=Ie=Dt([v({selector:"armon-pacs-user-score",template:rt,standalone:!0,imports:[W,_,S],styles:[st]})],H);var lt=`<div class="w-100 h-100 pos-relative">
    <div #container class="chart-container"></div>
    <div class="d3-nodata-overlay" *ngIf="visibleNoDataOverlay">
        <div>
            <span>{{'CHART.NO_DATA'|translate}}</span>
        </div>
    </div>
</div>

`;var ct=`.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}:host{width:100%;height:100%}:host .chart-container{width:100%;height:100%}:host::ng-deep .axis-x .tick text{font-size:.32rem}:host::ng-deep .mean{stroke-width:1px;stroke:#0a2a5a;stroke-dasharray:2}
`;var dt=Te(Re());var At=function(o,e,t,n){var r=arguments.length,i=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(o,e,t,n);else for(var l=o.length-1;l>=0;l--)(s=o[l])&&(i=(r<3?s(i):r>3?s(e,t,i):s(e,t))||i);return r>3&&i&&Object.defineProperty(e,t,i),i},xe=class extends ge{interactionService;margin;yLabelTextOptions;constructor(e){super(e),this.interactionService=e,this.chart=this}onInit(){}onDestroy(){}onDataUpdated(){this.drawChart()}onColorsUpdated(){this.drawChart()}onLabelsUpdated(){this.drawChart()}onOptionsUpdated(){this.drawChart()}onAfterViewInit(){this.drawChart()}onResized(){this.drawChart()}isPositive(e,t,n){return e>=0}isNegative(e,t,n){return e<0}drawChart(){let e=this.chartData;if(!e||!e.values||e.values.length==0)return;this.host.html("");let t;this.margin?t=this.margin:t={top:10,right:10,bottom:20,left:30};let n;e.values.every(this.isPositive)?n=0:e.values.every(this.isNegative)?n=1:n=2,this.noDataOverlay=e.values.every(p=>p==0||p==null||p==null),this.svg=this.host.append("svg").attr("width","100%").attr("height","100%");var r=this.host.node().getBoundingClientRect();let i=r.width-t.left-t.right,s=r.height-t.top-t.bottom,l=this.svg.append("g").attr("transform","translate("+t.left+","+t.top+")"),m=F().rangeRound([0,i]).padding(.3),c=F().rangeRound([0,i]),a=G().rangeRound([0,s]),g=G().rangeRound([s,0]);m.domain(this.chartLabels.labels.map(p=>p)),c.domain(this.chartLabels.labels.map(p=>p)),n===0?(a.domain([0,q(e.values)]),g.domain([0,q(e.values)])):n===1?(a.domain([Y(e.values),0]),g.domain([Y(e.values),0])):n===2&&(a.domain([Y(e.values),q(e.values)]),g.domain([Y(e.values),q(e.values)]));let x;C("body").select(".tooltip-d3-chart").empty()?x=C("body").append("div").attr("class","tooltip-d3-chart"):x=C("body").select(".tooltip-d3-chart"),x.style("opacity",0);let y=(p,d)=>Array.isArray(this.chartColors.colors)?this.chartColors.colors[d]:this.chartColors.colors;this.yLabelTextOptions?l.append("g").attr("transform","translate(0,"+s+")").attr("class","axis-x").call(U(m)).selectAll("text").style("font-size",this.yLabelTextOptions.fontSize).attr("x",this.yLabelTextOptions.x).attr("y",this.yLabelTextOptions.y).attr("transform","rotate("+this.yLabelTextOptions.rotation+")").style("text-anchor",this.yLabelTextOptions.textAnchor?this.yLabelTextOptions.textAnchor:"start"):l.append("g").attr("transform","translate(0,"+s+")").attr("class","axis-x").call(U(m)),l.append("g").call(he(g));let B=fe();if(l.selectAll(".bar").data(e.values).enter().append("rect").each(function(p,d){B.set(this,d)}).attr("class","bar").on("mouseover",function(p,d){let h=B.get(this);C(p.currentTarget).style("fill",(0,dt.default)(y(d,h)).lighten(.3)),x.html(e.tooltips[h]).style("opacity",1).style("border-left-color",y(d,h)).style("left",p.pageX+15+"px").style("top",p.pageY-15+"px")}).on("mouseout",function(p,d){let h=B.get(this);x.style("opacity",0),C(p.currentTarget).style("fill",y(d,h))}).attr("fill",y).attr("x",(p,d)=>m(this.chartLabels.labels[d])).attr("y",p=>n===0?s:s-a(0)).attr("width",m.bandwidth()).attr("height",0).transition().duration(400).delay((p,d)=>d*70).attr("y",p=>n===0||p>=0?s-a(p):s-a(0)).attr("height",p=>n===0?a(p):p>=0?a(p)-a(0):(a(p)-a(0))*-1),n!==0){let p=X().x((d,h)=>c(this.chartLabels.labels[h])+h+t.left).y((d,h)=>s-a(0)+t.top);this.svg.append("path").datum(e.values).attr("class","mean").attr("d",p)}}static ctorParameters=()=>[{type:z}];static propDecorators={margin:[{type:f}],yLabelTextOptions:[{type:f}]}};xe=At([v({selector:"d3-negative-bar-chart",template:lt,standalone:!0,imports:[w,S],styles:[ct]})],xe);var mt=`<div class="w-100 h-100 pos-relative">
    <div #container class="chart-container"></div>
    <div class="d3-nodata-overlay" *ngIf="visibleNoDataOverlay">
        <div>
            <span>{{'CHART.NO_DATA'|translate}}</span>
        </div>
    </div>
</div>

`;var pt=`.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}:host{width:100%;height:100%}:host .chart-container{width:100%;height:100%}:host::ng-deep .axis-x .tick text{font-size:.5rem}:host::ng-deep .mean{stroke-width:1px;stroke:#0a2a5a;stroke-dasharray:2}
`;var ht=Te(Re());var Lt=function(o,e,t,n){var r=arguments.length,i=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(o,e,t,n);else for(var l=o.length-1;l>=0;l--)(s=o[l])&&(i=(r<3?s(i):r>3?s(e,t,i):s(e,t))||i);return r>3&&i&&Object.defineProperty(e,t,i),i},be=class extends ge{interactionService;xTickFunction;yAxisRange;averageValue;margin;yLabelTextOptions;trendlineActive=!1;clickable=!1;valueClicked=new D;constructor(e){super(e),this.interactionService=e,this.chart=this}onInit(){}onDestroy(){}onDataUpdated(){this.drawChart()}onColorsUpdated(){this.drawChart()}onLabelsUpdated(){this.drawChart()}onOptionsUpdated(){this.drawChart()}onAfterViewInit(){this.drawChart()}onResized(){this.drawChart()}drawChart(){let e=this.chartData;if(!e||!e.values||e.values.length==0)return;this.host.html(""),this.noDataOverlay=e.values.findIndex(d=>d!=0)==-1;let t;this.margin?t=this.margin:t={top:10,right:10,bottom:20,left:30},this.svg=this.host.append("svg").attr("width","100%").attr("height","100%");var n=this.host.node().getBoundingClientRect();let r=n.width-t.left-t.right,i=n.height-t.top-t.bottom,s=this.svg.append("g").attr("transform","translate("+t.left+","+t.top+")"),l=F().rangeRound([0,r]).padding(.3),m=F().rangeRound([0,r]),c=G().rangeRound([0,i]),a=G().rangeRound([i,0]);l.domain(this.chartLabels.labels.map(d=>d)),m.domain(this.chartLabels.labels.map(d=>d)),this.yAxisRange?(c.domain([0,this.yAxisRange]),a.domain([0,this.yAxisRange])):(c.domain([0,100]),a.domain([0,100]));let g;C("body").select(".tooltip-d3-chart").empty()?g=C("body").append("div").attr("class","tooltip-d3-chart"):g=C("body").select(".tooltip-d3-chart"),g.style("opacity",0);let x=(d,h)=>Array.isArray(this.chartColors.colors)?this.chartColors.colors[h]:this.chartColors.colors;this.yLabelTextOptions?s.append("g").attr("transform","translate(0,"+i+")").attr("class","axis-x").call(U(l).tickFormat(this.xTickFunction)).selectAll("text").style("font-size",this.yLabelTextOptions.fontSize).attr("x",this.yLabelTextOptions.x).attr("y",this.yLabelTextOptions.y).attr("transform","rotate("+this.yLabelTextOptions.rotation+")").style("text-anchor",this.yLabelTextOptions.textAnchor?this.yLabelTextOptions.textAnchor:"start"):s.append("g").attr("transform","translate(0,"+i+")").attr("class","axis-x").call(U(l).tickFormat(this.xTickFunction)),s.append("g").call(he(a).ticks(5));let y=fe(),B=this.onValueClicked;s.selectAll(".bar").data(e.values).enter().append("rect").each(function(d,h){y.set(this,h)}).attr("class","bar").style("cursor",this.clickable?"pointer":"default").on("mouseover",function(d,h){let E=y.get(this);C(d.currentTarget).style("fill",(0,ht.default)(x(h,E)).lighten(.1)),g.html(e.tooltips[E]).style("opacity",1).style("border-left-color",x(h,E)).style("left",d.pageX+15+"px").style("top",d.pageY-15+"px")}).on("mouseout",function(d,h){let E=y.get(this);g.style("opacity",0),C(d.currentTarget).style("fill",x(h,E))}).on("click",function(d,h){let E=y.get(this);g.style("opacity",0),B(h,E)}).attr("fill",x).attr("x",(d,h)=>l(this.chartLabels.labels[h])).attr("y",d=>i).attr("width",l.bandwidth()).attr("height",0).transition().duration(400).delay((d,h)=>h*70).attr("y",d=>i-c(d)||0).attr("height",d=>c(d));let p;this.averageValue?p=X().x((d,h)=>m(this.chartLabels.labels[h])+h+t.left).y((d,h)=>a(this.averageValue)+t.top):p=X().x((d,h)=>m(this.chartLabels.labels[h])+h+t.left).y((d,h)=>a(this.averageValue)+t.top),this.svg.append("path").datum(e.values).attr("class","mean").attr("d",p)}onValueClicked=(e,t)=>{this.clickable&&this.valueClicked.emit(this.chartData.eventObjects[t])};static ctorParameters=()=>[{type:z}];static propDecorators={xTickFunction:[{type:f}],yAxisRange:[{type:f}],averageValue:[{type:f}],margin:[{type:f}],yLabelTextOptions:[{type:f}],trendlineActive:[{type:f}],clickable:[{type:f}],valueClicked:[{type:R}]}};be=Lt([v({selector:"d3-bar-chart",template:mt,standalone:!0,imports:[w,S],styles:[pt]})],be);var Mt=function(o,e,t,n){var r=arguments.length,i=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(o,e,t,n);else for(var l=o.length-1;l>=0;l--)(s=o[l])&&(i=(r<3?s(i):r>3?s(e,t,i):s(e,t))||i);return r>3&&i&&Object.defineProperty(e,t,i),i},ye=class extends ae{interactionService;reportService;translate;routingService;userId;userCaptions;visibleComponent=!1;selectedCategoryType=b.Score;selectedCategory;categories=[];selectedIndex=0;margin={top:10,right:10,bottom:30,left:30};constructor(e,t,n,r){super(),this.interactionService=e,this.reportService=t,this.translate=n,this.routingService=r}onModalInitialized(){super.onModalInitialized(),Me(this.userId)?this.closeModal():this.getUserData()}getUserData(){let e=ce.getEmptyModel();e.dateRange.startDateTime=u.local().minus({days:29}).toFormat("yyyy-MM-dd"),e.dateRange.endDateTime=u.local().toFormat("yyyy-MM-dd"),e.paginationRequest.skip=0,e.paginationRequest.take=30,e.sortOrder="ASC",e.sortType=se.Date,e.userId=this.userId?this.userId:this.sessionService.currentUserId,this.reportService.getPacsWorkingDetailEmployee(e).subscribe(t=>{this.userCaptions=t.userCaption,this.createCategoryData(t.items)})}createCategoryData(e){this.categories.push(this.getCategoryData(e,b.Score,"WIDGET.PACS_PERFORMANCE")),this.categories.push(this.getCategoryData(e,b.Entrance,"WIDGET.PACS_ENTRANCE")),this.categories.push(this.getCategoryData(e,b.Leave,"WIDGET.PACS_LEAVE")),this.categories.push(this.getCategoryData(e,b.MissingWork,"PACS.SEGMENT_NOT_WORKING_ON_WORKINGHOURS")),this.categories.push(this.getCategoryData(e,b.ExtraWork,"PACS.SEGMENT_WORKING_OUT_WORKINGHOURS")),this.categories.push(this.getCategoryData(e,b.OffTimePermission,"PACS.SEGMENT_NOT_WORKING_ON_PERMISSION")),this.setSelectedCategory(this.selectedIndex),this.visibleComponent=!0}getCategoryData(e,t,n){let r=[],i=[],s=[],l=[],m=0,c=new Ae;switch(c.type=t,c.title=n,e.forEach(a=>{switch(t){case b.Score:r.push(a.score),i.push("<span class='main'>"+a.score+"</span><span>"+u.fromJSDate(a.date).toLocaleString(u.DATETIME_MED))+"",m+=a.score;break;case b.Entrance:case b.Leave:let g,x;t==b.Entrance?(g=a.lateStart>0?a.lateStart*-1:a.earlyStart>0?a.earlyStart:0,g>0?x=!0:x=!1):(g=a.earlyLeave>0?a.earlyLeave*-1:a.lateLeave>0?a.lateLeave:0,g>0?x=!1:x=!0);let y="";r.push(g),x==!0?y=this.translate.instant("WIDGET.PACS_PERFORMANCE_CHECKIN_OUT_MINUTES_EARLY",{absDuration:Math.abs(g)}):y=this.translate.instant("WIDGET.PACS_PERFORMANCE_CHECKIN_OUT_MINUTES_LATE",{absDuration:Math.abs(g)}),i.push("<span class='main'>"+y+"</span><span>"+u.fromJSDate(a.date).toLocaleString(u.DATETIME_MED))+"";break;case b.MissingWork:r.push(a.missingWorkDuration),i.push("<span class='main'>"+a.missingWorkDuration+" "+this.translate.instant("PACS.WORKPLAN_PERIOD_UNIT_MINUTE_SHORT")+"</span><span>"+u.fromJSDate(a.date).toLocaleString(u.DATETIME_MED))+"",m+=a.score;break;case b.ExtraWork:r.push(a.extraWorkDuration),i.push("<span class='main'>"+a.extraWorkDuration+" "+this.translate.instant("PACS.WORKPLAN_PERIOD_UNIT_MINUTE_SHORT")+"</span><span>"+u.fromJSDate(a.date).toLocaleString(u.DATETIME_MED))+"",m+=a.score;break;case b.OffTimePermission:r.push(a.accountedOffTimePermissionDuration),i.push("<span class='main'>"+a.accountedOffTimePermissionDuration+" "+this.translate.instant("PACS.WORKPLAN_PERIOD_UNIT_MINUTE_SHORT")+"</span><span>"+u.fromJSDate(a.date).toLocaleString(u.DATETIME_MED))+"",m+=a.score;break}s.push(u.fromJSDate(a.date).toFormat("d.MM"))}),c.chartLabels={labels:s},c.chartData={values:r,tooltips:i},t){case b.Score:c.yAxisRange=100,c.averageValue=Math.round(m/r.length),r.forEach(a=>{l.push(H.getColorByScore(a))});break;case b.Entrance:case b.Leave:c.chartType=2,r.forEach(a=>{a>=0?l.push("#62A325"):l.push("#C82602")});break;case b.MissingWork:c.yAxisRange=Math.max(...r),r.forEach(a=>{l.push("#C82602")});break;case b.ExtraWork:c.yAxisRange=Math.max(...r),r.forEach(a=>{l.push("#62A325")});break;case b.OffTimePermission:c.yAxisRange=Math.max(...r),r.forEach(a=>{l.push("#ef9df5")});break}return c.chartColors={colors:l},c.yLabelTextOptions={fontSize:"0.65rem",x:"-10",y:"0",rotation:-45,textAnchor:"end"},c}setSelectedCategory(e){this.selectedIndex=e,this.selectedCategory=this.categories[e]}onNextDataClicked(e){this.selectedIndex==this.categories.length-1?this.setSelectedCategory(0):this.setSelectedCategory(this.selectedIndex+1)}onPrevDataClicked(e){this.selectedIndex==0?this.setSelectedCategory(this.categories.length-1):this.setSelectedCategory(this.selectedIndex-1)}closeClicked(e){this.closeModal()}onDetailClicked(e){this.routingService.gotoAnalysisPacsUserMonthly(this.userId),this.closeModal()}static ctorParameters=()=>[{type:z},{type:N},{type:Ne},{type:de}];static propDecorators={userId:[{type:f}],userCaptions:[{type:f}]}};ye=Mt([v({selector:"armon-pacs-user-modal",template:at,standalone:!0,imports:[w,me,Q,Le,be,ee,xe,S],styles:[ot]})],ye);var Ae=class{title;type;chartData;chartColors;chartLabels;chartOptions={type:Ye.BarChart};averageValue;yAxisRange;chartType=1;yLabelTextOptions},b;(function(o){o[o.Score=1]="Score",o[o.Entrance=2]="Entrance",o[o.Leave=3]="Leave",o[o.MissingWork=4]="MissingWork",o[o.ExtraWork=5]="ExtraWork",o[o.OffTimePermission=6]="OffTimePermission"})(b||(b={}));var ft=`<div *ngIf="timeline">
    <app-timeline-wrapper-component [timeline]="timeline" (onRangeClicked)="onRangeClicked($event)"
        (onRangeMouseEnter)="onRangeMouseEnter($event)" (onRangeMouseLeave)="onRangeMouseLeave($event)"></app-timeline-wrapper-component>
</div>`;var gt="";var ut=`<ng-container *ngIf="visibleComponent">
    <div class="modal-header">
        <div class="d-flex flex-column">
            <span class="text-lg">{{title|translate}}</span>
            <span class="text-md" *ngIf="subTitle">{{subTitle|translate}}</span>
        </div>
    </div>
    <div class="modal-body">
        <div class="segment-container">
            <div class="segment-line-container mt-3 p-3" [ngStyle]="{'border-color':color}">
                <div class="d-flex flex-column flex-grow-1">
                    <div class="d-flex align-items-center flex-grow-1 pb-3 b-b-1 mb-3"
                        *ngIf="segment.startAccessLog || segment.endAccessLog">
                        <ng-container *ngIf="segment.startAccessLog">
                            <ng-template
                                *ngTemplateOutlet="accessLogTemplate;context: {$implicit: segment.startAccessLog, endLog:false}">
                            </ng-template>
                        </ng-container>
                        <ng-container *ngIf="segment.endAccessLog">
                            <ng-template
                                *ngTemplateOutlet="accessLogTemplate;context: {$implicit: segment.endAccessLog, endLog:true}">
                            </ng-template>
                        </ng-container>
                    </div>
                    <div class="d-flex justify-content-between align-items-center flex-grow-1">
                        <div class="d-flex flex-column align-items-start">
                            <span class="text-xxl text-black-50">{{segment.range.startTimeText}}</span>
                            <span class="text-md text-black-50" *ngIf="multiDay">{{segment.range.start|date:'d
                                MMMM'}}</span>
                        </div>
                        <span class="text-lg text-bold">{{segment.range.duration|minuteFormatter}}</span>
                        <div class="d-flex flex-column align-items-end">
                            <span class="text-xxl text-black-50">{{segment.range.endTimeText}}</span>
                            <span class="text-md text-black-50" *ngIf="multiDay">{{segment.range.end|date:'d
                                MMMM'}}</span>
                        </div>
                    </div>
                </div>
            </div>
            <div class="d-flex justify-content-between py-3">
                <div>
                    <button class="btn btn-sm btn-outline-primary" (click)="onAddManualRecordStartClicked($event)"
                        *ngIf="visibleAddManualLog" nz-tooltip
                        nzTooltipTitle="{{'ACCESSCONTROLPOINT.ADD_MANUAL_RECORD' | translate}}">
                        <cds-icon shape="step-forward-2" class="me-2" direction="down"></cds-icon>
                        {{'ACCESSCONTROLPOINT.ADD_MANUAL_RECORD_BUTTON' | translate}}
                    </button>
                </div>
                <div class="d-flex justify-content-center">
                    <button class="btn btn-sm btn-primary" (click)="onAddPermissionClicked($event)"
                        *ngIf="visibleAddPermission">
                        {{'PACS.ADD_USER_PPERMISSION' | translate}}
                    </button>
                    <button class="btn btn-sm btn-outline-primary"
                        (click)="onDetailPermissionClicked($event, segment.permission?null:segment.unapprovedPermission.id)"
                        *ngIf="visibleViewPermission">
                        {{'PACS.USER_PPERMISSION_DETAIL' | translate}}
                    </button>
                    <button class="btn btn-sm btn-outline-primary" (click)="onDetailWorkplanClicked($event)"
                        *ngIf="segment.workPlan && permissionEditWorkplan">
                        {{'PACS.WORKPLAN' | translate}}
                    </button>
                </div>
                <div>
                    <button class="btn btn-sm btn-outline-primary" (click)="onAddManualRecordEndClicked($event)"
                        *ngIf="visibleAddManualLog" nz-tooltip
                        nzTooltipTitle="{{'ACCESSCONTROLPOINT.ADD_MANUAL_RECORD' | translate}}">
                        {{'ACCESSCONTROLPOINT.ADD_MANUAL_RECORD_BUTTON' | translate}}<cds-icon shape="step-forward-2"
                            class="ms-2"></cds-icon>
                    </button>
                </div>
            </div>
        </div>
        <div class="my-2" *ngIf="ppermission && useAsHumanResources">
            <armon-pacs-ppermission-management-list-item minimalView="true" [ppermissionResponse]="ppermission"
                [useAsHumanResources]="useAsHumanResources" [hasWritePermission]="permissionWritePPermission"
                (routingStarted)="onRoutingStarted($event)" (ppermissionEditCompleted)="onEditCompleted($event)">
            </armon-pacs-ppermission-management-list-item>
        </div>
        <div class="d-flex flex-column px-2" *ngIf="segment.conflict">
            <div class="py-3 mb-3 b-b-1">
                <cds-icon shape="conflict" size="sm" class="me-2 text-danger"></cds-icon><span
                    class="text-md">{{'PACS.CONFLICT_SEGMENTS_TITLE'|translate}}</span>
            </div>
            <ng-container *ngFor="let conflictHoliday of segment.conflictHolidays">
                <div class="d-flex align-items-center justify-content-between p-3 my-2 shadow-box-1">
                    <span class="text-md">{{conflictHoliday.name}}</span>
                    <span class="text-md text-bold">{{conflictHoliday.range.startTimeText}} -
                        {{conflictHoliday.range.endTimeText}}</span>
                </div>
            </ng-container>
            <ng-container *ngFor="let conflictPermission of segment.conflictPermissions">
                <div class="d-flex align-items-center justify-content-between p-3 my-2 shadow-box-1">
                    <span class="text-md">{{conflictPermission.name}}</span>
                    <span class="text-md text-bold">
                        <button class="btn btn-sm btn-outline-primary me-2"
                            *ngIf="useAsHumanResources || permissionWritePPermission"
                            (click)="onDetailPermissionClicked($event, conflictPermission.id)">
                            {{'PACS.USER_PPERMISSION_DETAIL' | translate}}
                        </button>
                        {{conflictPermission.range.startTimeText}} -
                        {{conflictPermission.range.endTimeText}}
                    </span>
                </div>
            </ng-container>
        </div>
    </div>
    <div class="modal-footer mt-3">
        <button class="btn btn-outline-primary me-0" (click)="onCancelClicked($event)">
            {{'BUTTON.CLOSE' | translate}}
        </button>
    </div>
</ng-container>

<ng-template #accessLogTemplate let-accessLog let-endLog="endLog">
    <div class="d-flex flex-column" [ngClass]="{'ms-auto align-items-end': endLog}">
        <span class="text-md text-bold"
            *ngIf="accessLog.accessControlPoint.name">{{accessLog.accessControlPoint.name}}</span>
        <ng-container *ngIf="permissionReportDetailed && accessLog.snapshots && accessLog.snapshots.length>0">
            <armon-camera-snapshot-gallery [snapshots]="accessLog.snapshots">
            </armon-camera-snapshot-gallery>
        </ng-container>
        <ng-container *ngIf="accessLog.location && accessLog.location.isValid">
            <armon-map-open-layers [location]="accessLog.location"></armon-map-open-layers>
        </ng-container>
    </div>
</ng-template>`;var xt=`.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}.segment-container{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;border-left:5px solid #FFF}.segment-container .segment-line-container{display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:justify;-moz-box-pack:justify;-webkit-flex-pack:justify;-ms-flex-pack:justify;-moz-justify-content:space-between;-webkit-justify-content:space-between;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;-moz-align-items:center;align-items:center;border-left:1px dashed #333;border-right:1px dashed #333;border-bottom:16px solid #333}
`;var ve=Te(Re());var Ut=function(o,e,t,n){var r=arguments.length,i=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(o,e,t,n);else for(var l=o.length-1;l>=0;l--)(s=o[l])&&(i=(r<3?s(i):r>3?s(e,t,i):s(e,t))||i);return r>3&&i&&Object.defineProperty(e,t,i),i},ke=class extends ae{authService;pacsService;segment;multiDay=!1;visibleComponent=!1;useAsHumanResources;permissionWritePPermission;permissionEditWorkplan;permissionInsertManualLog;permissionReportDetailed;ppermission;color;title;subTitle;visibleAddPermission=!1;visibleViewPermission=!1;visibleAddManualLog=!1;constructor(e,t){super(),this.authService=e,this.pacsService=t}onModalInitialized(){switch(super.onModalInitialized(),this.useAsHumanResources=this.authService.checkPermission(P.PPERMISSION.getHRApprovement()),this.permissionWritePPermission=this.authService.checkPermission(P.PPERMISSION.getWrite()),this.permissionEditWorkplan=this.authService.checkPermission(P.ATTENDANCEPLAN.getWrite()),this.permissionInsertManualLog=this.authService.checkPermission(P.ACCESSLOG.getInsertManualLog()),this.permissionReportDetailed=this.authService.checkPermission(P.ACCESSLOG.getReportDetailed()),this.segment.segmentType){case T.ActualDurationSegment:this.color=(0,ve.default)(this.segment.status.color).lighten(.1).hex(),this.title=this.segment.status.title,this.segment.attendanceData.tolerance&&(this.subTitle=this.segment.attendanceData.toleranceText),this.visibleAddPermission=O.isAvailableForPermission(this.segment),this.visibleAddManualLog=this.permissionInsertManualLog&&O.isAvailableForManualLog(this.segment),this.visibleViewPermission=this.segment.permission&&(this.useAsHumanResources||this.permissionWritePPermission),this.useAsHumanResources&&this.segment.permission&&this.getPermissionDetail(this.segment.permission.id);break;case T.ExpectedDurationSegment:this.color=(0,ve.default)(this.segment.segmentColor).lighten(.1).hex(),this.title=this.segment.segmentTitle,this.segment.workPlan&&(this.subTitle=this.segment.workPlan.name);break;case T.WorkPlanDurationSegment:break;case T.UnapprovedPermissionSegment:this.color=(0,ve.default)(this.segment.segmentColor).lighten(.1).hex(),this.title=this.segment.segmentTitle,this.subTitle=this.segment.segmentSubTitle,this.visibleViewPermission=this.useAsHumanResources||this.permissionWritePPermission,this.useAsHumanResources&&this.getPermissionDetail(this.segment.unapprovedPermission.id);break}this.visibleComponent=!0}_ppermissionId;getPermissionDetail(e=null){e?this._ppermissionId=e:e=this._ppermissionId,this.pacsService.getPPermissionDetail(e).subscribe(t=>{this.ppermission=t})}onAddPermissionClicked(e){this.closeModal({reason:k.AddPermission})}onDetailPermissionClicked(e,t=null){this.closeModal({reason:k.GotoPermission,permissionId:t})}onDetailUnapprovedPermissionClicked(e,t=null){this.closeModal({reason:k.GotoPermission,permissionId:t})}onDetailWorkplanClicked(e){this.closeModal({reason:k.GotoWorkplanDetail})}onAddManualRecordStartClicked(e){this.closeModal({reason:k.AddManualRecordStart})}onAddManualRecordEndClicked(e){this.closeModal({reason:k.AddManualRecordEnd})}onRoutingStarted(e){this.closeModal({reason:k.RoutingStarted})}onEditCompleted(e){this.getPermissionDetail()}static ctorParameters=()=>[{type:A},{type:Ge}];static propDecorators={segment:[{type:f}],multiDay:[{type:f}]}};ke=Ut([v({selector:"armon-pacs-timeline-segment-modal",template:ut,animations:pe,standalone:!0,imports:[w,_,te,W,L,Z,Je,Qe,M,oe,S],styles:[xt]})],ke);var k;(function(o){o[o.AddPermission=1]="AddPermission",o[o.GotoWorkplanDetail=2]="GotoWorkplanDetail",o[o.GotoPermission=3]="GotoPermission",o[o.AddManualRecordStart=4]="AddManualRecordStart",o[o.AddManualRecordEnd=5]="AddManualRecordEnd",o[o.RoutingStarted=6]="RoutingStarted"})(k||(k={}));var bt=`<div class="tooltip-container p-2" [ngStyle]="{'border-color': color}">
    <span class="text-sm">{{title|translate}}</span>
    <ng-container *ngFor="let subTitle of subTitles">
        <span class="text-xs text-italic">{{subTitle|translate}}</span>
    </ng-container>
    <span class="text-xs text-bold">
        <cds-icon shape="conflict" size="sm" class="me-2 text-danger" *ngIf="segment.conflict"></cds-icon>
        {{segment.range.startTimeText}}-{{segment.range.endTimeText}}
    </span>
    <span class="text-xs text-italic" *ngIf="multiDay">
        {{segment.range.start|date:'d MMMM'}}<ng-container
            *ngIf="segment.range.start.getDate()!=segment.range.end.getDate()"> - {{segment.range.end|date:'d MMMM'}}
        </ng-container>
    </span>
    <span class="text-xs" *ngIf="segment.startAccessLog">{{segment.startAccessLog.accessControlPoint.name}}
        ({{segment.range.startTimeText}})</span>
    <span class="text-xs" *ngIf="segment.endAccessLog">{{segment.endAccessLog.accessControlPoint.name}}
        ({{segment.range.endTimeText}})</span>
</div>`;var yt=`.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}.tooltip-container{width:190px;background-color:#f5f5f5;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;-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;-webkit-border-radius:.375rem;-moz-border-radius:.375rem;border-radius:.375rem;border-left:6px solid #FFF}
`;var Ht=function(o,e,t,n){var r=arguments.length,i=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(o,e,t,n);else for(var l=o.length-1;l>=0;l--)(s=o[l])&&(i=(r<3?s(i):r>3?s(e,t,i):s(e,t))||i);return r>3&&i&&Object.defineProperty(e,t,i),i},we=class{authService;router;popoverRef;segment;multiDay;color;title;subTitles=[];constructor(e,t,n){if(this.authService=e,this.router=t,this.popoverRef=n,n)switch(this.segment=n.data.segment,this.multiDay=n.data.multiDay,this.segment.segmentType){case T.ActualDurationSegment:this.color=this.segment.status.color,this.title=this.segment.status.title,this.segment.attendanceData&&this.segment.attendanceData.tolerance&&this.subTitles.push(this.segment.attendanceData.toleranceText),this.segment.permission&&this.segment.permission.name&&this.subTitles.push(this.segment.permission.name),this.segment.attendanceData&&this.segment.attendanceData.unpairedAccess&&this.subTitles.push("PACS.UNPAIRED_SEGMENT");break;case T.ExpectedDurationSegment:this.color=this.segment.segmentColor,this.title=this.segment.segmentTitle,this.segment.workPlan&&this.subTitles.push(this.segment.workPlan.name);break;case T.WorkPlanDurationSegment:break;case T.UnapprovedPermissionSegment:this.color=this.segment.segmentColor,this.title=this.segment.segmentTitle,this.subTitles.push(this.segment.segmentSubTitle);break;case T.UnpairedAccessSegment:this.color=this.segment.segmentColor,this.title=this.segment.segmentTitle;break}}ngOnInit(){}static ctorParameters=()=>[{type:A},{type:ie},{type:Ue,decorators:[{type:Oe}]}]};we=Ht([v({selector:"armon-pacs-timeline-segment-tooltip",template:bt,animations:pe,standalone:!0,imports:[_,L,w,M,S],styles:[yt]})],we);var Ee={WIDTH:190,HEIGHT:60};var Bt=function(o,e,t,n){var r=arguments.length,i=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(o,e,t,n);else for(var l=o.length-1;l>=0;l--)(s=o[l])&&(i=(r<3?s(i):r>3?s(e,t,i):s(e,t))||i);return r>3&&i&&Object.defineProperty(e,t,i),i},Se=class{router;authService;reportService;popoverService;modalService;day;userId;multiDay=!1;syncId;interactionStarted=new D;interactionFinished=new D;routingStarted=new D;dataLoaded=new D;_dayStartDateTime;_dayEndDateTime;_rangeMs;useAsHumanResources;permissionWritePPermission;timeline;constructor(e,t,n,r,i){this.router=e,this.authService=t,this.reportService=n,this.popoverService=r,this.modalService=i}ngOnInit(){this.useAsHumanResources=this.authService.checkPermission(P.PPERMISSION.getHRApprovement())||this.authService.isPermittedForAnyUnitInOrganization(P.PPERMISSION.getHRApprovement()),this.permissionWritePPermission=this.authService.checkPermission(P.PPERMISSION.getWrite()),this.getData()}ngAfterContentInit(){}ngOnDestroy(){}getData(){let e=Ke.getEmptyModel();e.userId=this.userId,e.date=this.day,this.reportService.getPacsUserWorkDetailed(e).subscribe(t=>{this.dataLoaded.emit(t),this.renderTimeline(t,e.date)})}_minPerc;_maxPerc;renderTimeline(e,t){this._maxPerc=0,this._minPerc=1,e.actualDurationSegments&&e.actualDurationSegments.length>0?(this._dayStartDateTime=u.fromJSDate(e.actualDurationSegments[0].range.start),this._dayEndDateTime=u.fromJSDate(e.actualDurationSegments[e.actualDurationSegments.length-1].range.end)):(this._dayStartDateTime=u.fromJSDate(e.summary.dayRange.start),this._dayEndDateTime=u.fromJSDate(e.summary.dayRange.end));let n=new He;this.syncId&&(n.syncId=this.syncId);let r=new Be,i=this._dayEndDateTime.diff(this._dayStartDateTime,"hours").hours;this._rangeMs=this._dayEndDateTime.diff(this._dayStartDateTime).toObject().milliseconds;let s=1/i,l=this._dayStartDateTime;for(let m=0;m<=i;m++){let c=new _e;c.label=l.plus({minutes:m*60}).toFormat("HH:mm"),this.multiDay&&c.label=="00:00"&&(c.color="#000000"),c.pos=m*s,r.addItem(c)}if(n.addDivider(r),e.expectedDurationSegments&&e.expectedDurationSegments.length>0){let m=new K;m.height=10,e.expectedDurationSegments.forEach(c=>{if(this.isVisibleExpecedDurationSegment(c)){let a=new J;a=this.getRangeFromSegment(c),a.color=c.segmentColor,a.pattern="lines_light",a.patternColor=O.getEmployeeTimeRangeTypeColor(c.employeeTimeRangeType),a.data=c,a.clickable=!0,m.addRange(a)}}),m.hasRange&&n.addRow(m)}if(e.unapprovedPermissions&&e.unapprovedPermissions.length>0&&e.unapprovedPermissions.forEach(m=>{let c=new K;c.height=8;let a=new J;a=this.createRange(m.range.startDateTime,m.range.endDateTime);let g=this.getSegmentModel(m);switch(m.status){case De.Rejected:a.color="#FF0000",g.segmentSubTitle="PACS.PPERMISSION_STATUS_REJECTED";break;case De.Waiting:a.color="#4c2aa8",g.segmentSubTitle="PACS.PPERMISSION_STATUS_WAITING";break}g.segmentColor=a.color,a.data=g,a.clickable=!0,c.addRange(a),c.hasRange&&n.addRow(c)}),e.actualDurationSegments&&e.actualDurationSegments.length>0){let m=new K;if(m.height=25,e.actualDurationSegments.forEach(c=>{if(this.isVisibleActualDurationSegment(c)){let a=new J;a=this.getRangeFromSegment(c),a.color=c.status.color,a.clickable=!0,a.data=c,m.addRange(a)}}),m.hasRange){if(t==u.local().toFormat("yyyy-MM-dd")){let c=new _e;c.pos=le.getPercantageForDateTimes(this._dayStartDateTime,u.local(),this._rangeMs),m.addDivider(c)}if(n.addRow(m),e.summary&&e.summary.unpairedAccesses&&e.summary.unpairedAccesses.length>0){let c=new K;c.height=8,c.rowGapHeight=0,e.summary.unpairedAccesses.forEach(a=>{let g=this.createRange(a.start,a.end);g.color="#5d79b0",g.clickable=!0,g.cornerRadius=[0,0,4,4];let x=new O,y=new $;y.start=a.start,y.end=a.end,x.range=y.createInstance(y,$,y),x.segmentType=T.UnpairedAccessSegment,x.segmentTitle="PACS.UNPAIRED_SEGMENTS_TITLE",x.segmentColor="#5d79b0",g.data=x,c.addRange(g)}),c.hasRange&&n.addRow(c)}}}n.addIinitZoom(new Ve(this._minPerc,this._maxPerc)),this.timeline=n}isVisibleExpecedDurationSegment(e){let t=!1;return t=e.workPlanTimeRangeType==Ce.WorkingHours&&e.employeeTimeRangeType!=re.OutOfWorkingHours,t==!1&&(t=e.employeeTimeRangeType==re.OffTimePermission),t}getSegmentModel(e){let t=new O;t.unapprovedPermission=e,t.segmentType=T.UnapprovedPermissionSegment,t.segmentTitle=e.typeName;let n=new $;return n.start=e.range.startDateTime,n.end=e.range.endDateTime,t.range=n.createInstance(n,$,n),t}isVisibleActualDurationSegment(e){let t=!1;switch(e.attendanceTimeRangeType){case V.IgnoredPhysicalAttendance:t=!0;break;case V.AccountedPhysicalAttendance:t=!0;break;case V.DeclaredAttendance:t=!0;break;case V.Absent:t=e.workPlanTimeRangeType==Ce.WorkingHours&&e.employeeTimeRangeType!=re.OutOfWorkingHours,t==!1&&(t=e.status.status==I.AtOffTimePermission);break}return t}getRangeFromSegment(e){return this.createRange(e.range.start,e.range.end)}createRange(e,t){let n=new J;return n.hoverable=!0,n.startPos=le.getPercantageForDateTimes(this._dayStartDateTime,u.fromJSDate(e),this._rangeMs),n.endPos=le.getPercantageForDateTimes(this._dayStartDateTime,u.fromJSDate(t),this._rangeMs),n.startPos<this._minPerc&&(this._minPerc=n.startPos),n.endPos>this._maxPerc&&(this._maxPerc=n.endPos),n}popoverReference;onRangeClicked(e){this.interactionStarted.emit(),this.modalService.open(ke,{settings:{size:"lg",centered:!0,scrollable:!0},props:{segment:e.data,multiDay:this.multiDay}}).result.then(t=>{switch(t.reason){case k.AddPermission:this.addPermissionToSegment(e.data);break;case k.GotoPermission:this.routingStarted.emit(),this.router.navigate([ze.PACS_PPERMISSIONS_MANAGEMENT.fullPath],{queryParams:{id:t.permissionId?t.permissionId:e.data.permission.id,t:new Date().getTime()}});break;case k.GotoWorkplanDetail:this.routingStarted.emit(),this.router.navigate([Ze.getPageRoute(e.data.workPlan.type)],{queryParams:{id:e.data.workPlan.id}});break;case k.AddManualRecordStart:this.addManualRecord(e.data,!0);break;case k.AddManualRecordEnd:this.addManualRecord(e.data,!1);break;case k.RoutingStarted:this.routingStarted.emit();break}this.interactionFinished.emit()}).catch(t=>{this.interactionFinished.emit()})}onRangeMouseEnter(e){this.popoverReference=this.popoverService.openGlobalPositon({content:we,width:Ee.WIDTH,height:0,left:e.posX-Ee.WIDTH-10,top:e.posY-10,data:{segment:e.data,multiDay:this.multiDay}})}onRangeMouseLeave(e){this.popoverReference&&this.popoverReference.close()}addPermissionToSegment(e){this.interactionStarted.emit(),this.modalService.open(ue,{settings:{size:"xl",scrollable:!0,centered:!1,escape:!1,click:!1},props:{userId:this.userId,selectedStartDate:e.range.start,selectedEndDate:e.range.end,useAsHumanResources:this.useAsHumanResources,hasWritePermission:this.permissionWritePPermission,typeLimit:Xe.OnlyTypeHourly}}).result.then(t=>{this.interactionFinished.emit(),this.getData()}).catch(t=>{this.interactionFinished.emit()})}addManualRecord(e,t){this.modalService.open(qe,{settings:{size:"md"},props:{userId:this.userId,actionUtc:t?e.range.start:e.range.end}}).result.then(n=>{}).catch(n=>{})}static ctorParameters=()=>[{type:ie},{type:A},{type:N},{type:Fe},{type:ne}];static propDecorators={day:[{type:f}],userId:[{type:f}],multiDay:[{type:f}],syncId:[{type:f}],interactionStarted:[{type:R}],interactionFinished:[{type:R}],routingStarted:[{type:R}],dataLoaded:[{type:R}]}};Se=Bt([v({selector:"armon-pacs-timeline-user",template:ft,standalone:!0,imports:[w,$e],styles:[gt]})],Se);var Vt=function(o,e,t,n){var r=arguments.length,i=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(o,e,t,n);else for(var l=o.length-1;l>=0;l--)(s=o[l])&&(i=(r<3?s(i):r>3?s(e,t,i):s(e,t))||i);return r>3&&i&&Object.defineProperty(e,t,i),i},vt=class{reportService;routingService;modalService;sessionService;authService;record;userId;day;disabled=!1;showDetail=!1;viewMode=Pe.User;interactionStarted=new D;interactionFinished=new D;routingStarted=new D;visibleComponent=!1;noRecord=!1;graphData;durationData;visibleAddPPermissionButton=!1;hasAvatar;waitingTimeout;constructor(e,t,n,r,i){this.reportService=e,this.routingService=t,this.modalService=n,this.sessionService=r,this.authService=i}ngOnInit(){(!this.day||this.day=="")&&(this.day=u.local().toFormat("yyyy-MM-dd")),this.record?this.dataLoaded():this.userId&&this.getDailyData()}ngOnDestroy(){this.waitingTimeout&&clearTimeout(this.waitingTimeout)}dataLoaded(){this.hasAvatar=this.sessionService.currentOrganization.userOrganizationProfileSettings&&this.sessionService.currentOrganization.userOrganizationProfileSettings.hasAvatarInCaptionLineFields,this.noRecord=this.record.noRecord&&this.viewMode==Pe.Day,this.visibleAddPPermissionButton=!0,this.render()}render(){let e=1440-(this.record.missingWorkDuration+this.record.normalWorkDuration+this.record.accountedOffTimePermissionDuration+this.record.extraWorkDuration);this.graphData={items:[{color:j.getColor(!1,I.AtWorkingHours),value:this.record.missingWorkDuration},{color:j.getColor(!0,I.AtWorkingHours),value:this.record.normalWorkDuration},{color:j.getColor(!1,I.AtOffTimePermission),value:this.record.accountedOffTimePermissionDuration},{color:j.getColor(!0,I.AtOutOfWorkingHours),value:this.record.extraWorkDuration},{color:j.getColor(!1,I.AtOutOfWorkingHours),value:e}]},this.durationData=this.record.getDurationData(),this.record.waitingRecalculation&&(this.waitingTimeout=setTimeout(()=>{this.getDailyData()},12e4)),this.visibleComponent=!0}onCardClicked(e){this.showDetail==!1&&this.disabled==!1&&(this.showDetail=!0)}onLeftSideClicked(e){this.disabled==!1&&(this.showDetail=!this.showDetail)}onDataLoaded(e){e.waitRecalculationFor&&this.record.updateWaitRecalculationFor(e.waitRecalculationFor)}onInteractionStarted(e){this.interactionStarted.emit(e)}onInteractionFinished(e){this.interactionFinished.emit(e)}onRoutingStarted(e){this.routingStarted.emit(e)}getDailyData(){let e=ce.getEmptyModel();e.userId=this.record?this.record.userId:this.userId,e.dateRange.startDateTime=this.day,e.dateRange.endDateTime=this.day,e.paginationRequest.take=1,e.sortType=se.Date,this.reportService.getPacsWorkingDetailEmployee(e).subscribe(t=>{this.record=t.items[0],this.dataLoaded()})}onEmployeeReportClicked(e){this.routingService.gotoReportPacsEmployee(this.record.userId),this.onRoutingStarted()}onEmployeeChartsClicked(e){this.modalService.open(ye,{settings:{size:"lg"},props:{userId:this.record.userId}}).result.then(t=>{}).catch(t=>{}),this.onRoutingStarted()}onAddPPermissionClicked(e){this.modalService.open(ue,{settings:{size:"xl",scrollable:!0,centered:!1,escape:!1,click:!1},props:{userId:this.record.userId,selectedStartDay:this.day,useAsHumanResources:this.authService.checkPermission(P.PPERMISSION.getHRApprovement())||this.authService.isPermittedForAnyUnitInOrganization(P.PPERMISSION.getHRApprovement()),hasWritePermission:this.authService.checkPermission(P.PPERMISSION.getWrite())}}).result.then(t=>{this.getDailyData()}).catch(t=>{})}static ctorParameters=()=>[{type:N},{type:de},{type:ne},{type:je},{type:A}];static propDecorators={record:[{type:f}],userId:[{type:f}],day:[{type:f}],disabled:[{type:f}],showDetail:[{type:f}],viewMode:[{type:f}],interactionStarted:[{type:R}],interactionFinished:[{type:R}],routingStarted:[{type:R}]}};vt=Vt([v({selector:"armon-report-pacs-daily-user",template:it,standalone:!0,imports:[w,Z,We,Q,ee,me,H,te,tt,L,et,_,W,Se,M,oe,S],styles:[nt]})],vt);var Pe;(function(o){o[o.User=1]="User",o[o.Day=2]="Day"})(Pe||(Pe={}));export{H as a,be as b,ye as c,Se as d,vt as e};
