PageSourceSearch

https://www.personizer.com/app/dd4a804bdc8bb34e8649704a84f9a4337727cef3/chunks/TimeBankWidget.js

js personizer.com collected 2026-10-01 15:34:53 UTC 5,236 bytes, 2 lines download raw bytes

1import{o as e,r as t}from"./rolldown-runtime.js";import{Bi as n,Fi as r,Li as i,Mn as a,Oi as o,Ri as s,Xi as ee,di as c,fr as l,ic as u,js as d,lc as f,ld as p,sc as m,xa as h,yi as g}from"./composables.js";import{Aa as _,Ba as v,Go as y,Ia as b,Io as x,Ma as S,Na as C,No as w,Pa as T,To as E,Vo as D,Wa as O,ao as k,bo as A,do as j,hi as M,ja as N,jo as P,la as F,mi as I,oa as L,yo as R,za as z}from"./assets.js";import{t as B}from"./OvertimeInactive.js";O(),D();var te=e(c()),V=z({components:{OvertimeInactive:B},props:{showNavButton:{default:!1,type:Boolean},isMinimal:{default:!1,type:Boolean},isMockData:{default:!1,type:Boolean},maxValueHours:{default:40,type:Number},maxDegree:{default:86,type:Number},minDegree:{default:-86,type:Number},data:{type:Object},isAdminMode:{default:!1,type:Boolean},searchString:{required:!1,type:String},searchResult:{required:!1,type:Boolean},disabled:{type:Boolean,default:!1},selectedDate:{type:Date,default:null}},setup(e,{emit:t}){let c=m()||u(),{localeFormat:h,durationToStdMinString:b,durationToHours:x}=r(),{currentUser:S}=f(),{isDarkMode:C}=ee(),{isStandardPlanOrAbove:w}=o(),{router:T}=g(),{isOvertimeFeatureEnabled:E}=l(),{canManageAccount:D}=d(),{result:O}=a(void 0,_(()=>e.selectedDate??null)),k=v()?.appContext.config.globalProperties,A=y({startUser:p(new Date,29),endUser:new Date,debugInput:0});function j(e){let t=Math.abs(e);return e>0?t**(3/4):-(t**(3/4))}async function N(){if(!w.value){k?.$upgradeDialog.show({targetPlan:`standard`,targetModule:`time-tracking`,targetFeature:`time-tracking`});return}await T.push({name:`TimeTracking`,params:{page:`time-bank`}})}let P=_(()=>e.isMockData?{timeBankAmount:`P0Y0M0DT3H25M0S`,maxAmount:`P0Y0M1DT16H0M0S`,lastUpdated:`2024-10-10T08:52:22.754Z`}:e.data?e.data:O.value),L=_(()=>{if(P.value){let t=j(s(n(P.value.timeBankAmount))/1e3/60/60/e.maxValueHours)*e.maxDegree;return t>e.maxDegree?e.maxDegree:t<e.minDegree?e.minDegree:t}return 0});function z(e,t=!1){return b(e,t,!0,999)}return R(()=>{if(e.searchString&&e.searchString.trim().length>0){let n=[F.global.t(`timebank.timebank`)],r=te.default.go(e.searchString,n);r&&t(`update:searchResult`,r.length>0)}else t(`update:searchResult`,!1)}),{state:A,currentUser:S,localeFormat:h,timebankDanger:M,timebankArrow:I,balanceToRotation:L,convertDurationToTimeString:i,parseIsoDuration:n,durationToString:z,durationToHours:x,isTesting:c,isDarkMode:C,gotoTimeBank:N,isOvertimeFeatureEnabled:E,canManageAccount:D,timeBankData:P}}}),H=t({default:()=>$});E(),O();var U={key:0,class:`text-h6 mb-7 text-typePrimary`},W={class:`timebank-widget__arc`},G=N(`svg`,{width:`240`,height:`121`,viewBox:`0 0 240 121`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},[N(`path`,{"fill-rule":`evenodd`,"clip-rule":`evenodd`,d:`M120 19.8766C64.3297 19.8766 19.2 65.0063 19.2 120.677H0C0 54.4024 53.7258 0.67659 120 0.67659C186.274 0.67659 240 54.4024 240 120.677H220.8C220.8 65.0063 175.67 19.8766 120 19.8766Z`})],-1),K=[`src`],q={key:1,class:`timebank-widget__zero-indicator text-textDescription`},J=[N(`div`,{class:`timebank-widget__arrow`},[N(`svg`,{width:`22`,height:`14`,viewBox:`0 0 22 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},[N(`path`,{d:`M12.2135 13.4468C11.5676 14.1844 10.4324 14.1844 9.78651 13.4468L0.413279 2.74298C-0.517437 1.68014 0.225852 -4.66089e-07 1.62676 -4.66089e-07L20.3732 -4.66089e-07C21.7741 -4.66089e-07 22.5174 1.68014 21.5867 2.74298L12.2135 13.4468Z`})])],-1)],Y={key:2,class:`timebank-widget__big-value`},X={key:3,class:`timebank-widget__big-value`},Z={key:1,style:{height:`60px`}},Q={key:2,class:P({"text-body-2 text-typeSecondary mt-5":!0})},ne={key:0},re={key:1},ie={key:4};function ae(e,t,n,r,i,a){let o=j(`overtime-inactive`);return k(),T(`div`,{class:P({"timebank-widget":!0,widget:!e.isMinimal&&!e.isAdminMode,"is-minimal":e.isMinimal,"is-adminmode":e.isAdminMode,"no-amount":!e.timeBankData?.timeBankAmount,disabled:e.disabled})},[!e.isMinimal&&!e.isAdminMode?(k(),T(`div`,U,x(e.$t(`timebank.timebank`)),1)):C(``,!0),N(`div`,W,[G,e.isMinimal?C(``,!0):(k(),T(`img`,{key:0,src:e.timebankDanger,class:`timebank-widget__arc-danger`}
1,null,8,K)),e.isMinimal?C(``,!0):(k(),T(`div`,q,`0`)),N(`div`,{class:`timebank-widget__arrow-wrapper`,style:w(`transform: translateX(-50%) rotate(`+e.balanceToRotation+`deg);`)},J,4),e.isMinimal&&e.timeBankData?(k(),T(`div`,Y,x(e.durationToHours(e.timeBankData.timeBankAmount,999,-999)),1)):e.timeBankData?(k(),T(`div`,X,x(e.durationToString(e.timeBankData.timeBankAmount,!0)),1)):C(``,!0)]),e.showNavButton?C(``,!0):(k(),T(`div`,Z)),!e.isMinimal&&!e.isAdminMode&&e.timeBankData?(k(),T(`div`,Q,[e.timeBankData.lastUpdated?(k(),T(`span`,re,x(e.$t(`timebank.lastUpdated`)+` `+e.localeFormat(new Date(e.timeBankData.lastUpdated),`PP`)),1)):(k(),T(`span`,ne,x(e.$t(`timebank.lastUpdated`)+` `+e.localeFormat(new Date,`PP`)),1))])):C(``,!0),e.showNavButton&&!e.isMinimal?(k(),S(h,{key:3,variant:`outlined`,size:`small`,class:`mt-8 fill-width`,onClick:e.gotoTimeBank},{default:A(()=>[b(x(e.$t(`timebank.btnGoToTimebank`)),1)]),_:1},8,[`onClick`])):C(``,!0),e.isMockData?C(``,!0):(k(),T(`div`,ie,[e.isMinimal?C(``,!0):(k(),S(o,{key:0}))]))],2)}var $=L(V,[[`render`,ae]]);export{H as n,$ as t};
2//# sourceMappingURL=TimeBankWidget.js.map

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.