1"use strict";(globalThis["webpackChunkfrontend"]=globalThis["webpackChunkfrontend"]||[]).push([[6813],{36813:(e,t,s)=>{s.r(t),s.d(t,{default:()=>_t});var i=s(61758),o=s(58790);const r=e=>((0,i.Qi)("data-v-ae3532da"),e=e(),(0,i.jt)(),e),a={class:"column no-wrap page-wrapper workforce-activity-page"},n={class:"col-auto row justify-between no-wrap items-center"},l={class:"row items-center no-wrap"},c=r((()=>(0,i.Lk)("div",{class:"header"},"Workforce Activity",-1))),d=r((()=>(0,i.Lk)("span",{class:"btn-text"},"Export CSV",-1))),u={class:"col-auto column no-wrap q-mt-md"},m={class:"section-title q-mb-sm"},p={class:"row no-wrap",style:{gap:"12px"}},h={class:"wa-stat-label"},v={class:"wa-stat-value"},y={key:0,class:"col-auto page-role-select"},f={key:1,class:"row no-wrap items-center page-tabs"},_={key:2,class:"page-tabs-select"},k=["onClick"],w={key:0,class:"wa-ops-sub"},g={key:0,class:"wa-ops-sub"},b={key:0,class:"wa-ops-sub"},C={key:0,class:"wa-ops-sub"},A={key:0,class:"wa-ops-sub"},S=["onClick"],F={key:1},L={class:"row no-wrap mobile-row"},T={class:"col"},E={class:"row items-center"},x={class:"mobile-column-header"},W=["onClick"],M={class:"mobile-column-header"},R=["onClick"],O={class:"row no-wrap mobile-row"},I={class:"col"},D={class:"row items-center"},X={class:"mobile-column-header"},$=["onClick"],N={class:"mobile-column-header"};function j(e,t,s,r,j,q){const B=(0,i.g2)("WorkforceAboutContent"),Q=(0,i.g2)("q-tooltip"),K=(0,i.g2)("q-icon"),P=(0,i.g2)("q-btn"),U=(0,i.g2)("ScrollableBlock"),V=(0,i.g2)("WorkforceRoleFilter"),z=(0,i.g2)("SimpleSelect"),H=(0,i.g2)("DateSelector"),G=(0,i.g2)("q-td"),Y=(0,i.g2)("BaseTable"),Z=(0,i.g2)("WorkforceEmployeeDialog"),J=(0,i.g2)("q-page");return(0,i.uX)(),(0,i.Wv)(J,null,{default:(0,i.k6)((()=>[(0,i.Lk)("div",a,[(0,i.Lk)("div",n,[(0,i.Lk)("div",l,[c,e.$q.screen.gt.xs?((0,i.uX)(),(0,i.Wv)(K,{key:0,name:"help_outline",class:"wa-about-icon"},{default:(0,i.k6)((()=>[(0,i.bF)(Q,{anchor:"bottom middle",self:"top middle","max-width":"420px"},{default:(0,i.k6)((()=>[(0,i.bF)(B)])),_:1})])),_:1})):(0,i.Q3)("",!0)]),(0,i.bF)(P,{class:"orange-with-text-btn",unelevated:"","no-caps":"","no-wrap":"",loading:e.exp
1orting,disable:"processed"===e.currentTab?!e.workforceActivityStore.processedList.length:!e.workforceActivityStore.activityList.length,onClick:e.exportReport},{default:(0,i.k6)((()=>[d])),_:1},8,["loading","disable","onClick"])]),(0,i.Lk)("div",u,[(0,i.Lk)("div",m,(0,o.v_)(e.mediansTitle),1),(0,i.bF)(U,{horizontal:"","show-arrows":!1,"hide-scrollbar":!0},{default:(0,i.k6)((()=>[(0,i.Lk)("div",p,[((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(e.medianTiles,(e=>((0,i.uX)(),(0,i.CE)("div",{class:"wa-stat-card",key:e.key},[(0,i.Lk)("div",h,(0,o.v_)(e.label),1),(0,i.Lk)("div",v,(0,o.v_)(e.value),1)])))),128))])])),_:1})]),e.roleOptions.length&&!e.roleFilterInToolbar?((0,i.uX)(),(0,i.CE)("div",y,[(0,i.bF)(V,{fullWidth:"",items:e.roleOptions,selected:e.selectedRoles,onChange:e.onRoleChange},null,8,["items","selected","onChange"])])):(0,i.Q3)("",!0),e.$q.screen.gt.xs?((0,i.uX)(),(0,i.CE)("div",f,[(0,i.Lk)("div",{class:(0,o.C4)(["flex flex-center page-tab",{active:"processed"===e.currentTab}]),onClick:t[0]||(t[0]=t=>e.currentTab="processed")}," Processed work ",2),(0,i.Lk)("div",{class:(0,o.C4)(["flex flex-center page-tab",{active:"raw"===e.currentTab}]),onClick:t[1]||(t[1]=t=>e.currentTab="raw")}," Raw operations ",2)])):((0,i.uX)(),(0,i.CE)("div",_,[(0,i.bF)(z,{class:"input-full-width",items:e.tabSelectItems,selectedItem:e.currentTabSelectItem,miniStyle:"",prefix:"View:",onChange:t[2]||(t[2]=t=>e.currentTab=t.value)},null,8,["items","selectedItem"])])),"processed"===e.currentTab?((0,i.uX)(),(0,i.Wv)(Y,{key:3,class:"col",ref:"processedTable",tableName:"workforceProcessedTable",columns:e.processedColumns,items:e.workforceActivityStore.processedList,fetchFunction:e.workforceActivityStore.fetchProcessed,filters:e.workforceActivityStore.activityListFilters,setFiltersValueByKey:e.workforceActivityStore.setFiltersValueByKey,selectable:!1,fullscreenAllowed:!0},{toolbar:(0,i.k6)((()=>[(0,i.bF)(H,{class:"toolbar-margin-right",selectedItem:e.dateRange,items:[e.periods.sevenDays,e.periods.thirtyDays,e.periods.ninetyDays],mini:!0,customDate:!0,useQuery:!0,onChange:e.onDateChange},null,8,["selectedItem","items","onChange"]),e.roleOptions.length&&e.roleFilterInToolbar?((0,i.uX)(),(0,i.Wv)(V,{key:0,items:e.roleOptions,selected:e.selectedRoles,onChange:e.onRoleChange},null,8,["items","selected","onChange"])):(0,i.Q3)("",!0)])),name:(0,i.k6)((t=>[(0,i.bF)(G,{class:"no-wrap-line"},{default:(0,i.k6)((()=>[(0,i.Lk)("span",{class:"element-with-link underlined-element cursor-pointer",onClick:s=>e.openEmployee(t.item.row)},(0,o.v_)(t.item.row.name),9,k)])),_:2},1024)])),orders:(0,i.k6)((t=>[(0,i.bF)(G,{style:(0,o.Tr)(e.heatStyle(t.item.row.orders,"orders"))},{default:(0,i.k6)((()=>[(0,i.eW)((0,o.v_)(t.item.row.orders),1),t.item.row.orders?((0,i.uX)(),(0,i.CE)("span",w,"("+(0,o.v_)(t.item.row.order_status_changes)+")",1)):(0,i.Q3)("",!0)])),_:2}
1,1032,["style"])])),fbm_orders:(0,i.k6)((t=>[(0,i.bF)(G,{style:(0,o.Tr)(e.heatStyle(t.item.row.fbm_orders,"fbm_orders"))},{default:(0,i.k6)((()=>[(0,i.eW)((0,o.v_)(t.item.row.fbm_orders),1),t.item.row.fbm_orders?((0,i.uX)(),(0,i.CE)("span",g,"("+(0,o.v_)(t.item.row.fbm_orders_ops)+")",1)):(0,i.Q3)("",!0)])),_:2},1032,["style"])])),workflows:(0,i.k6)((t=>[(0,i.bF)(G,{style:(0,o.Tr)(e.heatStyle(t.item.row.workflows,"workflows"))},{default:(0,i.k6)((()=>[(0,i.eW)((0,o.v_)(t.item.row.workflows),1),t.item.row.workflows?((0,i.uX)(),(0,i.CE)("span",b,"("+(0,o.v_)(t.item.row.workflows_ops)+")",1)):(0,i.Q3)("",!0)])),_:2},1032,["style"])])),shipments:(0,i.k6)((t=>[(0,i.bF)(G,{style:(0,o.Tr)(e.heatStyle(t.item.row.shipments,"shipments"))},{default:(0,i.k6)((()=>[(0,i.eW)((0,o.v_)(t.item.row.shipments),1),t.item.row.shipments?((0,i.uX)(),(0,i.CE)("span",C,"("+(0,o.v_)(t.item.row.shipments_ops)+")",1)):(0,i.Q3)("",!0)])),_:2},1032,["style"])])),receipts:(0,i.k6)((t=>[(0,i.bF)(G,{style:(0,o.Tr)(e.heatStyle(t.item.row.receipts,"receipts"))},{default:(0,i.k6)((()=>[(0,i.eW)((0,o.v_)(t.item.row.receipts),1),t.item.row.receipts?((0,i.uX)(),(0,i.CE)("span",A,"("+(0,o.v_)(t.item.row.receipts_ops)+")",1)):(0,i.Q3)("",!0)])),_:2}
1,1032,["style"])])),supplies:(0,i.k6)((t=>[(0,i.bF)(G,{style:(0,o.Tr)(e.heatStyle(t.item.row.supplies,"supplies"))},{default:(0,i.k6)((()=>[(0,i.eW)((0,o.v_)(t.item.row.supplies),1)])),_:2},1032,["style"])])),units:(0,i.k6)((t=>[(0,i.bF)(G,{style:(0,o.Tr)(e.heatStyle(t.item.row.units,"units"))},{default:(0,i.k6)((()=>[(0,i.eW)((0,o.v_)(t.item.row.units),1)])),_:2},1032,["style"])])),distinct_skus:(0,i.k6)((t=>[(0,i.bF)(G,{style:(0,o.Tr)(e.heatStyle(t.item.row.distinct_skus,"distinct_skus"))},{default:(0,i.k6)((()=>[(0,i.eW)((0,o.v_)(t.item.row.distinct_skus),1)])),_:2},1032,["style"])])),entities_total:(0,i.k6)((t=>[(0,i.bF)(G,{style:(0,o.Tr)(e.heatStyle(t.item.row.entities_total,"entities_total"))},{default:(0,i.k6)((()=>[(0,i.Lk)("b",null,(0,o.v_)(t.item.row.entities_total),1)])),_:2},1032,["style"])])),ops:(0,i.k6)((t=>[(0,i.bF)(G,{style:(0,o.Tr)(e.heatStyle(t.item.row.ops,"ops"))},{default:(0,i.k6)((()=>[(0,i.eW)((0,o.v_)(t.item.row.ops),1)])),_:2},1032,["style"])])),entity_actions:(0,i.k6)((t=>[(0,i.bF)(G,{style:(0,o.Tr)(e.heatStyle(t.item.row.entity_actions,"entity_actions"))},{default:(0,i.k6)((()=>[(0,i.eW)((0,o.v_)(e.fmtNum(t.item.row.entity_actions)),1)])),_:2}
1,1032,["style"])])),ops_per_entity:(0,i.k6)((t=>[(0,i.bF)(G,null,{default:(0,i.k6)((()=>[(0,i.eW)((0,o.v_)(e.fmtNum(t.item.row.ops_per_entity)),1)])),_:2},1024)])),patterns_count:(0,i.k6)((t=>[(0,i.bF)(G,null,{default:(0,i.k6)((()=>[t.item.row.patterns_count>0?((0,i.uX)(),(0,i.CE)("span",{key:0,class:"wa-flag cursor-pointer",onClick:s=>e.openEmployee(t.item.row)}," â "+(0,o.v_)(t.item.row.patterns_count),9,S)):((0,i.uX)(),(0,i.CE)("span",F,"â"))])),_:2},1024)])),prev:(0,i.k6)((()=>[(0,i.bF)(G,{colspan:"100%"})])),mobile_view:(0,i.k6)((t=>{var s;return[(0,i.Lk)("div",L,[(0,i.Lk)("div",T,[(0,i.Lk)("div",E,[(0,i.Lk)("div",x,(0,o.v_)((null===(s=e.processedColumns.find((e=>"name"==e.name)))||void 0===s?void 0:s.label)+":"),1),(0,i.Lk)("div",{class:"element-with-link underlined-element cursor-pointer",onClick:s=>e.openEmployee(t.item.row)},(0,o.v_)(t.item.row.name),9,W)]),((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(e.mobileCells(t.item),(e=>((0,i.uX)(),(0,i.CE)("div",{key:e.name,class:"row items-center q-mt-sm"},[(0,i.Lk)("div",M,(0,o.v_)(e.label)+":",1),(0,i.Lk)("div",{class:(0,o.C4)({"wa-flag":e.flagged})},(0,o.v_)(e.value),3)])))),128))])])]})),_:1},8,["columns","items","fetchFunction","filters","setFiltersValueByKey"])):((0,i.uX)(),(0,i.Wv)(Y,{key:4,class:"col",ref:"activityTable",tableName:"workforceActivityTable",columns:e.columns,items:e.workforceActivityStore.activityList,fetchFunction:e.workforceActivityStore.fetchActivity,filters:e.workforceActivityStore.activityListFilters,setFiltersValueByKey:e.workforceActivityStore.setFiltersValueByKey,selectable:!1,fullscreenAllowed:!0},{toolbar:(0,i.k6)((()=>[(0,i.bF)(H,{class:"toolbar-margin-right",selectedItem:e.dateRange,items:[e.periods.sevenDays,e.periods.thirtyDays,e.periods.ninetyDays],mini:!0,customDate:!0,useQuery:!0,onChange:e.onDateChange},null,8,["selectedItem","items","onChange"]),e.roleOptions.length&&e.roleFilterInToolbar?((0,i.uX)(),(0,i.Wv)(V,{key:0,items:e.roleOptions,selected:e.selectedRoles,onChange:e.onRoleChange},null,8,["items","selected","onChange"])):(0,i.Q3)("",!0)])),name:(0,i.k6)((t=>[(0,i.bF)(G,{class:"no-wrap-line"},{default:(0,i.k6)((()=>[(0,i.Lk)("span",{class:"element-with-link underlined-element cursor-pointer",onClick:s=>e.openEmployee(t.item.row)},(0,o.v_)(t.item.row.name),9,R)])),_:2},1024)])),ops:(0,i.k6)((e=>[(0,i.bF)(G,null,{default:(0,i.k6)((()=>[(0,i.eW)((0,o.v_)(e.item.row.ops),1)])),_:2},1024)])),measured_moments:(0,i.k6)((t=>[(0,i.bF)(G,null,{default:(0,i.k6)((()=>[(0,i.eW)((0,o.v_)(e.fmtNum(t.item.row.measured_moments)),1)])),_:2},1024)])),active_hours:(0,i.k6)((t=>[(0,i.bF)(G,null,{default:(0,i.k6)((()=>[(0,i.eW)((0,o.v_)(e.fmtNum(t.item.row.active_hours)),1)])),_:2},1024)])),moments_per_active_hour:(0,i.k6)((t=>[(0,i.bF)(G,null,{default:(0,i.k6)((()=>[(0,i.eW)((0,o.v_)(e.fmtNum(t.item.row.moments_per_active_hour)),1)])),_:2},1024)])),units:(0,i.k6)((e=>[(0,i.bF)(G,null,{default:(0,i.k6)((()=>[(0,i.eW)((0,o.v_)(e.item.row.units),1)])),_:2},1024)])),distinct_skus:(0,i.k6)((e=>[(0,i.bF)(G,null,{default:(0,i.k6)((()=>[(0,i.eW)((0,o.v_)(e.item.row.distinct_skus),1)])),_:2},1024)])),adjustment_ratio:(0,i.k6)((t=>[(0,i.bF)(G,null,{default:(0,i.k6)((()=>[(0,i.eW)((0,o.v_)(e.fmtRatio(t.item.row.adjustment_ratio)),1)])),_:2},1024)])),active_days:(0,i.k6)((e=>[(0,i.bF)(G,null,{default:(0,i.k6)((()=>[(0,i.eW)((0,o.v_)(e.item.row.active_days),1)])),_:2},1024)])),median_gap_seconds:(0,i.k6)((t=>[(0,i.bF)(G,null,{default:(0,i.k6)((()=>[(0,i.eW)((0,o.v_)(e.fmtGap(t.item.row.median_gap_seconds)),1)])),_:2},1024)])),prev:(0,i.k6)((()=>[(0,i.bF)(G,{colspan:"100%"})])),mobile_view:(0,i.k6)((t=>{var s;return[(0,i.Lk)("div",O,[(0,i.Lk)("div",I,[(0,i.Lk)("div",D,[(0,i.Lk)("div",X,(0,o.v_)((null===(s=e.columns.find((e=>"name"==e.name)))||void 0===s?void 0:s.label)+":"),1),(0,i.Lk)("div",{class:"element-with-link underlined-element cursor-pointer",onClick:s=>e.openEmployee(t.item.row)},(0,o.v_)(t.item.row.name),9,$)]),((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(e.mobileCells(t.item),(e=>((0,i.uX)(),(0,i.CE)("div",{key:e.name,class:"row items-center q-mt-sm"},[(0,i.Lk)("div",N,(0,o.v_)(e.label)+":",1),(0,i.Lk)("div",null,(0,o.v_)(e.value),1)])))),128))])])]})),_:1},8,["columns","items","fetchFunction","filters","setFiltersValueByKey"])),(0,i.bF)(Z,{ref:"employeeDialog"},null,512)])])),_:1})}var q=s(12150),B=s(71384),Q=s(45406),K=s(78762),P=s(62005),U=s(22580);const V={class:"wa-about"}
1,z=(0,i.Fv)('<div class="wa-about-block" data-v-ecdc79e2><div class="wa-about-title" data-v-ecdc79e2>What this page is</div> A per-employee summary of the work logged in the warehouse over the selected period. </div><div class="wa-about-block" data-v-ecdc79e2><div class="wa-about-title" data-v-ecdc79e2>Where the numbers come from</div> Every row written to the operations log â Replenish, Withdraw, Correct, Produce, Move, Write-off, Reserve, Return to shelf, Reassign â plus order status changes from the order log, which are the only reliable trace of DTC order work. </div><div class="wa-about-block" data-v-ecdc79e2><div class="wa-about-title" data-v-ecdc79e2>The two views</div><b data-v-ecdc79e2>Processed work</b> â how many distinct things were handled (orders, FBM orders, shipments, receipts, supplies, workflows), how many operations each of them took, and review flags. <br data-v-ecdc79e2><b data-v-ecdc79e2>Raw operations</b> â the plain count of logged operations plus pace and rhythm: ops per active hour, manual adjustments, active days, median gap. </div>',3),H=[z];function G(e,t,s,o,r,a){return(0,i.uX)(),(0,i.CE)("div",V,H)}const Y=(0,i.pM)({name:"WorkforceAboutContent"});var Z=s(12807),J=s(97410),ee=s(98582),te=s.n(ee);const se=(0,Z.A)(Y,[["render",G],["__scopeId","data-v-ecdc79e2"]]),ie=se;te()(Y,"components",{QTooltip:J.A});const oe={class:"bottom-dialog-header"};function re(e,t,s,r,a,n){const l=(0,i.g2)("WorkforceEmployeeDetailContent"),c=(0,i.g2)("ScrollableBlock"),d=(0,i.g2)("CenterDialog"),u=(0,i.g2)("BottomDialog");return e.$q.screen.gt.xs?((0,i.uX)(),(0,i.Wv)(d,{key:0,ref:"centerDialog",dialogClass:"workforce-employee-dialog",position:"top"},{title:(0,i.k6)((()=>[(0,i.eW)((0,o.v_)(e.title),1)])),content:(0,i.k6)((()=>[(0,i.bF)(c,{class:"col",style:{overflow:"hidden"},showArrows:!1},{default:(0,i.k6)((()=>[(0,i.bF)(l,{summary:e.summaryRow,detail:e.workforceActivityStore.employeeDetail,alerts:e.workforceActivityStore.alerts,medians:e.workforceActivityStore.teamMedians,processedMedians:e.workforceActivityStore.processedMedians,period:e.periodLabel},null,8,["summary","detail","alerts","medians","processedMedians","period"])])),_:1})])),_:1},512)):((0,i.uX)(),(0,i.Wv)(u,{key:1,ref:"bottomDialog",dialogClass:"workforce-employee-dialog"},{default:(0,i.k6)((()=>[(0,i.Lk)("div",oe,(0,o.v_)(e.title),1),(0,i.bF)(l,{summary:e.summaryRow,detail:e.workforceActivityStore.employeeDetail,alerts:e.workforceActivityStore.alerts,medians:e.workforceActivityStore.teamMedians,processedMedians:e.workforceActivityStore.processedMedians,period:e.periodLabel},null,8,["summary","detail","alerts","medians","processedMedians","period"])])),_:1},512))}var ae=s(29331),ne=s(21730);const le=e=>((0,i.Qi)("data-v-734a433c"),e=e(),(0,i.jt)(),e),ce={class:"workforce-employee-content column no-wrap"},de={key:0,class:"wa-period"},ue={class:"row wa-hero"},me={class:"wa-hero-label"},pe={class:"wa-hero-value"},he={class:"wa-hero-median"},ve={class:"row wa-metric-groups"},ye={class:"wa-metric-title"},fe={class:"wa-metric-label"},_e={key:0,class:"wa-metric-sub"},ke={class:"charts-row q-mt-md"},we={class:"chart-box"},ge={class:"chart-title"},be={class:"chart-canvas"},Ce={class:"chart-box"},Ae={class:"chart-title"},Se={class:"chart-canvas"},Fe={class:"q-mt-md"},Le=le((()=>(0,i.Lk)("div",{class:"section-title q-mb-sm"},"By operation type",-1))),Te={class:"row items-center wa-chips",style:{gap:"8px","flex-wrap":"wrap"}},Ee={key:0,class:"empty-text"},xe={class:"q-mt-md"},We=le((()=>(0,i.Lk)("div",{class:"section-title q-mb-sm"},"Anomaly notes",-1))),Me={key:0,class:"empty-text"},Re={class:"alert-head"},Oe={class:"alert-msg"},Ie={class:"q-mt-md"},De=le((()=>(0,i.Lk)("div",{class:"section-title q-mb-sm"},"Patterns to review",-1))),Xe={key:0,class:"empty-text"},$e={class:"pattern-head"},Ne=["href","title"],je={class:"pattern-msg"};function qe(e,t,s,r,a,n){const l=(0,i.g2)("q-tooltip"),c=(0,i.g2)("q-icon"),d=(0,i.g2)("BarChart");return(0,i.uX)(),(0,i.CE)("div",ce,[e.period?((0,i.uX)(),(0,i.CE)("div",de,"Period: "+(0,o.v_)(e.period),1)):(0,i.Q3)("",!0),(0,i.Lk)("div",ue,[((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(e.heroTiles,(e=>((0,i.uX)(),(0,i.CE)("div",{class:"wa-hero-card",key:e.key},[(0,i.Lk)("div",me,[(0,i.eW)((0,o.v_)(e.label)+" ",1),e.hint?((0,i.uX)(),(0,i.Wv)(c,{key:0,name:"help_outline",size:"14px",class:"wa-hint"},{default:(0,i.k6)((()=>[(0,i.bF)(l,{anchor:"bottom middle",self:"top middle","max-width":"240px"},{default:(0,i.k6)((()=>[(0,i.eW)((0,o.v_)(e.hint),1)])),_:2},1024)])),_:2},1024)):(0,i.Q3)("",!0)]),(0,i.Lk)("div",pe,(0,o.v_)(e.value),1),(0,i.Lk)("div",he,"median "+(0,o.v_)(e.median),1)])))),128))]),(0,i.Lk)("div",ve,[((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(e.metricGroups,(e=>((0,i.uX)(),(0,i.CE)("div",{class:"wa-metric-group",key:e.key}
1,[(0,i.Lk)("div",ye,(0,o.v_)(e.title),1),((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(e.rows,(e=>((0,i.uX)(),(0,i.CE)("div",{class:"wa-metric-row",key:e.key},[(0,i.Lk)("span",fe,[(0,i.eW)((0,o.v_)(e.label)+" ",1),e.hint?((0,i.uX)(),(0,i.Wv)(c,{key:0,name:"help_outline",size:"14px",class:"wa-hint"},{default:(0,i.k6)((()=>[(0,i.bF)(l,{anchor:"bottom middle",self:"top middle","max-width":"240px"},{default:(0,i.k6)((()=>[(0,i.eW)((0,o.v_)(e.hint),1)])),_:2},1024)])),_:2},1024)):(0,i.Q3)("",!0)]),(0,i.Lk)("span",{class:(0,o.C4)(["wa-metric-value",{muted:e.muted}])},[(0,i.eW)((0,o.v_)(e.value)+" ",1),e.sub?((0,i.uX)(),(0,i.CE)("span",_e,(0,o.v_)(e.sub),1)):(0,i.Q3)("",!0)],2)])))),128))])))),128))]),(0,i.Lk)("div",ke,[(0,i.Lk)("div",we,[(0,i.Lk)("div",ge,[(0,i.eW)(" Operations by hour of day "),(0,i.bF)(c,{name:"help_outline",size:"14px",class:"wa-hint"},{default:(0,i.k6)((()=>[(0,i.bF)(l,{anchor:"bottom middle",self:"top middle","max-width":"240px"},{default:(0,i.k6)((()=>[(0,i.eW)(" Totals for the whole period, not an average day: the 12 bar is every operation logged between 12:00 and 12:59 on any day of the period. Hours are read off the warehouse clock. ")])),_:1})])),_:1})]),(0,i.Lk)("div",be,[(0,i.bF)(d,{chartData:e.hourlyChartData,chartOptions:e.chartOptions},null,8,["chartData","chartOptions"])])]),(0,i.Lk)("div",Ce,[(0,i.Lk)("div",Ae,[(0,i.eW)(" Weekly trend "),(0,i.bF)(c,{name:"help_outline",size:"14px",class:"wa-hint"},{default:(0,i.k6)((()=>[(0,i.bF)(l,{anchor:"bottom middle",self:"top middle","max-width":"240px"},{default:(0,i.k6)((()=>
1[(0,i.eW)(" Operations logged per calendar week. The first and last bars can cover part of a week, depending on where the selected period starts and ends. ")])),_:1})])),_:1})]),(0,i.Lk)("div",Se,[(0,i.bF)(d,{chartData:e.weeklyChartData,chartOptions:e.chartOptions},null,8,["chartData","chartOptions"])])])]),(0,i.Lk)("div",Fe,[Le,(0,i.Lk)("div",Te,[((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(e.byType,((e,t)=>((0,i.uX)(),(0,i.CE)("div",{class:"wa-chip",key:t},[(0,i.eW)((0,o.v_)(t)+": ",1),(0,i.Lk)("b",null,(0,o.v_)(e),1)])))),128)),Object.keys(e.byType).length?(0,i.Q3)("",!0):((0,i.uX)(),(0,i.CE)("div",Ee," No operations in this period. "))])]),(0,i.Lk)("div",xe,[We,e.alerts.length?(0,i.Q3)("",!0):((0,i.uX)(),(0,i.CE)("div",Me," No anomaly notes in this period. ")),((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(e.alerts,(t=>((0,i.uX)(),(0,i.CE)("div",{class:"alert-card",key:t.id},[(0,i.Lk)("div",Re,(0,o.v_)(t.date)+" · "+(0,o.v_)(e.prettyType(t.alert_type)),1),(0,i.Lk)("div",Oe,(0,o.v_)(t.message),1)])))),128))]),(0,i.Lk)("div",Ie,[De,e.patterns.length?(0,i.Q3)("",!0):((0,i.uX)(),(0,i.CE)("div",Xe," No patterns to review in this period. ")),((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(e.patterns,((t,s)=>((0,i.uX)(),(0,i.CE)("div",{class:"pattern-card",key:s},[(0,i.Lk)("div",$e,[(0,i.eW)(" â "+(0,o.v_)(e.prettyType(t.pattern))+" · "+(0,o.v_)(t.entity_type)+" · Ã"+(0,o.v_)(t.count)+" ",1),e.patternLink(t)?((0,i.uX)(),(0,i.CE)("a",{key:0,href:e.patternLink(t),target:"_blank",rel:"noopener",class:"pattern-link",title:`Open the ${t.entity_type} in a new tab`},[(0,i.bF)(c,{name:"open_in_new",size:"14px"})],8,Ne)):(0,i.Q3)("",!0)]),(0,i.Lk)("div",je,(0,o.v_)(t.message),1)])))),128))])])}var Be=s(98067);const Qe={entities_total:'Orders + FBM orders + Shipments + Receipts + Supplies + Workflows. Receipts and Supplies overlap on purpose: a supply is the parent of the receipts counted alongside it, so 470 receipts across 118 supplies shows 588. Read it as "deliveries handled plus boxes received" â a workload tally, not a count of distinct items.',entity_actions:"The numerator of Actions / entity: operations that touched a counted shipment, FBM order, receipt or workflow, plus order status changes â DTC order work is read from status logs, not from operations. Not a subset of Operations, and it can exceed it: Operations also counts entity-less overhead (Correct / Move / Write-off) and order-linked operations, while the status changes counted here are not operations at all. Shown so the ratio can be checked by hand.",ops_per_entity:"Entity actions ÷ Entities â NOT Operations ÷ Entities. The ratio is not role-neutral, so it is not a ranking: parent supplies add to Entities without carrying operations of their own, which pushes receiving work below 1, while one order
1can carry several status changes, which pushes the order desk above it. A receiving figure near 0.8 assumes one operation per receipt â two operations per receipt reads 1.6 without anything being wrong. Read a change against the same person's own history; a difference between two people is usually their job, not their diligence.",measured_moments:"Distinct seconds in which something was logged, counted only on days spanning at least 15 minutes â the numerator of Moments / active hr. 300 rows written in one second are 300 operations but one moment, so a gap below Operations means either bulk work or days too short to measure. Active hrs tells you which: far below a shift per active day means days are being dropped, not that the work arrived in bulk.",active_hours:"Summed span of the same qualifying days, in hours â the denominator of Moments / active hr. Measured moments ÷ Active hrs reproduces the rate to the two decimals shown.",moments_per_active_hour:"How often something was logged per hour of measured presence â NOT operations per hour. A moment is one second in which anything was logged, so a bulk action writing 300 rows in a single second counts once: dividing those rows by the second they took describes the database, not the person. Operations still carries the full volume. Active hours are a span, not a timesheet: per day, first logged action to last, summed over the period, so breaks and non-WMS duties sit inside it. Only days spanning at least 15 minutes count, on both sides of the division. Example: 100 moments over 154 active hours = 0.65. Empty below 5 measured moments.",adjustment_ratio:'Share of the employee\'s operations that are manual "Correct" stock adjustments. A few percent is normal; well above the team median means stock is being fixed by hand instead of captured by the regular flow.',active_days:"Distinct work days with at least one logged operation in the selected period. Days follow the warehouse shift cutoff, so a night shift crossing midnight counts once. Use it as the denominator for Operations / Units â the same volume over fewer days is a different pattern.",median_gap_seconds:"Typical pause between two consecutive logged actions within a day, taken as the median over the period. Short means a steady flow of work; a long median means long stretches with nothing logged. Actions logged in the same second count once, so bulk actions do not manufacture zero gaps."},Ke={order:"/orders","fbm order":"/fbm-orders",shipment:"/fba-shipments","inbound plan":"/fba-workflows"},Pe=(0,i.pM)({name:"WorkforceEmployeeDetailContent",components:{BarChart:Be.A},props:{summary:{type:Object,default:null},detail:{type:Object,default:null},alerts:{type:Array,default:()=>[]},medians:{type:Object,default:null},processedMedians:{type:Object,default:null},period:{type:String,default:""}},data(){return{chartOptions:{responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1}},scales:{y:{beginAtZero:!0,ticks:{precision:0}}}}}},computed:{patterns(){return this.detail&&this.detail.patterns?this.detail.patterns:[]},processed(){return this.detail&&this.detail.processed?this.detail.processed:null},heroTiles(){const e=this.processed,t=this.summary,s=this.processedMedians,i=this.medians;return[{key:"entities",label:"Entities processed",value:this.fmtNum(e?e.entities_total:null),median:this.fmtMedian(s?s.entities_total:null),hint:Qe.entities_total},{key:"ops",label:"Operations",value:this.fmtNum(t?t.ops:e?e.ops:null),median:this.fmtMedian(i?i.ops:null),hint:""},{key:"oph",label:"Moments / active hr",value:this.fmtNum(t?t.moments_per_active_hour:null),median:this.fmtMedian(i?i.moments_per_active_hour:null),hint:Qe.moments_per_active_hour}]},metricGroups(){var e,t,s;const i=this.processed,o=this.summary;return[{key:"processed",title:"Processed work",rows:[this.metric("orders","Orders",i?i.orders:null,i?this.opsSub(i.orders,i.order_status_changes):""),this.metric("fbm","FBM orders",i?i.fbm_orders:null,i?this.opsSub(i.fbm_orders,i.fbm_orders_ops):""),this.metric("ship","Shipments",i?i.shipments:null,i?this.opsSub(i.shipments,i.shipments_ops):""),this.metric("rec","Receipts",i?i.receipts:null,i?this.opsSub(i.receipts,i.receipts_ops):""),this.metric("sup","Supplies",i?i.supplies:null),this.metric("wf","Workflows",i?i.workflows:null,i?this.opsSub(i.workflows,i.workflows_ops):""),this.metric("ea","Entity actions",i&&null!==(e=i.entity_actions)&&void 0!==e?e:null,"",Qe.entity_actions),this.metric("ope","Actions / entity",i?i.ops_per_entity:null,"",Qe.ops_per_entity)]},{key:"activity",title:"Activity",rows:[this.metric("units","Units",o?o.units:i?i.units:null),this.metric("skus","Distinct SKUs",o?o.distinct_skus:i?i.distinct_skus:null),this.metric("adj","Manual adj.",o?this.fmtRatio(o.adjustment_ratio):null,"",Qe.adjustment_ratio),this.metric("days","Active days",o?o.active_days:null,"",Qe.active_days),this.metric("mm","Measured moments",o&&null!==(t=o.measured_moments)&&void 0!==t?t:null,"",Qe.measured_moments),this.metric("ah","Active hrs",o&&null!==(s=o.active_hours)&&void 0!==s?s:null,"",Qe.active_hours),this.metric("gap","Median gap",o?this.fmtGap(o.median_gap_seconds):null,"",Qe.median_gap_seconds)]}]},byType(){return this.detail?this.detail.by_type:{}},hourlyChartData(){const e=this.detail?this.detail.hourly_histogram:[];return{labels:Array.from({length:24},((e,t)=>String(t).padStart(2,"0"))),datasets:[{label:"Operations",data:e,backgroundColor:"#f2994a"}]}},weeklyChartData(){const e=this.detail?this.detail.weekly_trend:[];return{labels:e.map((e=>e.week)),datasets:[{label:"Operations",data:e.map((e=>e.ops)),backgroundColor:"#f2994a"}]}}},methods:{fmtNum(e){return null===e||void 0===e?"â":e},fmtRatio(e){return null===e||void 0===e?"â":`${(100*e).toFixed(1)}%`},fmtMedian(e){return null===e||void 0===e?"â":Math.round(100*e)/100},fmtGap(e){return null===e||void 0===e?"â":`${Math.round(e/60)} min`},metric(e,t,s,i="",o=""){const r="string"===typeof s?s:this.fmtNum(s);return{key:e,label:t,value:r,sub:i,hint:o,muted:!s||"â"===r}},opsSub(e,t){return e&&null!==t&&void 0!==t?`(${t} ops)`:""},prettyType(e){return e.replace(/_/g," ")},patternLink(e){const t=Ke[e.entity_type];return t&&e.entity_id?`${t}/${e.entity_id}`:""}}});var Ue=s(50492);const Ve=(0,Z.A)(Pe,[["render",qe],["__scopeId","data-v-734a433c"]]),ze=Ve;te()(Pe,"components",{QIcon:Ue.A,QTooltip:J.A});var He=s(77854),Ge=s(82303),Ye=s(12134),Ze=function(e,t,s,i){function o(e){return e instanceof s?e:new s((function(t){t(e)}))}
1return new(s||(s=Promise))((function(s,r){function a(e){try{l(i.next(e))}catch(t){r(t)}}function n(e){try{l(i["throw"](e))}catch(t){r(t)}}function l(e){e.done?s(e.value):o(e.value).then(a,n)}l((i=i.apply(e,t||[])).next())}))};let Je=null,et=null;function tt(e){return Array.isArray(e)?e.map(String):[]}const st=(0,q.nY)("workforceActivity",{state:()=>({activityList:[],processedList:[],activityListFilters:{},teamMedians:null,processedMedians:null,period:null,employeeDetail:null,alerts:[],operationTypes:[],roleOptions:[],appliedRoleIds:[]}),actions:{fetchActivity(e,t=!0){return Ze(this,void 0,void 0,(function*(){t&&Je&&Je.cancel(),Je=Ge.A.CancelToken.source();const s=yield He.api.get("/api/workforce_activity/",{params:B.PN.generateUrlParams(e),cancelToken:Je.token});return t&&(this.activityList=s.data.results,this.teamMedians=s.data.team_medians,this.appliedRoleIds=tt(e.role),this.period={date_from:s.data.date_from,date_to:s.data.date_to,timezone:s.data.timezone}),s.data}))},fetchProcessed(e,t=!0){return Ze(this,void 0,void 0,(function*(){t&&et&&et.cancel(),et=Ge.A.CancelToken.source();const s=yield He.api.get("/api/workforce_activity/",{params:B.PN.generateUrlParams(Object.assign(Object.assign({},e),{view:"processed"})),cancelToken:et.token});return t&&(this.processedList=s.data.results,this.processedMedians=s.data.team_medians,this.appliedRoleIds=tt(e.role),this.period={date_from:s.data.date_from,date_to:s.data.date_to,timezone:s.data.timezone}),s.data}))},fetchRoleOptions(){return Ze(this,void 0,void 0,(function*(){try{const e=yield(0,Ye.B)().fetchRoles();this.roleOptions=e.map((e=>({title:e.name,value:e.id})))}catch(e){console.error("failed to load role filter options",e),this.roleOptions=[]}return this.roleOptions}))},setFiltersValueByKey(e,t){this.activityListFilters[e]=t},resetFilters(){this.activityListFilters={},this.appliedRoleIds=[]},fetchEmployeeDetail(e,t,s){return Ze(this,void 0,void 0,(function*(){const i={};t&&(i.date_from=t),s&&(i.date_to=s);const o=yield He.api.get(`/api/workforce_activity/${e}/`,{params:i});return this.employeeDetail=o.data,o.data}))},fetchAlerts(e,t,s){return Ze(this,void 0,void 0,(function*(){const i={};e&&(i.employee=e),t&&(i.date_from=t),s&&(i.date_to=s);const o=yield He.api.get("/api/workforce_activity/alerts/",{params:i});return this.alerts=o.data,o.data}))},exportActivity(e,t,s,i){return Ze(this,void 0,void 0,(function*(){const o={};e&&(o.date_from=e),t&&(o.date_to=t),s&&(o.view=s),i&&i.length&&(o.role=i);const r=yield He.api.get("/api/workforce_activity/export/",{params:B.PN.generateUrlParams(o),responseType:"arraybuffer"});if(r.data){const i=URL.createObjectURL(new Blob([r.data],{type:"text/csv"})),o=document.createElement("a");o.href=i,o.download=`workforce_${s||"activity"}_${e||""}_${t||""}.csv`,o.style.display="none",document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(i)}}))}}});var it=function(e,t,s,i){function o(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function a(e){try{l(i.next(e))}catch(t){r(t)}}function n(e){try{l(i["throw"](e))}catch(t){r(t)}}function l(e){e.done?s(e.value):o(e.value).then(a,n)}l((i=i.apply(e,t||[])).next())}))};const ot=(0,i.pM)({name:"WorkforceEmployeeDialog",components:{CenterDialog:ae.A,BottomDialog:ne.A,ScrollableBlock:P.A,WorkforceEmployeeDetailContent:ze},mixins:[B.dM],data(){return{clickedRawRow:null,userId:null,titleName:"",dateFrom:"",dateTo:""}},computed:Object.assign(Object.assign({},(0,q.n2)(st)),{title(){return this.titleName},summaryRow(){const e=this.workforceActivityStore.activityList.find((e=>e.user_id===this.userId));return e||this.clickedRawRow},periodLabel(){const e=this.workforceActivityStore.period,t=this.dateFrom||(e?e.date_from:""),s=this.dateTo||(e?e.date_to:"");return t||s?`${t} â ${s}`:""}}),methods:{activate(e,t,s){return it(this,void 0,void 0,(function*(){this.titleName=e.name,this.userId=e.user_id,this.dateFrom=t||"",this.dateTo=s||"",this.clickedRawRow="active_days"in e?e:null,yield this.handleMethodError((()=>it(this,void 0,void 0,(function*(){yield Promise.all([this.workforceActivityStore.fetchEmployeeDetail(e.user_id,t,s),this.workforceActivityStore.fetchAlerts(e.user_id,t,s)])})))),this.$q.screen.gt.xs?this.$refs.centerDialog.activate():this.$refs.bottomDialog.activate()}))}}}),rt=(0,Z.A)(ot,[["render",re]]),at=rt;function nt(e,t,s,r,a,n){const l=(0,i.g2)("SimpleSelect");return(0,i.uX)(),(0,i.CE)("div",{ref:"wrapper",class:(0,o.C4)(["wa-role-filter",e.fullWidth?"wa-role-filter--full":"toolbar-margin-right"])},[(0,i.bF)(l,{class:"input-full-width",items:e.items,selectedItem:e.selected,multiple:"",clearable:"",searchable:"",miniStyle:"",prefix:"Role:",placeholder:"All roles",onChange:e.onChange},null,8,["items","selectedItem","onChange"])],2)}const lt=(0,i.pM)({name:"WorkforceRoleFilter",components:{SimpleSelect:U.A},props:{items:{type:Array,default:()=>[]},selected:{type:Array,default:()=>[]},fullWidth:{type:Boolean,default:!1}},emits:["change"],mounted(){const e=this.roleInput();e&&e.addEventListener("focus",this.rewindText)},beforeUnmount(){const e=this.roleInput();e&&e.removeEventListener("focus",this.rewindText)},methods:{roleInput(){var e;return null===(e=this.$refs.wrapper)||void 0===e?void 0:e.querySelector("input")},rewindText(){const e=this.roleInput();e&&(e.setSelectionRange(0,0),requestAnimationFrame((()=>{const e=this.roleInput();e&&(e.scrollLeft=0)})))},onChange(e){this.$emit("change",e),this.$nextTick(this.rewindText)}}}),ct=(0,Z.A)(lt,[["render",nt],["__scopeId","data-v-32bdc5ee"]]),dt=ct;var ut=function(e,t,s,i){function o(e){return e instanceof s?e:new s((function(t){t(e)}))}
1return new(s||(s=Promise))((function(s,r){function a(e){try{l(i.next(e))}catch(t){r(t)}}function n(e){try{l(i["throw"](e))}catch(t){r(t)}}function l(e){e.done?s(e.value):o(e.value).then(a,n)}l((i=i.apply(e,t||[])).next())}))};const mt=300,pt=(0,i.pM)({name:"WorkforceActivityPage",components:{BaseTable:Q.A,WorkforceAboutContent:ie,DateSelector:K.A,ScrollableBlock:P.A,SimpleSelect:U.A,WorkforceEmployeeDialog:at,WorkforceRoleFilter:dt},mixins:[B.dM,B.Tn],data(){return{currentTab:"processed",exporting:!1,counterpartTimer:null,heatColumns:["orders","fbm_orders","shipments","receipts","supplies","workflows","units","distinct_skus","entities_total","ops","entity_actions"],tabSelectItems:[{title:"Processed work",value:"processed"},{title:"Raw operations",value:"raw"}],processedColumns:[{name:"name",label:"Employee",align:"left",required:!0},{name:"orders",label:"Orders",align:"right",sorting:!0,sort_value:"orders"},{name:"fbm_orders",label:"FBM orders",align:"right",sorting:!0,sort_value:"fbm_orders"},{name:"workflows",label:"Workflows",align:"right",sorting:!0,sort_value:"workflows"},{name:"shipments",label:"Shipments",align:"right",sorting:!0,sort_value:"shipments"},{name:"receipts",label:"Receipts",align:"right",sorting:!0,sort_value:"receipts"},{name:"supplies",label:"Supplies",align:"right",sorting:!0,sort_value:"supplies"},{name:"units",label:"Units",align:"right",sorting:!0,sort_value:"units"},{name:"distinct_skus",label:"SKUs",align:"right",sorting:!0,sort_value:"distinct_skus"},{name:"entities_total",label:"Entities",align:"right",sorting:!0,sort_value:"entities_total",tooltip:Qe.entities_total},{name:"ops",label:"Operations",align:"right",sorting:!0,sort_value:"ops"},{name:"entity_actions",label:"Entity actions",align:"right",sorting:!0,sort_value:"entity_actions",tooltip:Qe.entity_actions},{name:"ops_per_entity",label:"Actions / entity",align:"right",sorting:!0,sort_value:"ops_per_entity",tooltip:Qe.ops_per_entity},{name:"patterns_count",label:"Review flags",align:"right",sorting:!0,sort_value:"patterns_count"}],columns:[{name:"name",label:"Employee",align:"left",required:!0},{name:"ops",label:"Operations",align:"right",sorting:!0,sort_value:"ops"},{name:"measured_moments",label:"Measured moments",align:"right",sorting:!0,sort_value:"measured_moments",tooltip:Qe.measured_moments},{name:"active_hours",label:"Active hrs",align:"right",sorting:!0,sort_value:"active_hours",tooltip:Qe.active_hours},{name:"moments_per_active_hour",label:"Moments / active hr",align:"right",sorting:!0,sort_value:"moments_per_active_hour",tooltip:Qe.moments_per_active_hour},{name:"units",label:"Units",align:"right",sorting:!0,sort_value:"units"},{name:"distinct_skus",label:"SKUs",align:"right",sorting:!0,sort_value:"distinct_skus"},{name:"adjustment_ratio",label:"Manual adj.",align:"right",sorting:!0,sort_value:"adjustment_ratio",tooltip:Qe.adjustment_ratio},{name:"active_days",label:"Active days",align:"right",sorting:!0,sort_value:"active_days",tooltip:Qe.active_days},{name:"median_gap_seconds",label:"Median gap",align:"right",sorting:!0,sort_value:"median_gap_seconds",tooltip:Qe.median_gap_seconds}]}},computed:Object.assign(Object.assign({},(0,q.n2)(st)),{currentTabSelectItem(){return this.tabSelectItems.find((e=>e.value===this.currentTab))},roleOptions(){return this.workforceActivityStore.roleOptions},roleFilterInToolbar(){return this.$q.screen.gt.sm},selectedRoleIds(){const e=this.workforceActivityStore.activityListFilters.role;return Array.isArray(e)?e.map(String):[]},selectedRoles(){return this.selectedRoleIds.map((e=>this.roleOptions.find((t=>String(t.value)===e)))).filter((e=>!!e))},mediansTitle(){const e=this.workforceActivityStore.appliedRoleIds;if(!e.length)return"Team medians";const t=e.map((e=>{var t,s;return null!==(s=null===(t=this.roleOptions.find((t=>String(t.value)===e)))||void 0===t?void 0:t.title)&&void 0!==s?s:e}));return`Team medians · ${t.join(", ")}`},dateRange(){const e=this.workforceActivityStore.activityListFilters;return{from:e.date_from||"",to:e.date_to||""}},columnMaxes(){const e=this.workforceActivityStore.processedList,t={};return this.heatColumns.forEach((s=>{t[s]=e.reduce(((e,t)=>Math.max(e,Number(t[s])||0)),0)})),t},medianTiles(){if("processed"===this.currentTab){const e=this.workforceActivityStore.processedMedians;return[{key:"entities",label:"Median entities",value:this.fmtNum(e?e.entities_total:null)},{key:"orders",label:"Median orders",value:this.fmtNum(e?e.orders:null)},{key:"shipments",label:"Median shipments",value:this.fmtNum(e?e.shipments:null)},{key:"workflows",label:"Median workflows",value:this.fmtNum(e?e.workflows:null)},{key:"ops",label:"Median ops",value:this.fmtNum(e?e.ops:null)},{key:"ope",label:"Median actions/entity",value:this.fmtNum(e?e.ops_per_entity:null)}]}const e=this.workforceActivityStore.teamMedians;return[{key:"ops",label:"Median ops",value:this.fmtNum(e?e.ops:null)},{key:"oph",label:"Median moments/hr",value:this.fmtNum(e?e.moments_per_active_hour:null)},{key:"units",label:"Median units",value:this.fmtNum(e?e.units:null)},{key:"skus",label:"Median SKUs",value:this.fmtNum(e?e.distinct_skus:null)},{key:"adj",label:"Median manual adj.",value:this.fmtRatio(e?e.adjustment_ratio:null)}]}}),created(){this.migrateVisibleColumns("workforceProcessedTable","EntityActionsColMigrated",["entity_actions"],"ops_per_entity"),this.migrateVisibleColumns("workforceActivityTable","RateOperandColsMigrated",["measured_moments","active_hours","moments_per_active_hour"],"ops_per_active_hour");const e="workforceActivityTableordering",t=this.$q.localStorage.getItem(e);"string"===typeof t&&"ops_per_active_hour"===t.replace("-","")&&this.$q.localStorage.set(e,t.replace("ops_per_active_hour","moments_per_active_hour"));const s=this.workforceActivityStore.activityListFilters;if(!s.date_from&&!s.date_to){const e=this.periods.thirtyDays.value;this.workforceActivityStore.setFiltersValueByKey("date_from",e.from),this.workforceActivityStore.setFiltersValueByKey("date_to",e.to)}},mounted(){this.fetchCounterpartList(),this.workforceActivityStore.fetchRoleOptions()},beforeUnmount(){this.counterpartTimer&&clearTimeout(this.counterpartTimer),this.workforceActivityStore.resetFilters()},methods:{fetchCounterpartList(){return ut(this,void 0,void 0,(function*(){const e=Object.assign(Object.assign({},this.workforceActivityStore.activityListFilters),{page:1,page_size:200});yield this.handleMethodError((()=>ut(this,void 0,void 0,(function*(){"processed"===this.currentTab?yield this.workforceActivityStore.fetchActivity(e):yield this.workforceActivityStore.fetchProcessed(e)}))))}))},fmtNum(e){return null===e||void 0===e?"â":e},fmtRatio(e){return null===e||void 0===e?"â":`${(100*e).toFixed(1)}%`},fmtGap(e){return null===e||void 0===e?"â":`${Math.round(e/60)} min`},migrateVisibleColumns(e,t,s,i){if(this.$q.localStorage.getItem(e+t))return;const o=this.$q.localStorage.getItem(e+"visibleColumns");if(Array.isArray(o)){const t=s.filter((e=>!o.includes(e)));if(t.length){const s=o.indexOf(i);o.splice(s>-1?s:o.length,0,...t),this.$q.localStorage.set(e+"visibleColumns",o)}}this.$q.localStorage.set(e+t,!0)},opsHint(e,t){return e&&null!==t&&void 0!==t?` (${t})`:""},mobileCells(e){const t=e.row,s=Number(t.patterns_count)||0,i={orders:()=>`${t.orders}${this.opsHint(t.orders,t.order_status_changes)}`,fbm_orders:()=>`${t.fbm_orders}${this.opsHint(t.fbm_orders,t.fbm_orders_ops)}`,shipments:()=>`${t.shipments}${this.opsHint(t.shipments,t.shipments_ops)}`,receipts:()=>`${t.receipts}
1${this.opsHint(t.receipts,t.receipts_ops)}`,workflows:()=>`${t.workflows}${this.opsHint(t.workflows,t.workflows_ops)}`,supplies:()=>t.supplies,units:()=>t.units,distinct_skus:()=>t.distinct_skus,entities_total:()=>t.entities_total,ops:()=>t.ops,entity_actions:()=>this.fmtNum(t.entity_actions),ops_per_entity:()=>this.fmtNum(t.ops_per_entity),patterns_count:()=>s>0?`â ${s}`:"â",measured_moments:()=>this.fmtNum(t.measured_moments),active_hours:()=>this.fmtNum(t.active_hours),moments_per_active_hour:()=>this.fmtNum(t.moments_per_active_hour),adjustment_ratio:()=>this.fmtRatio(t.adjustment_ratio),active_days:()=>t.active_days,median_gap_seconds:()=>this.fmtGap(t.median_gap_seconds)};return e.cols.filter((e=>i[e.name])).map((e=>({name:e.name,label:e.label,value:i[e.name](),flagged:"patterns_count"===e.name&&s>0})))},heatStyle(e,t){const s=this.columnMaxes[t]||0,i=Number(e)||0;if(s<=0||i<=0)return{};const o=i/s*.4;return{backgroundColor:`rgba(122, 199, 160, ${o.toFixed(3)})`}},onDateChange(e){this.workforceActivityStore.setFiltersValueByKey("date_from",e.from),this.workforceActivityStore.setFiltersValueByKey("date_to",e.to),this.fetchCounterpartList()},onRoleChange(e){this.workforceActivityStore.setFiltersValueByKey("role",(e||[]).map((e=>String(e.value)))),this.counterpartTimer&&clearTimeout(this.counterpartTimer),this.counterpartTimer=window.setTimeout((()=>{this.counterpartTimer=null,this.fetchCounterpartList()}),mt)},openEmployee(e){const t=this.workforceActivityStore.activityListFilters;this.$refs.employeeDialog.activate(e,t.date_from,t.date_to)},exportReport(){return ut(this,void 0,void 0,(function*(){this.exporting=!0,yield this.handleMethodError((()=>ut(this,void 0,void 0,(function*(){const e=this.workforceActivityStore.activityListFilters;yield this.workforceActivityStore.exportActivity(e.date_from,e.date_to,"processed"===this.currentTab?"processed":void 0,this.selectedRoleIds)})))),this.exporting=!1}))}}});var ht=s(77716),vt=s(56384),yt=s(45262);const ft=(0,Z.A)(pt,[["render",j],["__scopeId","data-v-ae3532da"]]),_t=ft;te()(pt,"components",{QPage:ht.A,QIcon:Ue.A,QTooltip:J.A,QBtn:vt.A,QTd:yt.A})}}]);
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.