1import{n as D}from"./chunk-BXgg0IV6.js";import{$ as Id,$i as ue,Br as hy,Da as y_,Dr as gM,Ea as yS,Ei as py,En as Vr,Fa as zN,Gn as Zf,Hn as Yy,Ir as hM,Ji as tv,Kr as j2,Li as sE,M as Et$1,P as F_,Pr as gv,Qr as lS,Rr as hd,Sn as VN,Tt as My,Ut as Pw,Vn as Yf,Wn as ZS,Wt as Qf,Y as Ht,br as eM,cn as TT,cr as bp,fr as cS,g as B2,ii as mE,jt as Ny,ki as qf,ln as T_,mn as US,oa as vS,on as Sy,sa as v_,sr as b_,st as Js,ta as v,un as Tp,wi as pd,wr as fM}from"./chunk-DJGKVMLX.js";import{h as Pt}from"./chunk-C0rI489g.js";import{b as z}from"./chunk-DPp0pvIR.js";import{f as h,m as s,o as S}from"./chunk-DzUV5nXW.js";import{n as l}from"./chunk-DuUtpjAd.js";import{l as l$1}from"./chunk-dkUA_lNv.js";import{B as y0,a as D$1}from"./chunk-CUR8Rw2u.js";import{i as ae,o as ho}from"./chunk-B0G4stDw.js";import{a as xe,i as ee,n as Fn,t as An}from"./chunk-CNS4HeJn2.js";import{t as a}from"./chunk-B0EuIOsx2.js";import{i as ye,n as _e,r as be,t as Et$2}from"./chunk-B9n3Ya_c2.js";import{n as Q}from"./chunk-CY3wNoln2.js";import{n as pt$1,t as ht$1}from"./chunk-C9o02cm22.js";import{I as i,P as at$1,R as ot$1,n as w}from"./main-YUV2QEMB.js";import{a as pc,i as dc,n as bt$1,o as ri,r as cc,s as uc,t as p}from"./chunk-DxneaaXa2.js";import{n as ki,t as Ye$1}from"./chunk-DbEbl4AZ2.js";import{t as p$1}from"./chunk-B5qBl-Rb2.js";import{i as w$1,n as s$1}from"./chunk-B68R7smk.js";import{t as ce}from"./chunk-ew7pLV7g.js";var Ue=()=>[import(`./chunk-CkTQmV5i2.js`).then(t=>t.FormValidationSummaryComponent),VN];var Ke=()=>[];function ze(t,l){if(t&1&&(Js(0,`div`,4),Ny(1,`app-form-validation-summary`,5),fM(2,`async`),hd()),t&2){let e=lS();Pw(),My(`formServerErrors`,hM(2,1,e.formServerErrors$)??eM(3,Ke))}}var Ge=(()=>{class t{constructor(){this.dialogRef=v(ee),this.dialogConfig=v(xe),this.TRANSLATIONS=l.TRANSLATIONS,this.IconNamesEnum=D$1,this.store=v(z),this.isLoading$=this.store.select(s$1.getIsLoading),this.formServerErrors$=this.store.select(s.getServerErrorsByFormName(h.CHECKIN_DELETE_FORM_NAME)),this.destroy$=new ue}ngOnInit(){if(this.store.dispatch(new S(h.CHECKIN_DELETE_FORM_NAME)),this.checkinToDelete=this.dialogConfig.data?.checkinToDelete,!this.checkinToDelete)throw new Error(`Required @Input() properties are missing`)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}onSubmit(){this.store.dispatch(new w$1(this.checkinToDelete.id)).pipe(Yf(this.destroy$)).subscribe({next:()=>{this.store.dispatch(new l$1(this.checkinToDelete.fireplaceId,!0)),this.closeDialog()}})}closeDialog(){this.dialogRef?.destroy(),this.store.dispatch(new S(h.CHECKIN_DELETE_FORM_NAME))}static{this.ɵfac=function(o){return new(o||t)}}static{this.ɵcmp=TT({type:t,selectors:[[`app-checkin-delete`]],inputs:{checkinToDelete:`checkinToDelete`},decls:11,vars:12,consts:()=>{let e;return e="Möchtest du das Checkin wirklich löschen?",[e,[3,`primaryButtonClick`,`secondaryButtonClick`,`closeDialogClick`,`dialogHeader`,`dialogRef`,`primaryButtonLabel`,`secondaryButtonLabel`,`isLoading`],[3,`icon`,`ariaHidden`],[1,`ml-1`],[1,`mb-3`],[3,`formServerErrors`]]},template:function(o,d){o&1&&(Js(0,`app-dialog-container`,1),fM(1,`async`),Yy(`primaryButtonClick`,function(){return d.onSubmit()})(`secondaryButtonClick`,function(){return d.closeDialog()})(`closeDialogClick`,function(){return d.closeDialog()}),hy(2,ze,3,4),y_(3,2,Ue),fM(5,`async`),Js(6,`div`)(7,`p`),Ny(8,`app-icon`,2),Js(9,`span`,3),cS(10,0),hd()()()()),o&2&&(My(`dialogHeader`,d.TRANSLATIONS.deleteConfirm)(`dialogRef`,d.dialogRef)(`primaryButtonLabel`,d.TRANSLATIONS.delete)(`secondaryButtonLabel`,d.TRANSLATIONS.cancel)(`isLoading`,hM(1,8,d.isLoading$)??!1),Pw(3),v_(hM(5,10,d.formServerErrors$)),Pw(5),My(`icon`,d.IconNamesEnum.ExclamationCircle)(`ariaHidden`,!0))},dependencies:[Et$2,y0,VN],encapsulation:2})}}return t})();var Ve=()=>[ho,import(`./chunk-rGrG_FSm.js`).then(t=>t.IconComponent),Ye$1,ht$1];function je(t,l){if(t&1){let e=F_();Ny(0,`p-menu`,1,0),Js(2,`p-button`,2),Yy(`click`,function(d){bp(e);return Tp(vS(1).toggle(d))}),Ny(3,`app-icon`,3),hd()}if(t&2){let e=lS();My(`model`,e.menuItems)(`popup`,!0)(`appendTo`,`body`),Pw(2),My(`pTooltip`,ZS(e.showTooltip()?e.TRANSLATIONS.actions:null))(`outlined`,!0)(`text`,e.buttonAsText())(`rounded`,!0)(`tooltipPosition`,e.showTooltip()?`bottom`:void 0),Sy(`aria-label`,e.TRANSLATIONS.actions),Pw(),My(`icon`,e.IconNamesEnum.ThreeDotsVertical)(`ariaHidden`,!0)}}
1var He=(()=>{class t{constructor(){this.dialogService=v(An),this.checkin=j2.required(),this.buttonAsText=j2(!1),this.showTooltip=j2(!0),this.menuItems=[],this.TRANSLATIONS=l.TRANSLATIONS,this.IconNamesEnum=D$1,this.currentUser$=v(z).select(i.currentUser),this.destroy$=new ue}ngOnInit(){this.initCheckinExtended(),this.initMenuItems()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}onUpdateClick(){this.dialogService.open(ce,D({data:{checkinToCheckout:this.checkin()}},Fn))}onDeleteClick(){this.dialogService.open(Ge,D({data:{checkinToDelete:this.checkin()}},Fn))}initCheckinExtended(){this.checkinExtended$=this.currentUser$.pipe(Yf(this.destroy$),Ht(e=>p$1.applyCrudPermissions(this.checkin(),e,!1)))}initMenuItems(){this.checkinExtended$.pipe(Yf(this.destroy$)).subscribe(e=>{e.canUpdate&&!e.checkOutDate&&this.menuItems.push({label:this.TRANSLATIONS.checkout,command:()=>{this.onUpdateClick()}}),e.canDelete&&this.menuItems.push({label:this.TRANSLATIONS.delete,command:()=>{this.onDeleteClick()}})})}static{this.ɵfac=function(o){return new(o||t)}}static{this.ɵcmp=TT({type:t,selectors:[[`checkins-actions-menu`]],inputs:{checkin:[1,`checkin`],buttonAsText:[1,`buttonAsText`],showTooltip:[1,`showTooltip`]},decls:3,vars:1,consts:[[`menu`,``],[3,`model`,`popup`,`appendTo`],[3,`click`,`outlined`,`text`,`rounded`,`pTooltip`,`tooltipPosition`],[3,`icon`,`ariaHidden`]],template:function(o,d){o&1&&(hy(0,je,4,12),y_(1,0,Ve)),o&2&&(Pw(),v_(d.menuItems.length>0))},dependencies:[ae,ki,pt$1],encapsulation:2})}}return t})();var We=[`dt`];var qe=()=>[import(`./chunk-B_-46_Lx2.js`).then(t=>t.SearchFieldComponent)];var Qe=()=>[import(`./chunk-Cdq1hBiA.js`).then(t=>t.FireplaceLinkComponent)];var Xe=()=>[];function Ye(t,l){if(t&1&&Ny(0,`app-heading`,2),t&2)My(`headingText`,lS(2).title)(`headingLevel`,2)}function Ze(t,l){if(t&1&&(b_(0,Ye,1,2,`app-heading`,2),Js(1,`p`),US(2),hd()),t&2){let e=lS();T_(e.title?0:-1),Pw(2),gv(e.noEntitiesText())}}function Je(t,l){if(t&1&&Ny(0,`app-heading`,8),t&2)My(`headingText`,lS(4).title)(`headingLevel`,2)}function et(t,l){if(t&1){let e=F_();Js(0,`app-search-field`,9),Yy(`inputChange`,function(d){bp(e);return Tp(lS(4).applyFilterGlobal(d,`contains`))})(`resetClick`,function(){bp(e);return Tp(lS(4).applyFilterGlobal(``,`contains`))}),hd()}}function tt(t,l){if(t&1&&(Js(0,`div`,7),b_(1,Je,1,2,`app-heading`,8),hy(2,et,1,0),y_(3,2,qe),hd()),t&2){let e=lS(3);Pw(),T_(e.title?1:-1),Pw(2),v_(e.showSearch)}}function it(t,l){t&1&&py(0,tt,5,2,`ng-template`,3)}function nt(t,l){if(t&1&&Ny(0,`p-sortIcon`,13),t&2)My(`field`,lS(4).sortableColumns.id)}function ot(t,l){if(t&1&&(Js(0,`th`,10),US(1),b_(2,nt,1,1,`p-sortIcon`,13),hd()),t&2){let e=lS(3);My(`pSortableColumn`,e.sortable()?e.sortableColumns.id:void 0),Pw(),Id(` `,e.TRANSLATIONS.id,` `),Pw(),T_(e.sortable()?2:-1)}}function at(t,l){if(t&1&&Ny(0,`p-sortIcon`,13),t&2)My(`field`,lS(4).sortableColumns.fireplaceId)}function lt(t,l){if(t&1&&(Js(0,`th`,11),US(1),b_(2,at,1,1,`p-sortIcon`,13),hd()),t&2){let e=lS(3);My(`pSortableColumn`,e.sortable()?e.sortableColumns.fireplaceId:void 0),Pw(),Id(` `,e.TRANSLATIONS.fireplace,` `),Pw(),T_(e.sortable()?2:-1)}}function rt(t,l){if(t&1&&Ny(0,`p-sortIcon`,13),t&2)My(`field`,lS(4).sortableColumns.checkInDate)}function ct(t,l){if(t&1&&(Js(0,`th`,10),US(1),b_(2,rt,1,1,`p-sortIcon`,13),hd()),t&2){let e=lS(3);My(`pSortableColumn`,e.sortable()?e.sortableColumns.checkInDate:void 0),Pw(),Id(` `,e.i18nCheckinDate,` `),Pw(),T_(e.sortable()?2:-1)}}function st(t,l){if(t&1&&Ny(0,`p-sortIcon`,13),t&2)My(`field`,lS(4).sortableColumns.checkOutDate)}function pt(t,l){if(t&1&&(Js(0,`th`,10),US(1),b_(2,st,1,1,`p-sortIcon`,13),hd()),t&2){let e=lS(3);My(`pSortableColumn`,e.sortable()?e.sortableColumns.checkOutDate:void 0),Pw(),Id(` `,e.i18nCheckoutDate,` `),Pw(),T_(e.sortable()?2:-1)}}function dt(t,l){if(t&1&&Ny(0,`p-sortIcon`,13),t&2)My(`field`,lS(4).sortableColumns.createdBy)}function mt(t,l){if(t&1&&(Js(0,`th`,10),US(1),b_(2,dt,1,1,`p-sortIcon`,13),hd()),t&2){let e=lS(3);My(`pSortableColumn`,e.sortable()?e.sortableColumns.createdBy:void 0),Pw(),Id(` `,e.TRANSLATIONS.createdBy,` `),Pw(),T_(e.sortable()?2:-1)}}function _t(t,l){if(t&1&&Ny(0,`p-sortIcon`,13),t&2)My(`field`,lS(4).sortableColumns.createdOn)}function Ct(t,l){if(t&1&&(Js(0,`th`,10),US(1),b_(2,_t,1,1,`p-sortIcon`,13),hd()),t&2){let e=lS(3);My(`pSortableColumn`,e.sortable()?e.sortableColumns.createdOn:void 0),Pw(),Id(` `,e.TRANSLATIONS.createdOn,` `),Pw(),T_(e.sortable()?2:-1)}}function ht(t,l){if(t&1&&(Js(0,`th`,12),US(1),hd()),t&2){let e=lS(3);Pw(),Id(` `,e.TRANSLATIONS.actions,` `)}}function ut(t,l){if(t&1&&(Js(0,`tr`),b_(1,ot,3,3,`th`,10),b_(2,lt,3,3,`th`,11),b_(3,ct,3,3,`th`,10),b_(4,pt,3,3,`th`,10),b_(5,mt,3,3,`th`,10),b_(6,Ct,3,3,`th`,10),b_(7,ht,2,1,`th`,12),hd()),t&2){let e=lS(2);Pw(),T_(!e.displayedColumns()||e.displayedColumns()?.id?1:-1),Pw(),T_(!e.displayedColumns()||e.displayedColumns()?.fireplaceId?2:-1),Pw(),T_(!e.displayedColumns()||e.displayedColumns()?.checkInDate?3:-1),Pw(),T_(!e.displayedColumns()||e.displayedColumns()?.checkOutDate?4:-1),Pw(),T_(!e.displayedColumns()||e.displayedColumns()?.createdBy?5:-1),Pw(),T_(!e.displayedColumns()||e.displayedColumns()?.createdOn?6:-1),Pw(),T_(e.showActions()?7:-1)}}function ft(t,l){t&1&&(Js(0,`tr`)(1,`td`,14)(2,`div`,15),Ny(3,`app-loading-spinner`),hd()()())}function Tt(t,l){if(t&1&&(Js(0,`td`)(1,`span`,18),US(2),hd(),Js(3,`span`,19),US(4),hd()()),t&2){let e=lS().$implicit,o=lS(2);Pw(2),gv(o.TRANSLATIONS.id),Pw(),My(`appHighlight`,o.searchTerm),Pw(),gv(e.id)}}function xt(t,l){if(t&1&&Ny(0,`fireplaces-link`,20),t&2){let e=lS(2).$implicit,o=lS(2);My(`fireplaceId`,e.fireplaceId)(`searchTerm`,o.searchTerm)}}function gt(t,l){if(t&1&&(Js(0,`td`,16)(1,`span`,18),US(2),hd(),hy(3,xt,1,2),y_(4,3,Qe),hd()),t&2){let e=lS().$implicit,o=lS(2);Pw(2),gv(o.TRANSLATIONS.fireplace),Pw(2),v_(e)}}function kt(t,l){if(t&1&&(Js(0,`td`)(1,`span`,18),US(2),hd(),US(3),fM(4,`date`),hd()),t&2){let e=lS().$implicit,o=lS(2);Pw(2),gv(o.i18nCheckinDate),Pw(),Id(` `,gM(4,2,e.checkInDate,`short`),` `)}}function St(t,l){if(t&1&&(Js(0,`td`)(1,`span`,18),US(2),hd(),US(3),fM(4,`date`),hd()),t&2){let e=lS().$implicit,o=lS(2);Pw(2),gv(o.i18nCheckoutDate),Pw(),Id(` `,gM(4,2,e.checkOutDate,`short`),` `)}}function bt(t,l){if(t&1&&(Js(0,`td`)(1,`span`,18),US(2),hd(),Ny(3,`app-user-chip`,21),hd()),t&2){let e=lS().$implicit,o=lS(2);Pw(2),gv(o.TRANSLATIONS.createdBy),Pw(),My(`user`,e.createdBy)}}function It(t,l){if(t&1&&(Js(0,`td`)(1,`span`,18),US(2),hd(),US(3),fM(4,`date`),hd()),t&2){let e=lS().$implicit,o=lS(2);Pw(2),gv(o.TRANSLATIONS.createdOn),Pw(),Id(` `,gM(4,2,e.createdOn,`short`),` `)}}function yt(t,l){if(t&1&&(Js(0,`td`,17)(1,`span`,18),US(2),hd(),Ny(3,`checkins-actions-menu`,22),hd()),t&2){let e=lS().$implicit,o=lS(2);Pw(2),gv(o.TRANSLATIONS.actions),Pw(),My(`checkin`,e)}}function Et(t,l){if(t&1&&(Js(0,`tr`),b_(1,Tt,5,3,`td`),b_(2,gt,6,2,`td`,16),b_(3,kt,5,5,`td`),b_(4,St,5,5,`td`),b_(5,bt,4,2,`td`),b_(6,It,5,5,`td`),b_(7,yt,4,2,`td`,17),hd()),t&2){let e=lS(2);Pw(),T_(!e.displayedColumns()||e.displayedColumns()?.id?1:-1),Pw(),T_(!e.displayedColumns()||e.displayedColumns()?.fireplaceId?2:-1),Pw(),T_(!e.displayedColumns()||e.displayedColumns()?.checkInDate?3:-1),Pw(),T_(!e.displayedColumns()||e.displayedColumns()?.checkOutDate?4:-1),Pw(),T_(!e.displayedColumns()||e.displayedColumns()?.createdBy?5:-1),Pw(),T_(!e.displayedColumns()||e.displayedColumns()?.createdOn?6:-1),Pw(),T_(e.showActions()?7:-1)}}function vt(t,l){if(t&1&&(Js(0,`p-table`,1,0),fM(2,`async`),fM(3,`async`),fM(4,`async`),fM(5,`async`),b_(6,it,1,0,null,3),py(7,ut,8,7,`ng-template`,4)(8,ft,4,0,`ng-template`,5)(9,Et,8,7,`ng-template`,6),hd()),t&2){let e=lS();My(`value`,hM(2,18,e.checkins$)??eM(26,Xe))(`responsiveLayout`,hM(3,20,e.isMobile$)===!1?`scroll`:`stack`)(`scrollable`,hM(4,22,e.isMobile$)===!1)(`breakpoint`,e.BreakpointService.SCREENSIZE_SM+`px`)(`sortField`,e.sortable()&&e.sortField()?e.sortField():null)(`sortOrder`,e.sortOrder()??-1)(`globalFilterFields`,e.showSearch?e.searchableFields:void 0)(`paginator`,e.showPaginator())(`paginatorLocale`,e.showPaginator()?e.locale:void 0)(`rows`,e.showPaginator()?e.TABLE_CONFIG.PAGINATOR_ROWS_DEFAULT:void 0)(`showCurrentPageReport`,e.showPaginator())(`currentPageReportTemplate`,e.showPaginator()?e.getPaginatorPageReportTemplate(e.TRANSLATIONS.checkins):``)(`rowsPerPageOptions`,e.showPaginator()?e.TABLE_CONFIG.PAGINATOR_ROWS_PER_PAGE_OPTIONS:void 0)(`loading`,hM(5,24,e.tableIsLoading$)===!0)(`showLoader`,!1)(`stateStorage`,`local`)(`stateKey`,e.stateKey?e.TABLE_CONFIG.STATE_KEY_PREFIX+e.stateKey:void 0),Pw(6),T_(e.title||e.showSearch?6:-1)}}var Mi=(()=>{class t{constructor(){this.displayedColumns=j2(void 0),this.sortable=j2(!0),this.sortField=j2(void 0),this.sortOrder=j2(void 0),this.showActions=j2(!0),this.showSearch=!0,this.showPaginator=j2(!0),this.noEntitiesText=j2("Keine Checkins"),this.dt=B2(`dt`),this.locale=v(Et$1),this.isMobile$=v(z).select(a.isMobile),this.sortableColumns={id:`id`,createdOn:`createdOn`,fireplaceId:`fireplaceId`,checkInDate:`checkInDate`,checkOutDate:`checkOutDate`,createdBy:`createdBy.userName`},this.searchableFields=[`id`,`createdBy.userName`],this.TRANSLATIONS=l.TRANSLATIONS,this.BreakpointService=_e,this.TABLE_CONFIG=ot$1,this.getPaginatorPageReportTemplate=at$1,this.i18nCheckinDate="Eingecheckt am",this.i18nCheckoutDate="Ausgecheckt am",this.dataIsLoading$=new Vr(!0),this.explicitIsLoading$=new Vr(sE(!1)),this.tableIsLoading$=mE([this.dataIsLoading$,this.explicitIsLoading$.pipe(Zf(e=>e))]).pipe(Ht(([e,o])=>e||o)),this._checkins$=sE([])}get checkins$(){return this._checkins$}set checkins$(e){this.dataIsLoading$.next(!0),this._checkins$=e.pipe(Qf({next:()=>this.dataIsLoading$.next(!1),error:()=>this.dataIsLoading$.next(!1)}),qf({bufferSize:1,refCount:!0}))}set isLoading$(e){this.explicitIsLoading$.next(e??sE(!1))}ngAfterViewInit(){this.applyFilterGlobal(``,`contains`)}applyFilterGlobal(e,o){this.searchTerm=typeof e==`string`?e:e.target.value,this.dt()?.filterGlobal(this.searchTerm,o)}static{this.ɵfac=function(o){return new(o||t)}}static{this.ɵcmp=TT({type:t,selectors:[[`checkins-table`]],viewQuery:function(o,d){o&1&&tv(d.dt,We,5),o&2&&yS()},inputs:{stateKey:`stateKey`,displayedColumns:[1,`displayedColumns`],sortable:[1,`sortable`],sortField:[1,`sortField`],sortOrder:[1,`sortOrder`],showActions:[1,`showActions`],showSearch:`showSearch`,title:`title`,showPaginator:[1,`showPaginator`],noEntitiesText:[1,`noEntitiesText`],checkins$:`checkins$`,isLoading$:`isLoading$`},decls:4,vars:5,consts:[[`dt`,``],[`styleClass`,`p-datatable-striped`,3,`value`,`responsiveLayout`,`scrollable`,`breakpoint`,`sortField`,`sortOrder`,`globalFilterFields`,`paginator`,`paginatorLocale`,`rows`,`showCurrentPageReport`,`currentPageReportTemplate`,`rowsPerPageOptions`,`loading`,`showLoader`,`stateStorage`,`stateKey`],[3,`headingText`,`headingLevel`],[`pTemplate`,`caption`],[`pTemplate`,`header`],[`pTemplate`,`loadingbody`],[`pTemplate`,`body`],[1,`flex`,`justify-content-between`,`align-items-end`,`flex-wrap`],[1,`ml-3`,3,`headingText`,`headingLevel`],[3,`inputChange`,`resetClick`],[`scope`,`col`,3,`pSortableColumn`],[`scope`,`col`,`pFrozenColumn`,``,3,`pSortableColumn`],[`scope`,`col`,`pFrozenColumn`,``,`alignFrozen`,`right`],[3,`field`],[`colspan`,`100`],[1,`flex`,`justify-content-center`,`p-4`],[`pFrozenColumn`,``],[`pFrozenColumn`,``,`alignFrozen`,`right`],[1,`p-datatable-column-title`],[3,`appHighlight`],[3,`fireplaceId`,`searchTerm`],[3,`user`],[3,`checkin`]],template:function(o,d){o&1&&(b_(0,Ze,3,2),fM(1,`async`),fM(2,`async`),pd(3,vt,10,27,`p-table`,1)),o&2&&T_((hM(1,1,d.checkins$)?.length??0)===0&&hM(2,3,d.tableIsLoading$)!==!0?0:3)},dependencies:[uc,bt$1,Pt,cc,dc,pc,Q,ri,p,He,w,ye,be,VN,zN],encapsulation:2})}}return t})();export{Mi as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.