PageSourceSearch

https://www.vanzzz.co.uk/_next/static/chunks/pages/dashboard/van-variations/[id]/edit-c4f1198a7ab2b85b.js

js vanzzz.co.uk collected 2026-10-07 19:32:30 UTC 4,162 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="5c5ee0e1-7910-4c70-9a42-4b15097b5726",e._sentryDebugIdIdentifier="sentry-dbid-5c5ee0e1-7910-4c70-9a42-4b15097b5726")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[50496],{78020:function(e,n,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dashboard/van-variations/[id]/edit",function(){return a(5871)}])},5871:function(e,n,a){"use strict";a.r(n),a.d(n,{__N_SSP:function(){return b},default:function(){return p}});var i=a(85893),l=a(23112),s=a(14685),d=a(9383),t=a(49235),r=a(56967),o=a(36316),u=a(53219),c=a(41664),v=a.n(c),h=a(11163),f=a(10850),m=a(61667),x=a(28828),b=!0;function p(){var e,n,a,c,b,p,j,y,w,_,g,N,V,I,S,E,P,k,D,C,O,X;let z=(0,h.useRouter)(),{id:F}=z.query,{toast:L}=(0,r.pm)(),[T]=(0,m.b0)(),{data:Z}=(0,m.Jc)(),{data:q}=(0,m.DH)(),{data:H}=(0,m.sE)(),J=Z?{extras:Z.extras.filter(e=>null!=e).map(e=>({id:e.id,name:e.name}))}:void 0,{data:M,loading:Q}=(0,m.VM)({variables:{vanVariationId:F?+F:0},skip:!F}),R=null==M?void 0:M.vanVariation,U=async e=>{try{await T({variables:{updateVanVariationId:F?+F:0,updateVanVariationInput:e},refetchQueries:[m.X2]}),L({title:"Van variation updated successfully",variant:"default"}),z.push("/dashboard/van-variations")}catch(e){L({title:"Something went wrong, please try again",variant:"destructive"})}};if(Q)return(0,i.jsx)(l.c,{children:(0,i.jsx)("div",{className:"flex justify-center items-center min-h-[50vh]",children:(0,i.jsx)(o.default,{className:"h-8 w-8 animate-spin"})})});if(!R)return(0,i.jsx)(l.c,{children:(0,i.jsx)("div",{className:"flex justify-center items-center min-h-[50vh]",children:(0,i.jsx)("p",{className:"text-muted-foreground",children:"Van variation not found"})})});let Y={name:null!==(c=R.name)&&void 0!==c?c:"",description:null!==(b=R.description)&&void 0!==b?b:"",blurb:null!==(p=R.blurb)&&void 0!==p?p:"",lowSeasonPrice:null!==(j=R.lowSeasonPrice)&&void 0!==j?j:0,shoulderSeasonEarlyPrice:null!==(y=R.shoulderSeasonEarlyPrice)&&void 0!==y?y:0,shoulderSeasonLatePrice:null!==(w=R.shoulderSeasonLatePrice)&&void 0!==w?w:0,peakSeasonPrice:null!==(_=R.peakSeasonPrice)&&void 0!==_?_:0,published:null!==(g=R.published)&&void 0!==g&&g,sleeps:null!==(N=R.sleeps)&&void 0!==N?N:0,extras:null!==(I=null===(e=R.extras)||void 0===e?void 0:e.map(e=>null!==(V=null==e?void 0:e.id.toString())&&void 0!==V?V:""))&&void 0!==I?I:[],keyFeatures:null!==(P=null===(n=R.keyFeatures)||void 0===n?void 0:n.map(e=>({name:null!==(S=null==e?void 0:e.name)&&void 0!==S?S:"",icon:null!==(E=null==e?void 0:e.icon)&&void 0!==E?E:""})))&&void 0!==P?P:[],whatsIncluded:null!==(C=null===(a=R.whatsIncluded)||void 0===a?void 0:a.map(e=>({name:null!==(k=null==e?void 0:e.name)&&void 0!==k?k:"",icon:null!==(D=null==e?void 0:e.icon)&&void 0!==D?D:""})))&&void 0!==C?C:[],images:null!==(O=R.images)&&void 0!==O?O:[],heroImage:null!==(X=R.heroImage)&&void 0!==X?X:void 0};return(0,i.jsx)(l.c,{children:(0,i.jsxs)("div",{className:"space-y-6",children:[(0,i.jsx)(x.a,{items:[{label:"Van Variations",href:"/dashboard/van-variations"},{label:R.name,href:"/dashboard/van-variations/".concat(F)},{label:"Edit"}]}),(0,i.jsx)("div",{className:"flex items-center justify-between",children:(0,i.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,i.jsx)(v(),{href:"/dashboard/van-variations",children:(0,i.jsx)(s.z,{variant:"ghost",size:"icon",children:(0,i.jsx)(u.default,{className:"h-4 w-4"})})}),(0,i.jsxs)("div",{children:[(0,i.jsx)("h1",{className:"text-2xl font-semibold",children:"Edit Van Variation"}),(0,i.jsx)("p",{className:"text-muted-foreground",children:"Update van variation details"})]})]})}),(0,i.jsx)(t.Z,{}),(0,i.jsxs)(d.Zb,{children:[(0,i.jsx)(d.Ol,{children:(0,i.jsx)(d.ll,{children:"Van Variation Details"})}),(0,i.jsx)(d.aY,{children:(0,i.jsx)(f.g,{extras:J,onConfirm:U,defaultValues:Y})})]})]})})}}},function(e){e.O(0,[45738,95475,87536,33397,77763,75977,87066,72126,64197,61667,79647,56131,49774,92888,40179],function(){return e(e.s=78020)}),_N_E=e.O()}]);

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.