https://treesthatcount.co.nz/_next/static/chunks/pages/projects/[p…/[plantingId]-53492797b2610b1a.js
1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1845],{65604:function(n,e,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/projects/[projectId]/applications/[applicationId]/planting-report/[plantingId]",function(){return t(23661)}])},58750:function(n,e,t){"use strict";t.d(e,{m:function(){return d}});var i=t(85893),a=t(29171),l=(t(39713),t(49336)),o=t(67294),s=t(50788),r=t(82999),c=t(44156);const d=n=>{let{ButtonComponent:e=r.B,actions:t,buttonComponentProps:d,children:p,className:u="",dropdownTrigger:v="click",linkProps:h,hideChevron:m=!1}=n;const[x,j]=(0,o.useState)(!1);return(0,i.jsx)(a.Z,{animation:"slide-up",onVisibleChange:()=>j(!x),placement:"bottomRight",trigger:v,visible:x,overlay:(0,i.jsx)(l.ZP,{children:t.map(((n,e)=>{return a=e,(t=n).isSeperator?(0,i.jsx)(l.ZP.Divider,{},"divider-".concat(a)):t.href?(0,i.jsx)(l.ck,{disabled:t.disabled,className:"".concat(t.disabled?"":"hover:bg-limeBright/20!"," ").concat(t.style||""),children:t.disabled?(0,i.jsxs)("span",{className:"text-cloudGrey font-medium cursor-default",children:[t.text,t.icon]}):(0,i.jsxs)(c.h$,{color:"none",className:"flex flex-row justify-between items-center w-full text-forestDeep",href:t.href,...h,children:[t.avatar?(0,i.jsx)("span",{className:"mr-2 h-6",children:t.avatar}):null,t.text,t.icon]})},t.text):(0,i.jsx)(l.ck,{className:"".concat(t.disabled?"":"hover:bg-limeBright/20!"," ").concat(t.style||""),disabled:t.disabled,children:t.disabled?(0,i.jsxs)("span",{className:"text-cloudGrey font-medium cursor-default",children:[t.text,t.icon]}):(0,i.jsxs)(c.Hp,{color:"forestDeep",className:"flex flex-row justify-between items-center w-full",onClick:t.onClick,...h,children:[t.avatar?(0,i.jsx)("span",{className:"mr-2 h-6",children:t.avatar}):null,t.text,t.icon]})},t.text);var t,a}))}),children:(0,i.jsx)("div",{className:u,children:(0,i.jsx)(e,{...d,children:(0,i.jsxs)("div",{className:"flex items-center",children:[p,!m&&(0,i.jsx)("span",{className:"ml-1 mr[-4px]",children:x?(0,i.jsx)(s.rWj,{size:"20px"}):(0,i.jsx)(s.Ix0,{size:"20px"})})]})})})})}},6740:function(n,e,t){"use strict";t.d(e,{C:function(){return x},m:function(){return h}});var i=t(85893),a=t(11163),l=t(71234),o=t(23065),s=t(11872),r=t(67294),c=t(70090),d=t(58750),p=t(27518),u=t(47754);const v=n=>{let{className:e="",planting:t}=n;const{openModal:a}=(0,c.dd)(),l=(0,r.useMemo)((()=>{const n=[];var e,i;t.WorkflowState===u.o.Draft&&n.push({text:"Edit report",href:(0,p.Hw)({routeParams:{applicationId:t.ApplicationId,plantingId:t.Id,projectId:null===(i=t.Application)||void 0===i||null===(e=i.Project)||void 0===e?void 0:e.Id}})},{text:"Delete report",onClick:()=>{a(c.w8.DeletePlanting,{plantingId:t.Id})}});return n}),[t.ApplicationId,t.Id,t.WorkflowState]);return l.length?(0,i.jsx)(d.m,{actions:l,className:e,buttonComponentProps:{variant:"outline"},children:"Actions"}):null};var h;!function(n){n.Details="details",n.Monitorings="monitorings",n.Photos="photos"}(h||(h={}));const m=n=>{let{activeTab:e,children:t,planting:r,tabs:c}=n;const d=(0,a.useRouter)();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.nL,{children:(null===r||void 0===r?void 0:r.Name)||"Planting"}),(0,i.jsxs)(l.Z,{size:"small",className:"overflow-x-scroll",children:[(0,i.jsxs)("div",{className:"flex justify-between items-center pr-4",children:[(0,i.jsx)(s.m,{className:"mx-4 mt-2",tabs:c,onChange:n=>{if(n===e)return;const t=c.find((e=>e.value===n));t&&d.push(null===t||void 0===t?void 0:t.path)},activeTab:e,ariaLabel:"Application navigation"}),(0,i.jsx)(v,{className:"ml-4",planting:r})]}),(0,i.jsx)("div",{className:"p-4",children:t})]})]})},x=n=>{const{planting:e}=n,t=function(n){var e,t,i,a,l,o;return[{label:"Planting details",value:"details",path:(0,p.gA)({routeParams:{applicationId:n.ApplicationId,plantingId:n.Id,projectId:null===(t=n.Application)||void 0===t||null===(e=t.Project)||void 0===e?void 0:e.Id}})},{label:"Monitorings",value:"monitorings",path:(0,p.f_)({routeParams:{applicationId:n.ApplicationId,plantingId:n.Id,projectId:null===(a=n.Application)||void 0===a||null===(i=a.Project)||void 0===i?void 0:i.Id}})}
1,{label:"Photos",value:"photos",path:(0,p.Wq)({routeParams:{applicationId:n.ApplicationId,plantingId:n.Id,projectId:null===(o=n.Application)||void 0===o||null===(l=o.Project)||void 0===l?void 0:l.Id}})}]}(e);return(0,i.jsx)(m,{...n,planting:e,tabs:t})}},23661:function(n,e,t){"use strict";t.r(e),t.d(e,{default:function(){return h}});var i=t(85893),a=t(7515),l=t(11163),o=t(67294),s=t(53719),r=t(24276),c=t(89827),d=t(80037),p=t(27285),u=t(6740);const v=()=>{var n;const e=(0,l.useRouter)(),{plantingId:t}=e.query,{user:a}=(0,s.a)(),{data:v,loading:h}=(0,c.Tc2)({fetchPolicy:"cache-and-network",variables:{id:t,planterId:null===a||void 0===a||null===(n=a.Account)||void 0===n?void 0:n.PlanterId}}),m=(0,o.useMemo)((()=>null===v||void 0===v?void 0:v.Planting[0]),[null===v||void 0===v?void 0:v.Planting]);return m||h?(0,i.jsx)(r.T,{isLoading:h,children:(0,i.jsx)(u.C,{activeTab:u.m.Details,planting:m,children:(0,i.jsx)(p.W,{planting:m})})}):(0,i.jsx)(d.T,{})};var h=(0,t(33712).hN)((()=>(0,i.jsx)(a.T3,{title:"Planting",children:(0,i.jsx)(v,{})})))}},function(n){n.O(0,[509,1255,5666,9336,9669,1317,297,2888,9774,179],(function(){return e=65604,n(n.s=e);var e}));var e=n.O();_N_E=e}]); 2//# sourceMappingURL=[plantingId]-53492797b2610b1a.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.