Some checks failed
CI / build-and-test (pull_request) Failing after 1m19s
CI (.gitea/workflows/ci.yaml): lint → typecheck → vitest w/ coverage → OpenNext build → preview smoke → bundle-size budgets; Node 20; npm ci; artifacts; safe env; D1 dry-run scaffold. Budgets: add scripts/budgets.mjs; TOTAL_STATIC_MAX_BYTES and MAX_ASSET_BYTES thresholds; report top offenders; fail on breach; README CI section. Flags: add lib/flags.ts with typed booleans and safe defaults (ADMIN_ENABLED, ARTISTS_MODULE_ENABLED, UPLOADS_ADMIN_ENABLED, BOOKING_ENABLED, PUBLIC_APPOINTMENT_REQUESTS_ENABLED, REFERENCE_UPLOADS_PUBLIC_ENABLED, DEPOSITS_ENABLED, PUBLIC_DB_ARTISTS_ENABLED, ADVANCED_NAV_SCROLL_ANIMATIONS_ENABLED, STRICT_CI_GATES_ENABLED, ISR_CACHE_R2_ENABLED); robust parsing; client provider; unit tests. Wiring: gate Admin shell and admin write APIs (503 JSON on uploads and artists writes); disable booking submit and short-circuit booking mutations when off; render static Hero/Artists when advanced animations off; tests for UI and API guards. Ops: expand docs/prd/rollback-strategy.md with “Feature Flags Operations,” Cloudflare Dashboard and wrangler.toml steps, preview simulation, incident playbook, and post-toggle smoke checklist. Release: add docs/releases/2025-09-19-feature-flags-rollout.md with last-good commit, preview/production flag matrices, rollback notes, and smoke results; link from rollback doc. Chore: fix TS issues (gift-cards boolean handling, Lenis options, tailwind darkMode), remove next-on-pages peer conflict, update package.json scripts, configure Gitea act_runner label, open draft PR to trigger CI. Refs: CI-1, FF-1, FF-2, FF-3, OPS-1 Impact: defaults preserve current behavior; no runtime changes unless flags flipped
1 line
8.2 KiB
JavaScript
1 line
8.2 KiB
JavaScript
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9091],{56596:function(e,t,r){Promise.resolve().then(r.bind(r,4756))},4756:function(e,t,r){"use strict";r.d(t,{AdminSidebar:function(){return M}});var a,n,s,i,c=r(57437),l=r(27648),o=r(99376),d=r(80605),u=r(79205);let h=(0,u.Z)("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);var f=r(95805),m=r(12805),x=r(31047),y=r(96215),v=r(17689),g=r(98728);let p=(0,u.Z)("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);var N=r(62869),k=r(94508);(a=s||(s={})).SUPER_ADMIN="SUPER_ADMIN",a.SHOP_ADMIN="SHOP_ADMIN",a.ARTIST="ARTIST",a.CLIENT="CLIENT",(n=i||(i={})).PENDING="PENDING",n.CONFIRMED="CONFIRMED",n.IN_PROGRESS="IN_PROGRESS",n.COMPLETED="COMPLETED",n.CANCELLED="CANCELLED";let b=[{name:"Dashboard",href:"/admin",icon:h,roles:[s.SHOP_ADMIN,s.SUPER_ADMIN]},{name:"Artists",href:"/admin/artists",icon:f.Z,roles:[s.SHOP_ADMIN,s.SUPER_ADMIN]},{name:"Portfolio",href:"/admin/portfolio",icon:m.Z,roles:[s.SHOP_ADMIN,s.SUPER_ADMIN]},{name:"Calendar",href:"/admin/calendar",icon:x.Z,roles:[s.SHOP_ADMIN,s.SUPER_ADMIN]},{name:"Analytics",href:"/admin/analytics",icon:y.Z,roles:[s.SHOP_ADMIN,s.SUPER_ADMIN]},{name:"File Manager",href:"/admin/uploads",icon:v.Z,roles:[s.SHOP_ADMIN,s.SUPER_ADMIN]},{name:"Settings",href:"/admin/settings",icon:g.Z,roles:[s.SHOP_ADMIN,s.SUPER_ADMIN]}];function M(e){let{user:t}=e,r=(0,o.usePathname)(),a=b.filter(e=>e.roles.includes(t.role)),n=async()=>{await (0,d.signOut)({callbackUrl:"/"})};return(0,c.jsxs)("div",{className:"flex flex-col w-64 bg-white shadow-lg",children:[(0,c.jsx)("div",{className:"flex items-center justify-center h-16 px-4 border-b border-gray-200",children:(0,c.jsxs)(l.default,{href:"/",className:"flex items-center space-x-2",children:[(0,c.jsx)("div",{className:"w-8 h-8 bg-black rounded-md flex items-center justify-center",children:(0,c.jsx)("span",{className:"text-white font-bold text-sm",children:"U"})}),(0,c.jsx)("span",{className:"text-xl font-bold text-gray-900",children:"United Admin"})]})}),(0,c.jsx)("nav",{className:"flex-1 px-4 py-6 space-y-2",children:a.map(e=>{let t=r===e.href,a=e.icon;return(0,c.jsxs)(l.default,{href:e.href,className:(0,k.cn)("flex items-center px-3 py-2 text-sm font-medium rounded-md transition-colors",t?"bg-gray-100 text-gray-900":"text-gray-600 hover:bg-gray-50 hover:text-gray-900"),children:[(0,c.jsx)(a,{className:"w-5 h-5 mr-3"}),e.name]},e.name)})}),(0,c.jsxs)("div",{className:"border-t border-gray-200 p-4",children:[(0,c.jsxs)("div",{className:"flex items-center space-x-3 mb-4",children:[(0,c.jsx)("div",{className:"w-10 h-10 bg-gray-300 rounded-full flex items-center justify-center",children:t.image?(0,c.jsx)("img",{src:t.image,alt:t.name,className:"w-10 h-10 rounded-full"}):(0,c.jsx)("span",{className:"text-sm font-medium text-gray-600",children:t.name.charAt(0).toUpperCase()})}),(0,c.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,c.jsx)("p",{className:"text-sm font-medium text-gray-900 truncate",children:t.name}),(0,c.jsx)("p",{className:"text-xs text-gray-500 truncate",children:t.role.replace("_"," ").toLowerCase()})]})]}),(0,c.jsxs)(N.z,{variant:"outline",size:"sm",onClick:n,className:"w-full justify-start",children:[(0,c.jsx)(p,{className:"w-4 h-4 mr-2"}),"Sign Out"]})]})]})}},62869:function(e,t,r){"use strict";r.d(t,{d:function(){return c},z:function(){return l}});var a=r(57437);r(2265);var n=r(37053),s=r(90535),i=r(94508);let c=(0,s.j)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function l(e){let{className:t,variant:r,size:s,asChild:l=!1,...o}=e,d=l?n.g7:"button";return(0,a.jsx)(d,{"data-slot":"button",className:(0,i.cn)(c({variant:r,size:s,className:t})),...o})}},94508:function(e,t,r){"use strict";r.d(t,{cn:function(){return s}});var a=r(61994),n=r(53335);function s(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,n.m6)((0,a.W)(t))}},31047:function(e,t,r){"use strict";r.d(t,{Z:function(){return a}});let a=(0,r(79205).Z)("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]])},96215:function(e,t,r){"use strict";r.d(t,{Z:function(){return a}});let a=(0,r(79205).Z)("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]])},12805:function(e,t,r){"use strict";r.d(t,{Z:function(){return a}});let a=(0,r(79205).Z)("Palette",[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]])},98728:function(e,t,r){"use strict";r.d(t,{Z:function(){return a}});let a=(0,r(79205).Z)("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},17689:function(e,t,r){"use strict";r.d(t,{Z:function(){return a}});let a=(0,r(79205).Z)("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]])},95805:function(e,t,r){"use strict";r.d(t,{Z:function(){return a}});let a=(0,r(79205).Z)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},99376:function(e,t,r){"use strict";var a=r(35475);r.o(a,"useParams")&&r.d(t,{useParams:function(){return a.useParams}}),r.o(a,"usePathname")&&r.d(t,{usePathname:function(){return a.usePathname}}),r.o(a,"useRouter")&&r.d(t,{useRouter:function(){return a.useRouter}}),r.o(a,"useSearchParams")&&r.d(t,{useSearchParams:function(){return a.useSearchParams}})}},function(e){e.O(0,[6137,9480,605,2971,2117,1744],function(){return e(e.s=56596)}),_N_E=e.O()}]); |