disco
/
backend
/
views
/
components
/
Main
/
pages
/
Rules
/
Tabs
/
DesignBlock
/
BulkBundleDiscountPage
/
BulkBundleDiscountEdit.jsx
BulkBundleDiscountEdit.jsx in Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO 1.4.23, at backend/views/components/Main/pages/Rules/Tabs/DesignBlock/BulkBundleDiscountPage/BulkBundleDiscountEdit.jsx
| 1 | import { __ } from '@wordpress/i18n'; |
| 2 | import { useEffect } from 'react'; |
| 3 | import { useSelector } from 'react-redux'; |
| 4 | import BadgeHeader from '../components/BadgeHeader'; |
| 5 | import ButtonCustomization from './components/ButtonCustomization'; |
| 6 | import CellCustomization from './components/CellCustomization'; |
| 7 | import DiscountView from './components/DiscountView'; |
| 8 | import HeadingCustomization from './components/HeadingCustomization'; |
| 9 | import TableItems from './components/TableItems'; |
| 10 | import TablePosition from './components/TablePosition'; |
| 11 | import TableTabControl from './components/TableTabControl'; |
| 12 | |
| 13 | const BulkBundleDiscountEdit = () => { |
| 14 | const { discount_intent } = useSelector((state) => state.discount); |
| 15 | |
| 16 | useEffect(() => { |
| 17 | window.scrollTo({ top: 0, left: 0, behavior: 'smooth' }); |
| 18 | }, []); |
| 19 | |
| 20 | return ( |
| 21 | <div className="disco:bg-gray-50 disco:mr-4 disco:rounded-lg disco:pb-4"> |
| 22 | <div className="disco:px-5 disco:py-1"> |
| 23 | <BadgeHeader |
| 24 | title={__(`${discount_intent} Table`, 'disco')} |
| 25 | description={__( |
| 26 | 'Customize your design table on product page.', |
| 27 | 'disco' |
| 28 | )} |
| 29 | /> |
| 30 | <div className="disco:max-h-[calc(100vh-225px)] disco:flex disco:gap-8 disco:pt-2 disco:mt-2 disco:justify-between"> |
| 31 | <div className="disco:w-1/2 disco:max-h-full disco:overflow-y-auto disco-no-scrollbar disco:overscroll-contain"> |
| 32 | <TableItems /> |
| 33 | <HeadingCustomization /> |
| 34 | <CellCustomization /> |
| 35 | <ButtonCustomization /> |
| 36 | <TablePosition /> |
| 37 | <TableTabControl /> |
| 38 | </div> |
| 39 | <div className="disco:w-1/2"> |
| 40 | <DiscountView /> |
| 41 | </div> |
| 42 | </div> |
| 43 | </div> |
| 44 | </div> |
| 45 | ); |
| 46 | }; |
| 47 | |
| 48 | export default BulkBundleDiscountEdit; |
| 49 |