PageSourceSearch

https://www.bagchee.com/static/js/5566.1431b092.chunk.js

js bagchee.com collected 2026-10-02 11:16:56 UTC 6,364 bytes, 3 lines download raw bytes

1/*! For license information please see 5566.1431b092.chunk.js.LICENSE.txt */
2"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[5566],{2024(e,s,a){a.d(s,{A:()=>t});const t=(0,a(7784).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},4805(e,s,a){a.d(s,{A:()=>t});const t=(0,a(7784).A)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]])},5566(e,s,a){a.r(s),a.d(s,{default:()=>x});var t=a(9379),i=a(5043),r=a(7874),l=a(2024),n=a(6210),c=a(4805),d=a(614),o=a(3046),p=a(2339),m=a(579);const x=()=>{const e=(0,r.Zp)(),[s,a]=(0,i.useState)(!1),[x,h]=(0,i.useState)({title:"",max_day_limit:"",price_usd:"",price_eur:"",price_gbp:"",price_inr:"",active:"",order:""}),g=e=>{h((0,t.A)((0,t.A)({},x),{},{[e.target.name]:e.target.value}))},u=async(s,t)=>{if(s.preventDefault(),!x.title)return p.Ay.error("Title is required!");a(!0);const i=p.Ay.loading("Saving shipping option...");try{const s="https://www.bagchee.com/api";(await o.A.post("".concat(s,"/shipping-options/save"),x)).data.status&&(p.Ay.success("Shipping option added successfully! \ud83d\udea2",{id:i}),"back"===t?e("/admin/shipping-options"):h({title:"",max_day_limit:"",price_usd:"",price_eur:"",price_gbp:"",price_inr:"",active:"",order:""}))}catch(n){var r,l;p.Ay.error((null===(r=n.response)||void 0===r||null===(l=r.data)||void 0===l?void 0:l.msg)||"Failed to save",{id:i})}finally{a(!1)}},b="w-full border border-gray-300 rounded px-4 py-2 text-[13px] outline-none transition-all focus:border-primary bg-white focus:ring-1 focus:ring-primary/20 font-body",j="col-span-3 text-right text-[11px] font-bold text-text-muted uppercase font-montserrat pt-2";return(0,m.jsxs)("div",{className:"bg-cream-50 min-h-screen font-body text-text-main pb-10",children:[(0,m.jsx)("div",{className:"bg-primary px-6 py-3 shadow-md flex items-center justify-between",children:(0,m.jsx)("h1",{className:"text-lg font-bold text-white uppercase tracking-slick font-display",children:"Add Shipping options"})}),(0,m.jsx)("div",{className:"max-w-6xl mx-auto p-6 mt-4",children:(0,m.jsxs)("form",{className:"bg-white rounded border border-cream-200 shadow-sm overflow-hidden",children:[(0,m.jsx)("div",{className:"bg-cream-100 px-6 py-2 border-b border-cream-200",children:(0,m.jsx)("h2",{className:"text-[11px] font-bold uppercase tracking-wider font-montserrat text-text-muted",children:"Shipping Option Information"})}),(0,m.jsxs)("div",{className:"p-8 space-y-6",children:[(0,m.jsxs)("div",{className:"grid grid-cols-12 gap-4 items-center",children:[(0,m.jsx)("label",{className:j,children:"Title*"}),(0,m.jsx)("div",{className:"col-span-9",children:(0,m.jsx)("input",{type:"text",name:"title",value:x.title,onChange:g,className:b,placeholder:""})})]}),(0,m.jsxs)("div",{className:"grid grid-cols-12 gap-4 items-center",children:[(0,m.jsx)("label",{className:j,children:"Max day limit"}),(0,m.jsx)("div",{className:"col-span-9",children:(0,m.jsx)("input",{type:"text",name:"max_day_limit",value:x.max_day_limit,onChange:g,className:b})})]}),(0,m.jsxs)("div",{className:"grid grid-cols-12 gap-4 items-center",children:[(0,m.jsx)("label",{className:j,children:"Price usd"}),(0,m.jsx)("div",{className:"col-span-9",children:(0,m.jsx)("input",{type:"text",name:"price_usd",value:x.price_usd,onChange:g,className:b})})]}),(0,m.jsxs)("div",{className:"grid grid-cols-12 gap-4 items-center",children:[(0,m.jsx)("label",{className:j,children:"Price eur"}),(0,m.jsx)("div",{className:"col-span-9",children:(0,m.jsx)("input",{type:"text",name:"price_eur",value:x.price_eur,onChange:g,className:b})})]}),(0,m.jsxs)("div",{className:"grid grid-cols-12 gap-4 items-center",children:[(0,m.jsx)("label",{className:j,children:"Price gbp (\xa3)"}),(0,m.jsx)("div",{className:"col-span-9",children:(0,m.jsx)("input",{type:"text",name:"price_gbp",value:x.price_gbp,onChange:g,className:b})})]}),(0,m.jsxs)("div",{className:"grid grid-cols-12 gap-4 items-center",children:[(0,m.jsx)("label",{className:j,children:"Price inr"}),(0,m.jsx)("div",{className:"col-span-9",children:(0,m.jsx)("input",{type:"text",name:"price_inr",value:x.price_inr,onChange:g,className:b})})]}),(0,m.jsxs)("div",{className:"grid grid-cols-12 gap-4 items-center",children:[(0,m.jsx)("label",{className:j,children:"Active"}),(0,m.jsx)("div",{className:"col-span-9",children:(0,m.jsxs)("select",{name:"active",value:x.active,onChange:g,className:b,children:[(0,m.jsx)("option",{value:"",children:"Select Active"}),(0,m.jsx)("option",{value:"yes",children:"Yes"}),(0,m.jsx)("option",{value:"no",children:"No"})]})})]}),(0,m.jsxs)("div",{className:"grid grid-cols-12 gap-4 items-center",children:[(0,m.jsx)("label",{className:j,children:"Order"}),(0,m.jsx)("div",{className:"col-span-9",children:(0,m.jsx)("input",{type:"text",name:"order",value:x.order,onChange:g,className:b})})]}),(0,m.jsxs)("div",{className:"flex justify-center items-center gap-3 pt-8 border-t mt
2-10 font-montserrat",children:[(0,m.jsxs)("button",{type:"button",onClick:e=>u(e,"stay"),disabled:s,className:"bg-white border border-gray-300 hover:bg-gray-50 text-text-main px-6 py-2 rounded font-bold text-[11px] uppercase transition-all flex items-center gap-2 shadow-sm",children:[s?(0,m.jsx)(l.A,{size:14,className:"animate-spin"}):(0,m.jsx)(n.A,{size:16,className:"text-green-600"}),(0,m.jsx)("span",{className:"font-bold",children:"Save"})]}),(0,m.jsxs)("button",{type:"button",onClick:e=>u(e,"back"),disabled:s,className:"bg-white border border-gray-300 hover:bg-gray-50 text-text-main px-6 py-2 rounded font-bold text-[11px] uppercase transition-all flex items-center gap-2 shadow-sm",children:[(0,m.jsx)(c.A,{size:16,className:"text-primary"}),(0,m.jsx)("span",{className:"font-bold",children:"Save and go back to list"})]}),(0,m.jsxs)("button",{type:"button",onClick:()=>e("/admin/shipping-options"),className:"bg-white border border-gray-300 hover:bg-gray-50 text-text-main px-6 py-2 rounded font-bold text-[11px] uppercase transition-all flex items-center gap-2 shadow-sm",children:[(0,m.jsx)(d.A,{size:16,className:"text-red-600"}),(0,m.jsx)("span",{className:"font-bold",children:"Cancel"})]})]})]})]})})]})}},6210(e,s,a){a.d(s,{A:()=>t});const t=(0,a(7784).A)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])}}]);
3//# sourceMappingURL=5566.1431b092.chunk.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.