bonuspluscomponents 0.0.80 → 0.0.82
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -107,4 +107,4 @@ const theme2 = createTheme({ palette: {
|
|
|
107
107
|
Copyright (c) 2018 Jed Watson.
|
|
108
108
|
Licensed under the MIT License (MIT), see
|
|
109
109
|
http://jedwatson.github.io/classnames
|
|
110
|
-
*/(function(e){(function(){var r={}.hasOwnProperty;function t(){for(var n=[],o=0;o<arguments.length;o++){var i=arguments[o];if(i){var s=typeof i;if(s==="string"||s==="number")n.push(i);else if(Array.isArray(i)){if(i.length){var c=t.apply(null,i);c&&n.push(c)}}else if(s==="object"){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){n.push(i.toString());continue}for(var u in i)r.call(i,u)&&i[u]&&n.push(u)}}}return n.join(" ")}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(xo);var xu=xo.exports;const Nn=Mn(xu);var Nt={},Su=ze;Object.defineProperty(Nt,"__esModule",{value:!0});var So=Nt.default=void 0,Tu=Su(Ye()),wu=y,Ou=(0,Tu.default)((0,wu.jsx)("path",{d:"m7 10 5 5 5-5z"}),"ArrowDropDown");So=Nt.default=Ou;var Dt={},Ru=ze;Object.defineProperty(Dt,"__esModule",{value:!0});var To=Dt.default=void 0,$u=Ru(Ye()),Cu=y,Pu=(0,$u.default)((0,Cu.jsx)("path",{d:"m7 14 5-5 5 5z"}),"ArrowDropUp");To=Dt.default=Pu;const Dn=({title:e,text:r})=>y.jsx("div",{className:"desc_element",children:y.jsxs("div",{children:[y.jsx("div",{children:e}),y.jsx("div",{children:r})]})}),ju=({historyElement:e})=>{var s,c,u,l;const[r,t]=oe.useState(!1),{ParseDataToRusLocale:n}=Eu(),o=y.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:".5em"},children:[(s=e==null?void 0:e.items)==null?void 0:s.map((f,h)=>{var d,E,b,p;return y.jsx("div",{className:"purchase_element",children:y.jsxs("div",{children:[y.jsx("div",{className:"purchase_element__title",children:y.jsx("div",{children:f.productName||`Позиция ${h+1}`})}),y.jsx(_e.Divider,{}),y.jsxs("div",{className:"purchase_element__body",children:[y.jsxs("div",{className:"purchase_element__body__left",children:[y.jsxs("div",{children:[(f.amount/f.quantity).toFixed(2)," x ",f.quantity," ="]}),y.jsx("div",{children:"Скидка, руб:"}),y.jsx("div",{children:"Списано бонусов:"}),y.jsx("div",{children:y.jsx("u",{children:"Итого, руб:"})}),y.jsx("div",{children:"Начислено бонусов:"})]}),y.jsxs("div",{className:"purchase_element__body__right",children:[y.jsx("div",{children:(d=f.amount)==null?void 0:d.toFixed(2)}),y.jsx("div",{children:(E=f.discount)==null?void 0:E.toFixed(2)}),y.jsx("div",{children:(b=f.bonusDebit)==null?void 0:b.toFixed(2)}),y.jsx("div",{children:y.jsx("u",{children:(f.amount-f.discount-f.bonusDebit).toFixed(2)})}),y.jsx("div",{children:(p=f.bonusCredit)==null?void 0:p.toFixed(2)})]})]})]})},h)}),y.jsx("div",{className:"purchase_element",children:y.jsxs("div",{children:[y.jsx("div",{className:"purchase_element__title",children:y.jsx("div",{children:"Итого"})}),y.jsx(_e.Divider,{}),y.jsxs("div",{className:"purchase_element__body",children:[y.jsxs("div",{children:[y.jsx("div",{children:"Скидка. руб:"}),y.jsx("div",{children:"Списано бонусов:"}),y.jsx("div",{children:y.jsx("u",{children:"Итого. руб:"})}),y.jsx("div",{children:"Начислено бонусов:"})]}),y.jsxs("div",{className:"purchase_element__body__right",children:[y.jsx("div",{children:(c=e.discount)==null?void 0:c.toFixed(2)}),y.jsx("div",{children:(u=e.bonusDebit)==null?void 0:u.toFixed(2)}),y.jsx("div",{children:y.jsx("u",{children:(e.purchaseAmount-e.bonusDebit-e.discount).toFixed(2)})}),y.jsx("div",{children:(l=e.bonusCredit)==null?void 0:l.toFixed(2)})]})]})]})})]}),i=()=>{const f=r?y.jsx(To,{}):y.jsx(So,{});return e.operationType!==Eo.Purchases?null:y.jsx("div",{className:"purchase_history_element__show_more",onClick:()=>t(h=>!h),children:f})};return y.jsx(_e.Typography,{component:"div",children:y.jsxs(_e.Box,{className:"purchase_history_element",children:[y.jsxs("div",{className:"purchase_history_element__title",children:[n(e.date)," ",e.type]}),y.jsx(_e.Divider,{}),y.jsxs("div",{className:"purchase_history_element__body",children:[e.bonusCredit>0&&y.jsx(Dn,{title:"Бонусов начислено",text:y.jsx("div",{className:Nn("purchase_history_element__body__top__amount",{more:!0}),children:e.bonusCredit})}),e.bonusDebit>0&&y.jsx(Dn,{title:"Бонусов списано",text:y.jsx("div",{className:Nn("purchase_history_element__body__top__amount",{more:!1}),children:e.bonusDebit})})]}),y.jsx("div",{className:"purchase_history_element__purchases",children:y.jsx(_e.Collapse,{in:r,timeout:"auto",unmountOnExit:!0,children:o})}),i()]})})},Au=()=>{const{purchaseNotFound:e,purchaseHistory:r,isLoading:t}=bu();return t?y.jsx(_u,{}):y.jsx("div",{children:y.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:".5em"},children:[y.jsx(_o,{children:y.jsxs("div",{children:[y.jsx("div",{}),y.jsx("div",{children:"Ниже отображена ваша история операций"})]})}),e||(r==null?void 0:r.map((n,o)=>y.jsx(ju,{historyElement:n},o)))]})})};const Iu=()=>{const{cabinetUISettings:e}=oe.useContext(sr);return y.jsx("div",{className:"business_info",children:y.jsx("div",{dangerouslySetInnerHTML:{__html:(e==null?void 0:e.businessInfo)??""}})})},Nu=()=>{var i;const[e,r]=oe.useState(""),t=(s,c)=>{r(c)},{cabinetSettings:n}=oe.useContext(sr),o=[{icon:y.jsx(vo,{}),value:"info",label:"Карта",page:y.jsx("div",{children:"Информация по карте"}),active:!0},{icon:y.jsx(mo,{}),value:"receipt",label:"История",page:y.jsx(Au,{}),active:!0},{icon:y.jsx(yo,{}),value:"appeals",label:"Обращения",page:y.jsx("div",{children:"Обращения"}),active:n==null?void 0:n.canShowAppeals},{icon:y.jsx(go,{}),value:"businessInfo",label:"Информация",page:y.jsx(Iu,{}),active:n==null?void 0:n.canShowBusinessInfo},{icon:y.jsx(ho,{}),value:"personInfo",label:"Клиент",page:y.jsx("div",{children:"Редактирование клиента"}),active:n==null?void 0:n.canEditPersonInfo},{icon:y.jsx(bo,{}),value:"registration",label:"Регистрация",page:y.jsx("div",{children:"Регистрация клиента"}),active:n==null?void 0:n.isReg}];return y.jsxs("div",{className:"page_view",children:[y.jsx("div",{className:"page_view__page scrollbar",children:(i=o.find(s=>s.value===e))==null?void 0:i.page}),y.jsx("div",{className:"page_view__navigation",children:y.jsx("div",{children:y.jsx(_e.BottomNavigation,{sx:{paddingBottom:"2em"},value:e,onChange:t,children:o.map((s,c)=>y.jsx(_e.BottomNavigationAction,{sx:{padding:"0"},label:s.label,value:s.value,icon:s.icon},c))})})})]})},Du={popups:[]},ku=oe.createContext(Du),Mu=()=>{const[e,r]=oe.useState([]);return{popups:e}},Fu=({children:e})=>{const r=Mu();return y.jsx(ku.Provider,{value:r,children:e})};exports.AppContext=sr;exports.AppProvider=yu;exports.PopupProvider=Fu;exports.Router=Nu;
|
|
110
|
+
*/(function(e){(function(){var r={}.hasOwnProperty;function t(){for(var n=[],o=0;o<arguments.length;o++){var i=arguments[o];if(i){var s=typeof i;if(s==="string"||s==="number")n.push(i);else if(Array.isArray(i)){if(i.length){var c=t.apply(null,i);c&&n.push(c)}}else if(s==="object"){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){n.push(i.toString());continue}for(var u in i)r.call(i,u)&&i[u]&&n.push(u)}}}return n.join(" ")}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(xo);var xu=xo.exports;const Nn=Mn(xu);var Nt={},Su=ze;Object.defineProperty(Nt,"__esModule",{value:!0});var So=Nt.default=void 0,Tu=Su(Ye()),wu=y,Ou=(0,Tu.default)((0,wu.jsx)("path",{d:"m7 10 5 5 5-5z"}),"ArrowDropDown");So=Nt.default=Ou;var Dt={},Ru=ze;Object.defineProperty(Dt,"__esModule",{value:!0});var To=Dt.default=void 0,$u=Ru(Ye()),Cu=y,Pu=(0,$u.default)((0,Cu.jsx)("path",{d:"m7 14 5-5 5 5z"}),"ArrowDropUp");To=Dt.default=Pu;const Dn=({title:e,text:r})=>y.jsx("div",{className:"desc_element",children:y.jsxs("div",{children:[y.jsx("div",{children:e}),y.jsx("div",{children:r})]})}),ju=({historyElement:e})=>{var s,c,u,l;const[r,t]=oe.useState(!1),{ParseDataToRusLocale:n}=Eu(),o=y.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:".5em"},children:[(s=e==null?void 0:e.items)==null?void 0:s.map((f,h)=>{var d,E,b,p;return y.jsx("div",{className:"purchase_element",children:y.jsxs("div",{children:[y.jsx("div",{className:"purchase_element__title",children:y.jsx("div",{children:f.productName||`Позиция ${h+1}`})}),y.jsx(_e.Divider,{}),y.jsxs("div",{className:"purchase_element__body",children:[y.jsxs("div",{className:"purchase_element__body__left",children:[y.jsxs("div",{children:[(f.amount/f.quantity).toFixed(2)," x ",f.quantity," ="]}),y.jsx("div",{children:"Скидка, руб:"}),y.jsx("div",{children:"Списано бонусов:"}),y.jsx("div",{children:y.jsx("u",{children:"Итого, руб:"})}),y.jsx("div",{children:"Начислено бонусов:"})]}),y.jsxs("div",{className:"purchase_element__body__right",children:[y.jsx("div",{children:(d=f.amount)==null?void 0:d.toFixed(2)}),y.jsx("div",{children:(E=f.discount)==null?void 0:E.toFixed(2)}),y.jsx("div",{children:(b=f.bonusDebit)==null?void 0:b.toFixed(2)}),y.jsx("div",{children:y.jsx("u",{children:(f.amount-f.discount-f.bonusDebit).toFixed(2)})}),y.jsx("div",{children:(p=f.bonusCredit)==null?void 0:p.toFixed(2)})]})]})]})},h)}),y.jsx("div",{className:"purchase_element",children:y.jsxs("div",{children:[y.jsx("div",{className:"purchase_element__title",children:y.jsx("div",{children:"Итого"})}),y.jsx(_e.Divider,{}),y.jsxs("div",{className:"purchase_element__body",children:[y.jsxs("div",{children:[y.jsx("div",{children:"Скидка. руб:"}),y.jsx("div",{children:"Списано бонусов:"}),y.jsx("div",{children:y.jsx("u",{children:"Итого. руб:"})}),y.jsx("div",{children:"Начислено бонусов:"})]}),y.jsxs("div",{className:"purchase_element__body__right",children:[y.jsx("div",{children:(c=e.discount)==null?void 0:c.toFixed(2)}),y.jsx("div",{children:(u=e.bonusDebit)==null?void 0:u.toFixed(2)}),y.jsx("div",{children:y.jsx("u",{children:(e.purchaseAmount-e.bonusDebit-e.discount).toFixed(2)})}),y.jsx("div",{children:(l=e.bonusCredit)==null?void 0:l.toFixed(2)})]})]})]})})]}),i=()=>{const f=r?y.jsx(To,{}):y.jsx(So,{});return e.operationType!==Eo.Purchases?null:y.jsx("div",{className:"purchase_history_element__show_more",onClick:()=>t(h=>!h),children:f})};return y.jsx(_e.Typography,{component:"div",children:y.jsxs(_e.Box,{className:"purchase_history_element",children:[y.jsxs("div",{className:"purchase_history_element__title",children:[n(e.date)," ",e.type]}),y.jsx(_e.Divider,{}),y.jsxs("div",{className:"purchase_history_element__body",children:[e.bonusCredit>0&&y.jsx(Dn,{title:"Бонусов начислено",text:y.jsx("div",{className:Nn("purchase_history_element__body__top__amount",{more:!0}),children:e.bonusCredit})}),e.bonusDebit>0&&y.jsx(Dn,{title:"Бонусов списано",text:y.jsx("div",{className:Nn("purchase_history_element__body__top__amount",{more:!1}),children:e.bonusDebit})})]}),y.jsx("div",{className:"purchase_history_element__purchases",children:y.jsx(_e.Collapse,{in:r,timeout:"auto",unmountOnExit:!0,children:o})}),i()]})})},Au=()=>{const{purchaseNotFound:e,purchaseHistory:r,isLoading:t}=bu();return t?y.jsx(_u,{}):y.jsx("div",{children:y.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:".5em"},children:[y.jsx(_o,{children:y.jsxs("div",{children:[y.jsx("div",{}),y.jsx("div",{children:"Ниже отображена ваша история операций"})]})}),e||(r==null?void 0:r.map((n,o)=>y.jsx(ju,{historyElement:n},o)))]})})};const Iu=()=>{const{cabinetUISettings:e}=oe.useContext(sr);return y.jsx("div",{className:"business_info",children:y.jsx("div",{dangerouslySetInnerHTML:{__html:(e==null?void 0:e.businessInfo)??""}})})},Nu=()=>{var i;const[e,r]=oe.useState(""),t=(s,c)=>{r(c)},{cabinetSettings:n}=oe.useContext(sr),o=[{icon:y.jsx(vo,{}),value:"info",label:"Карта",page:y.jsx("div",{children:"Информация по карте"}),active:!0},{icon:y.jsx(mo,{}),value:"receipt",label:"История",page:y.jsx(Au,{}),active:!0},{icon:y.jsx(yo,{}),value:"appeals",label:"Обращения",page:y.jsx("div",{children:"Обращения"}),active:n==null?void 0:n.canShowAppeals},{icon:y.jsx(go,{}),value:"businessInfo",label:"Информация",page:y.jsx(Iu,{}),active:n==null?void 0:n.canShowBusinessInfo},{icon:y.jsx(ho,{}),value:"personInfo",label:"Клиент",page:y.jsx("div",{children:"Редактирование клиента"}),active:n==null?void 0:n.canEditPersonInfo},{icon:y.jsx(bo,{}),value:"registration",label:"Регистрация",page:y.jsx("div",{children:"Регистрация клиента"}),active:n==null?void 0:n.isReg}];return y.jsxs("div",{className:"page_view",children:[y.jsx("div",{className:"page_view__page scrollbar",children:(i=o.find(s=>s.value===e))==null?void 0:i.page}),y.jsx("div",{className:"page_view__navigation",children:y.jsx("div",{children:y.jsx(_e.BottomNavigation,{sx:{paddingBottom:"2em"},value:e,onChange:t,children:o.map((s,c)=>y.jsx(_e.BottomNavigationAction,{sx:{padding:"0",minWidth:"56px"},label:s.label,value:s.value,icon:s.icon},c))})})})]})},Du={popups:[]},ku=oe.createContext(Du),Mu=()=>{const[e,r]=oe.useState([]);return{popups:e}},Fu=({children:e})=>{const r=Mu();return y.jsx(ku.Provider,{value:r,children:e})};exports.AppContext=sr;exports.AppProvider=yu;exports.PopupProvider=Fu;exports.Router=Nu;
|
|
@@ -5050,7 +5050,7 @@ const qu = () => {
|
|
|
5050
5050
|
/* @__PURE__ */ y.jsx("div", { className: "page_view__navigation", children: /* @__PURE__ */ y.jsx("div", { children: /* @__PURE__ */ y.jsx(ti, { sx: { paddingBottom: "2em" }, value: e, onChange: t, children: o.map((s, c) => /* @__PURE__ */ y.jsx(
|
|
5051
5051
|
ni,
|
|
5052
5052
|
{
|
|
5053
|
-
sx: { padding: "0" },
|
|
5053
|
+
sx: { padding: "0", minWidth: "56px" },
|
|
5054
5054
|
label: s.label,
|
|
5055
5055
|
value: s.value,
|
|
5056
5056
|
icon: s.icon
|
|
@@ -107,4 +107,4 @@ const theme2 = createTheme({ palette: {
|
|
|
107
107
|
Copyright (c) 2018 Jed Watson.
|
|
108
108
|
Licensed under the MIT License (MIT), see
|
|
109
109
|
http://jedwatson.github.io/classnames
|
|
110
|
-
*/(function(e){(function(){var r={}.hasOwnProperty;function t(){for(var n=[],o=0;o<arguments.length;o++){var i=arguments[o];if(i){var s=typeof i;if(s==="string"||s==="number")n.push(i);else if(Array.isArray(i)){if(i.length){var c=t.apply(null,i);c&&n.push(c)}}else if(s==="object"){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){n.push(i.toString());continue}for(var u in i)r.call(i,u)&&i[u]&&n.push(u)}}}return n.join(" ")}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(lo);var Lc=lo.exports;const po=Ft(Lc),Yu="";var Pt={},Vc=Ue;Object.defineProperty(Pt,"__esModule",{value:!0});var ho=Pt.default=void 0,zc=Vc(We()),Uc=y,Yc=(0,zc.default)((0,Uc.jsx)("path",{d:"m7 10 5 5 5-5z"}),"ArrowDropDown");ho=Pt.default=Yc;var jt={},Wc=Ue;Object.defineProperty(jt,"__esModule",{value:!0});var mo=jt.default=void 0,Bc=Wc(We()),qc=y,Kc=(0,Bc.default)((0,qc.jsx)("path",{d:"m7 14 5-5 5 5z"}),"ArrowDropUp");mo=jt.default=Kc;const Wu="",vo=({title:e,text:r})=>y.jsx("div",{className:"desc_element",children:y.jsxs("div",{children:[y.jsx("div",{children:e}),y.jsx("div",{children:r})]})}),Gc=({historyElement:e})=>{var s,c,u,l;const[r,t]=ee.useState(!1),{ParseDataToRusLocale:n}=Fc(),o=y.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:".5em"},children:[(s=e==null?void 0:e.items)==null?void 0:s.map((f,m)=>{var d,E,b,p;return y.jsx("div",{className:"purchase_element",children:y.jsxs("div",{children:[y.jsx("div",{className:"purchase_element__title",children:y.jsx("div",{children:f.productName||`Позиция ${m+1}`})}),y.jsx(_e.Divider,{}),y.jsxs("div",{className:"purchase_element__body",children:[y.jsxs("div",{className:"purchase_element__body__left",children:[y.jsxs("div",{children:[(f.amount/f.quantity).toFixed(2)," x ",f.quantity," ="]}),y.jsx("div",{children:"Скидка, руб:"}),y.jsx("div",{children:"Списано бонусов:"}),y.jsx("div",{children:y.jsx("u",{children:"Итого, руб:"})}),y.jsx("div",{children:"Начислено бонусов:"})]}),y.jsxs("div",{className:"purchase_element__body__right",children:[y.jsx("div",{children:(d=f.amount)==null?void 0:d.toFixed(2)}),y.jsx("div",{children:(E=f.discount)==null?void 0:E.toFixed(2)}),y.jsx("div",{children:(b=f.bonusDebit)==null?void 0:b.toFixed(2)}),y.jsx("div",{children:y.jsx("u",{children:(f.amount-f.discount-f.bonusDebit).toFixed(2)})}),y.jsx("div",{children:(p=f.bonusCredit)==null?void 0:p.toFixed(2)})]})]})]})},m)}),y.jsx("div",{className:"purchase_element",children:y.jsxs("div",{children:[y.jsx("div",{className:"purchase_element__title",children:y.jsx("div",{children:"Итого"})}),y.jsx(_e.Divider,{}),y.jsxs("div",{className:"purchase_element__body",children:[y.jsxs("div",{children:[y.jsx("div",{children:"Скидка. руб:"}),y.jsx("div",{children:"Списано бонусов:"}),y.jsx("div",{children:y.jsx("u",{children:"Итого. руб:"})}),y.jsx("div",{children:"Начислено бонусов:"})]}),y.jsxs("div",{className:"purchase_element__body__right",children:[y.jsx("div",{children:(c=e.discount)==null?void 0:c.toFixed(2)}),y.jsx("div",{children:(u=e.bonusDebit)==null?void 0:u.toFixed(2)}),y.jsx("div",{children:y.jsx("u",{children:(e.purchaseAmount-e.bonusDebit-e.discount).toFixed(2)})}),y.jsx("div",{children:(l=e.bonusCredit)==null?void 0:l.toFixed(2)})]})]})]})})]}),i=()=>{const f=r?y.jsx(mo,{}):y.jsx(ho,{});return e.operationType!==fo.Purchases?null:y.jsx("div",{className:"purchase_history_element__show_more",onClick:()=>t(m=>!m),children:f})};return y.jsx(_e.Typography,{component:"div",children:y.jsxs(_e.Box,{className:"purchase_history_element",children:[y.jsxs("div",{className:"purchase_history_element__title",children:[n(e.date)," ",e.type]}),y.jsx(_e.Divider,{}),y.jsxs("div",{className:"purchase_history_element__body",children:[e.bonusCredit>0&&y.jsx(vo,{title:"Бонусов начислено",text:y.jsx("div",{className:po("purchase_history_element__body__top__amount",{more:!0}),children:e.bonusCredit})}),e.bonusDebit>0&&y.jsx(vo,{title:"Бонусов списано",text:y.jsx("div",{className:po("purchase_history_element__body__top__amount",{more:!1}),children:e.bonusDebit})})]}),y.jsx("div",{className:"purchase_history_element__purchases",children:y.jsx(_e.Collapse,{in:r,timeout:"auto",unmountOnExit:!0,children:o})}),i()]})})},Hc=()=>{const{purchaseNotFound:e,purchaseHistory:r,isLoading:t}=kc();return t?y.jsx(Mc,{}):y.jsx("div",{children:y.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:".5em"},children:[y.jsx(uo,{children:y.jsxs("div",{children:[y.jsx("div",{}),y.jsx("div",{children:"Ниже отображена ваша история операций"})]})}),e||(r==null?void 0:r.map((n,o)=>y.jsx(Gc,{historyElement:n},o)))]})})},Bu="",Jc=()=>{const{cabinetUISettings:e}=ee.useContext(ir);return y.jsx("div",{className:"business_info",children:y.jsx("div",{dangerouslySetInnerHTML:{__html:(e==null?void 0:e.businessInfo)??""}})})},Xc=()=>{var i;const[e,r]=ee.useState(""),t=(s,c)=>{r(c)},{cabinetSettings:n}=ee.useContext(ir),o=[{icon:y.jsx(io,{}),value:"info",label:"Карта",page:y.jsx("div",{children:"Информация по карте"}),active:!0},{icon:y.jsx(no,{}),value:"receipt",label:"История",page:y.jsx(Hc,{}),active:!0},{icon:y.jsx(so,{}),value:"appeals",label:"Обращения",page:y.jsx("div",{children:"Обращения"}),active:n==null?void 0:n.canShowAppeals},{icon:y.jsx(ao,{}),value:"businessInfo",label:"Информация",page:y.jsx(Jc,{}),active:n==null?void 0:n.canShowBusinessInfo},{icon:y.jsx(oo,{}),value:"personInfo",label:"Клиент",page:y.jsx("div",{children:"Редактирование клиента"}),active:n==null?void 0:n.canEditPersonInfo},{icon:y.jsx(co,{}),value:"registration",label:"Регистрация",page:y.jsx("div",{children:"Регистрация клиента"}),active:n==null?void 0:n.isReg}];return y.jsxs("div",{className:"page_view",children:[y.jsx("div",{className:"page_view__page scrollbar",children:(i=o.find(s=>s.value===e))==null?void 0:i.page}),y.jsx("div",{className:"page_view__navigation",children:y.jsx("div",{children:y.jsx(_e.BottomNavigation,{sx:{paddingBottom:"2em"},value:e,onChange:t,children:o.map((s,c)=>y.jsx(_e.BottomNavigationAction,{sx:{padding:"0"},label:s.label,value:s.value,icon:s.icon},c))})})})]})},Zc={popups:[]},Qc=ee.createContext(Zc),eu=()=>{const[e,r]=ee.useState([]);return{popups:e}},ru=({children:e})=>{const r=eu();return y.jsx(Qc.Provider,{value:r,children:e})};xe.AppContext=ir,xe.AppProvider=Nc,xe.PopupProvider=ru,xe.Router=Xc,Object.defineProperty(xe,Symbol.toStringTag,{value:"Module"})});
|
|
110
|
+
*/(function(e){(function(){var r={}.hasOwnProperty;function t(){for(var n=[],o=0;o<arguments.length;o++){var i=arguments[o];if(i){var s=typeof i;if(s==="string"||s==="number")n.push(i);else if(Array.isArray(i)){if(i.length){var c=t.apply(null,i);c&&n.push(c)}}else if(s==="object"){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){n.push(i.toString());continue}for(var u in i)r.call(i,u)&&i[u]&&n.push(u)}}}return n.join(" ")}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(lo);var Lc=lo.exports;const po=Ft(Lc),Yu="";var Pt={},Vc=Ue;Object.defineProperty(Pt,"__esModule",{value:!0});var ho=Pt.default=void 0,zc=Vc(We()),Uc=y,Yc=(0,zc.default)((0,Uc.jsx)("path",{d:"m7 10 5 5 5-5z"}),"ArrowDropDown");ho=Pt.default=Yc;var jt={},Wc=Ue;Object.defineProperty(jt,"__esModule",{value:!0});var mo=jt.default=void 0,Bc=Wc(We()),qc=y,Kc=(0,Bc.default)((0,qc.jsx)("path",{d:"m7 14 5-5 5 5z"}),"ArrowDropUp");mo=jt.default=Kc;const Wu="",vo=({title:e,text:r})=>y.jsx("div",{className:"desc_element",children:y.jsxs("div",{children:[y.jsx("div",{children:e}),y.jsx("div",{children:r})]})}),Gc=({historyElement:e})=>{var s,c,u,l;const[r,t]=ee.useState(!1),{ParseDataToRusLocale:n}=Fc(),o=y.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:".5em"},children:[(s=e==null?void 0:e.items)==null?void 0:s.map((f,m)=>{var d,E,b,p;return y.jsx("div",{className:"purchase_element",children:y.jsxs("div",{children:[y.jsx("div",{className:"purchase_element__title",children:y.jsx("div",{children:f.productName||`Позиция ${m+1}`})}),y.jsx(_e.Divider,{}),y.jsxs("div",{className:"purchase_element__body",children:[y.jsxs("div",{className:"purchase_element__body__left",children:[y.jsxs("div",{children:[(f.amount/f.quantity).toFixed(2)," x ",f.quantity," ="]}),y.jsx("div",{children:"Скидка, руб:"}),y.jsx("div",{children:"Списано бонусов:"}),y.jsx("div",{children:y.jsx("u",{children:"Итого, руб:"})}),y.jsx("div",{children:"Начислено бонусов:"})]}),y.jsxs("div",{className:"purchase_element__body__right",children:[y.jsx("div",{children:(d=f.amount)==null?void 0:d.toFixed(2)}),y.jsx("div",{children:(E=f.discount)==null?void 0:E.toFixed(2)}),y.jsx("div",{children:(b=f.bonusDebit)==null?void 0:b.toFixed(2)}),y.jsx("div",{children:y.jsx("u",{children:(f.amount-f.discount-f.bonusDebit).toFixed(2)})}),y.jsx("div",{children:(p=f.bonusCredit)==null?void 0:p.toFixed(2)})]})]})]})},m)}),y.jsx("div",{className:"purchase_element",children:y.jsxs("div",{children:[y.jsx("div",{className:"purchase_element__title",children:y.jsx("div",{children:"Итого"})}),y.jsx(_e.Divider,{}),y.jsxs("div",{className:"purchase_element__body",children:[y.jsxs("div",{children:[y.jsx("div",{children:"Скидка. руб:"}),y.jsx("div",{children:"Списано бонусов:"}),y.jsx("div",{children:y.jsx("u",{children:"Итого. руб:"})}),y.jsx("div",{children:"Начислено бонусов:"})]}),y.jsxs("div",{className:"purchase_element__body__right",children:[y.jsx("div",{children:(c=e.discount)==null?void 0:c.toFixed(2)}),y.jsx("div",{children:(u=e.bonusDebit)==null?void 0:u.toFixed(2)}),y.jsx("div",{children:y.jsx("u",{children:(e.purchaseAmount-e.bonusDebit-e.discount).toFixed(2)})}),y.jsx("div",{children:(l=e.bonusCredit)==null?void 0:l.toFixed(2)})]})]})]})})]}),i=()=>{const f=r?y.jsx(mo,{}):y.jsx(ho,{});return e.operationType!==fo.Purchases?null:y.jsx("div",{className:"purchase_history_element__show_more",onClick:()=>t(m=>!m),children:f})};return y.jsx(_e.Typography,{component:"div",children:y.jsxs(_e.Box,{className:"purchase_history_element",children:[y.jsxs("div",{className:"purchase_history_element__title",children:[n(e.date)," ",e.type]}),y.jsx(_e.Divider,{}),y.jsxs("div",{className:"purchase_history_element__body",children:[e.bonusCredit>0&&y.jsx(vo,{title:"Бонусов начислено",text:y.jsx("div",{className:po("purchase_history_element__body__top__amount",{more:!0}),children:e.bonusCredit})}),e.bonusDebit>0&&y.jsx(vo,{title:"Бонусов списано",text:y.jsx("div",{className:po("purchase_history_element__body__top__amount",{more:!1}),children:e.bonusDebit})})]}),y.jsx("div",{className:"purchase_history_element__purchases",children:y.jsx(_e.Collapse,{in:r,timeout:"auto",unmountOnExit:!0,children:o})}),i()]})})},Hc=()=>{const{purchaseNotFound:e,purchaseHistory:r,isLoading:t}=kc();return t?y.jsx(Mc,{}):y.jsx("div",{children:y.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:".5em"},children:[y.jsx(uo,{children:y.jsxs("div",{children:[y.jsx("div",{}),y.jsx("div",{children:"Ниже отображена ваша история операций"})]})}),e||(r==null?void 0:r.map((n,o)=>y.jsx(Gc,{historyElement:n},o)))]})})},Bu="",Jc=()=>{const{cabinetUISettings:e}=ee.useContext(ir);return y.jsx("div",{className:"business_info",children:y.jsx("div",{dangerouslySetInnerHTML:{__html:(e==null?void 0:e.businessInfo)??""}})})},Xc=()=>{var i;const[e,r]=ee.useState(""),t=(s,c)=>{r(c)},{cabinetSettings:n}=ee.useContext(ir),o=[{icon:y.jsx(io,{}),value:"info",label:"Карта",page:y.jsx("div",{children:"Информация по карте"}),active:!0},{icon:y.jsx(no,{}),value:"receipt",label:"История",page:y.jsx(Hc,{}),active:!0},{icon:y.jsx(so,{}),value:"appeals",label:"Обращения",page:y.jsx("div",{children:"Обращения"}),active:n==null?void 0:n.canShowAppeals},{icon:y.jsx(ao,{}),value:"businessInfo",label:"Информация",page:y.jsx(Jc,{}),active:n==null?void 0:n.canShowBusinessInfo},{icon:y.jsx(oo,{}),value:"personInfo",label:"Клиент",page:y.jsx("div",{children:"Редактирование клиента"}),active:n==null?void 0:n.canEditPersonInfo},{icon:y.jsx(co,{}),value:"registration",label:"Регистрация",page:y.jsx("div",{children:"Регистрация клиента"}),active:n==null?void 0:n.isReg}];return y.jsxs("div",{className:"page_view",children:[y.jsx("div",{className:"page_view__page scrollbar",children:(i=o.find(s=>s.value===e))==null?void 0:i.page}),y.jsx("div",{className:"page_view__navigation",children:y.jsx("div",{children:y.jsx(_e.BottomNavigation,{sx:{paddingBottom:"2em"},value:e,onChange:t,children:o.map((s,c)=>y.jsx(_e.BottomNavigationAction,{sx:{padding:"0",minWidth:"56px"},label:s.label,value:s.value,icon:s.icon},c))})})})]})},Zc={popups:[]},Qc=ee.createContext(Zc),eu=()=>{const[e,r]=ee.useState([]);return{popups:e}},ru=({children:e})=>{const r=eu();return y.jsx(Qc.Provider,{value:r,children:e})};xe.AppContext=ir,xe.AppProvider=Nc,xe.PopupProvider=ru,xe.Router=Xc,Object.defineProperty(xe,Symbol.toStringTag,{value:"Module"})});
|